mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-27 03:55:20 +03:00
Merge pull request #709 from fitzgen/webidl-and-logging
Webidl and logging
This commit is contained in:
commit
13fe2b4aca
33
crates/web-sys/webidls/enabled/BoxObject.webidl
vendored
33
crates/web-sys/webidls/enabled/BoxObject.webidl
vendored
@ -1,33 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface BoxObject {
|
|
||||||
readonly attribute Element? element;
|
|
||||||
|
|
||||||
readonly attribute long x;
|
|
||||||
readonly attribute long y;
|
|
||||||
[Throws]
|
|
||||||
readonly attribute long screenX;
|
|
||||||
[Throws]
|
|
||||||
readonly attribute long screenY;
|
|
||||||
readonly attribute long width;
|
|
||||||
readonly attribute long height;
|
|
||||||
|
|
||||||
nsISupports? getPropertyAsSupports(DOMString propertyName);
|
|
||||||
void setPropertyAsSupports(DOMString propertyName, nsISupports value);
|
|
||||||
[Throws]
|
|
||||||
DOMString? getProperty(DOMString propertyName);
|
|
||||||
void setProperty(DOMString propertyName, DOMString propertyValue);
|
|
||||||
void removeProperty(DOMString propertyName);
|
|
||||||
|
|
||||||
// for stepping through content in the expanded dom with box-ordinal-group order
|
|
||||||
readonly attribute Element? parentBox;
|
|
||||||
readonly attribute Element? firstChild;
|
|
||||||
readonly attribute Element? lastChild;
|
|
||||||
readonly attribute Element? nextSibling;
|
|
||||||
readonly attribute Element? previousSibling;
|
|
||||||
};
|
|
@ -40,21 +40,6 @@ interface CanvasRenderingContext2D {
|
|||||||
// associated with a canvas.
|
// associated with a canvas.
|
||||||
readonly attribute HTMLCanvasElement? canvas;
|
readonly attribute HTMLCanvasElement? canvas;
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
// FIXME Bug 768048 mozCurrentTransform/mozCurrentTransformInverse should return a WebIDL array.
|
|
||||||
[Throws]
|
|
||||||
attribute object mozCurrentTransform; // [ m11, m12, m21, m22, dx, dy ], i.e. row major
|
|
||||||
[Throws]
|
|
||||||
attribute object mozCurrentTransformInverse;
|
|
||||||
|
|
||||||
[SetterThrows]
|
|
||||||
attribute DOMString mozTextStyle;
|
|
||||||
|
|
||||||
// image smoothing mode -- if disabled, images won't be smoothed
|
|
||||||
// if scaled.
|
|
||||||
[Deprecated="PrefixedImageSmoothingEnabled"]
|
|
||||||
attribute boolean mozImageSmoothingEnabled;
|
|
||||||
|
|
||||||
// Show the caret if appropriate when drawing
|
// Show the caret if appropriate when drawing
|
||||||
[Func="CanvasUtils::HasDrawWindowPrivilege"]
|
[Func="CanvasUtils::HasDrawWindowPrivilege"]
|
||||||
const unsigned long DRAWWINDOW_DRAW_CARET = 0x01;
|
const unsigned long DRAWWINDOW_DRAW_CARET = 0x01;
|
||||||
@ -140,7 +125,6 @@ CanvasRenderingContext2D implements CanvasTextDrawingStyles;
|
|||||||
CanvasRenderingContext2D implements CanvasPathMethods;
|
CanvasRenderingContext2D implements CanvasPathMethods;
|
||||||
CanvasRenderingContext2D implements CanvasHitRegions;
|
CanvasRenderingContext2D implements CanvasHitRegions;
|
||||||
|
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject]
|
||||||
interface CanvasState {
|
interface CanvasState {
|
||||||
// state
|
// state
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Constructor, Func="IsChromeOrXBL"]
|
|
||||||
interface ChromeNodeList : NodeList {
|
|
||||||
[Throws]
|
|
||||||
void append(Node aNode);
|
|
||||||
[Throws]
|
|
||||||
void remove(Node aNode);
|
|
||||||
};
|
|
@ -1,10 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface CommandEvent : Event {
|
|
||||||
readonly attribute DOMString? command;
|
|
||||||
};
|
|
10
crates/web-sys/webidls/enabled/DOMParser.webidl
vendored
10
crates/web-sys/webidls/enabled/DOMParser.webidl
vendored
@ -19,23 +19,13 @@ enum SupportedType {
|
|||||||
"image/svg+xml"
|
"image/svg+xml"
|
||||||
};
|
};
|
||||||
|
|
||||||
// the latter is Mozilla-specific
|
|
||||||
[Constructor]
|
[Constructor]
|
||||||
interface DOMParser {
|
interface DOMParser {
|
||||||
[NewObject, Throws]
|
[NewObject, Throws]
|
||||||
Document parseFromString(DOMString str, SupportedType type);
|
Document parseFromString(DOMString str, SupportedType type);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
[NewObject, Throws, ChromeOnly]
|
|
||||||
Document parseFromBuffer(sequence<octet> buf, SupportedType type);
|
|
||||||
[NewObject, Throws, ChromeOnly]
|
|
||||||
Document parseFromBuffer(Uint8Array buf, SupportedType type);
|
|
||||||
[NewObject, Throws, ChromeOnly]
|
|
||||||
Document parseFromStream(InputStream stream, DOMString? charset,
|
|
||||||
long contentLength, SupportedType type);
|
|
||||||
// Can be used to allow a DOMParser to parse XUL/XBL no matter what
|
// Can be used to allow a DOMParser to parse XUL/XBL no matter what
|
||||||
// principal it's using for the document.
|
// principal it's using for the document.
|
||||||
[ChromeOnly]
|
[ChromeOnly]
|
||||||
void forceEnableXULXBL();
|
void forceEnableXULXBL();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
139
crates/web-sys/webidls/enabled/DataTransfer.webidl
vendored
139
crates/web-sys/webidls/enabled/DataTransfer.webidl
vendored
@ -37,142 +37,3 @@ partial interface DataTransfer {
|
|||||||
[Throws, Pref="dom.input.dirpicker", NeedsSubjectPrincipal]
|
[Throws, Pref="dom.input.dirpicker", NeedsSubjectPrincipal]
|
||||||
Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
|
Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla specific stuff
|
|
||||||
partial interface DataTransfer {
|
|
||||||
/*
|
|
||||||
* Set the drag source. Usually you would not change this, but it will
|
|
||||||
* affect which node the drag and dragend events are fired at. The
|
|
||||||
* default target is the node that was dragged.
|
|
||||||
*
|
|
||||||
* @param element drag source to use
|
|
||||||
* @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
|
|
||||||
*/
|
|
||||||
[Throws, UseCounter]
|
|
||||||
void addElement(Element element);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The number of items being dragged.
|
|
||||||
*/
|
|
||||||
[UseCounter]
|
|
||||||
readonly attribute unsigned long mozItemCount;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the drag cursor state. Primarily used to control the cursor during
|
|
||||||
* tab drags, but could be expanded to other uses. XXX Currently implemented
|
|
||||||
* on Win32 only.
|
|
||||||
*
|
|
||||||
* Possible values:
|
|
||||||
* auto - use default system behavior.
|
|
||||||
* default - set the cursor to an arrow during the drag operation.
|
|
||||||
*
|
|
||||||
* Values other than 'default' are indentical to setting mozCursor to
|
|
||||||
* 'auto'.
|
|
||||||
*/
|
|
||||||
[UseCounter]
|
|
||||||
attribute DOMString mozCursor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Holds a list of the format types of the data that is stored for an item
|
|
||||||
* at the specified index. If the index is not in the range from 0 to
|
|
||||||
* itemCount - 1, an empty string list is returned.
|
|
||||||
*/
|
|
||||||
[Throws, NeedsCallerType, UseCounter]
|
|
||||||
DOMStringList mozTypesAt(unsigned long index);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the data associated with the given format for an item at the
|
|
||||||
* specified index. The index is in the range from zero to itemCount - 1.
|
|
||||||
*
|
|
||||||
* If the last format for the item is removed, the entire item is removed,
|
|
||||||
* reducing the itemCount by one.
|
|
||||||
*
|
|
||||||
* If format is empty, then the data associated with all formats is removed.
|
|
||||||
* If the format is not found, then this method has no effect.
|
|
||||||
*
|
|
||||||
* @param format the format to remove
|
|
||||||
* @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
|
|
||||||
* @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
|
|
||||||
*/
|
|
||||||
[Throws, NeedsSubjectPrincipal, UseCounter]
|
|
||||||
void mozClearDataAt(DOMString format, unsigned long index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A data transfer may store multiple items, each at a given zero-based
|
|
||||||
* index. setDataAt may only be called with an index argument less than
|
|
||||||
* itemCount in which case an existing item is modified, or equal to
|
|
||||||
* itemCount in which case a new item is added, and the itemCount is
|
|
||||||
* incremented by one.
|
|
||||||
*
|
|
||||||
* Data should be added in order of preference, with the most specific
|
|
||||||
* format added first and the least specific format added last. If data of
|
|
||||||
* the given format already exists, it is replaced in the same position as
|
|
||||||
* the old data.
|
|
||||||
*
|
|
||||||
* The data should be either a string, a primitive boolean or number type
|
|
||||||
* (which will be converted into a string) or an nsISupports.
|
|
||||||
*
|
|
||||||
* @param format the format to add
|
|
||||||
* @param data the data to add
|
|
||||||
* @throws NS_ERROR_NULL_POINTER if the data is null
|
|
||||||
* @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater than itemCount
|
|
||||||
* @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
|
|
||||||
*/
|
|
||||||
[Throws, NeedsSubjectPrincipal, UseCounter]
|
|
||||||
void mozSetDataAt(DOMString format, any data, unsigned long index);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve the data associated with the given format for an item at the
|
|
||||||
* specified index, or null if it does not exist. The index should be in the
|
|
||||||
* range from zero to itemCount - 1.
|
|
||||||
*
|
|
||||||
* @param format the format of the data to look up
|
|
||||||
* @returns the data of the given format, or null if it doesn't exist.
|
|
||||||
* @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
|
|
||||||
*/
|
|
||||||
[Throws, NeedsSubjectPrincipal, UseCounter]
|
|
||||||
any mozGetDataAt(DOMString format, unsigned long index);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the drag image. Arguments are the same as setDragImage. This is only
|
|
||||||
* valid within the parent chrome process.
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
void updateDragImage(Element image, long x, long y);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Will be true when the user has cancelled the drag (typically by pressing
|
|
||||||
* Escape) and when the drag has been cancelled unexpectedly. This will be
|
|
||||||
* false otherwise, including when the drop has been rejected by its target.
|
|
||||||
* This property is only relevant for the dragend event.
|
|
||||||
*/
|
|
||||||
[UseCounter]
|
|
||||||
readonly attribute boolean mozUserCancelled;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The node that the mouse was pressed over to begin the drag. For external
|
|
||||||
* drags, or if the caller cannot access this node, this will be null.
|
|
||||||
*/
|
|
||||||
[UseCounter]
|
|
||||||
readonly attribute Node? mozSourceNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The URI spec of the triggering principal. This may be different than
|
|
||||||
* sourceNode's principal when sourceNode is xul:browser and the drag is
|
|
||||||
* triggered in a browsing context inside it.
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
readonly attribute DOMString mozTriggeringPrincipalURISpec;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy the given DataTransfer for the given event. Used by testing code for
|
|
||||||
* creating emulated Drag and Drop events in the UI.
|
|
||||||
*
|
|
||||||
* NOTE: Don't expose a DataTransfer produced with this method to the web or
|
|
||||||
* use this for non-testing purposes. It can easily be used to get the
|
|
||||||
* DataTransfer into an invalid state, and is an unstable implementation
|
|
||||||
* detail of EventUtils.synthesizeDrag.
|
|
||||||
*/
|
|
||||||
[Throws, ChromeOnly]
|
|
||||||
DataTransfer mozCloneForEvent(DOMString event);
|
|
||||||
};
|
|
||||||
|
96
crates/web-sys/webidls/enabled/Document.webidl
vendored
96
crates/web-sys/webidls/enabled/Document.webidl
vendored
@ -185,13 +185,6 @@ partial interface Document {
|
|||||||
[Pref="dom.select_events.enabled"]
|
[Pref="dom.select_events.enabled"]
|
||||||
attribute EventHandler onselectionchange;
|
attribute EventHandler onselectionchange;
|
||||||
|
|
||||||
/**
|
|
||||||
* True if this document is synthetic : stand alone image, video, audio file,
|
|
||||||
* etc.
|
|
||||||
*/
|
|
||||||
/*Non standard
|
|
||||||
[Func="IsChromeOrXBL"] readonly attribute boolean mozSyntheticDocument;
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* Returns the script element whose script is currently being processed.
|
* Returns the script element whose script is currently being processed.
|
||||||
*
|
*
|
||||||
@ -361,85 +354,6 @@ partial interface Document {
|
|||||||
readonly attribute SVGSVGElement? rootElement;
|
readonly attribute SVGSVGElement? rootElement;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla extensions of various sorts
|
|
||||||
partial interface Document {
|
|
||||||
// XBL support. Wish we could make these [ChromeOnly], but
|
|
||||||
// that would likely break bindings running with the page principal.
|
|
||||||
/*Non standard
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
NodeList? getAnonymousNodes(Element elt);
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
Element? getAnonymousElementByAttribute(Element elt, DOMString attrName,
|
|
||||||
DOMString attrValue);
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
Element? getBindingParent(Node node);
|
|
||||||
[Throws, Func="IsChromeOrXBL", NeedsSubjectPrincipal]
|
|
||||||
void loadBindingDocument(DOMString documentURL);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Touch bits
|
|
||||||
// XXXbz I can't find the sane spec for this stuff, so just cribbing
|
|
||||||
// from our xpidl for now.
|
|
||||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
||||||
Touch createTouch(optional Window? view = null,
|
|
||||||
optional EventTarget? target = null,
|
|
||||||
optional long identifier = 0,
|
|
||||||
optional long pageX = 0,
|
|
||||||
optional long pageY = 0,
|
|
||||||
optional long screenX = 0,
|
|
||||||
optional long screenY = 0,
|
|
||||||
optional long clientX = 0,
|
|
||||||
optional long clientY = 0,
|
|
||||||
optional long radiusX = 0,
|
|
||||||
optional long radiusY = 0,
|
|
||||||
optional float rotationAngle = 0,
|
|
||||||
optional float force = 0);
|
|
||||||
// XXXbz a hack to get around the fact that we don't support variadics as
|
|
||||||
// distinguishing arguments yet. Once this hack is removed. we can also
|
|
||||||
// remove the corresponding overload on nsIDocument, since Touch... and
|
|
||||||
// sequence<Touch> look the same in the C++.
|
|
||||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
||||||
TouchList createTouchList(Touch touch, Touch... touches);
|
|
||||||
// XXXbz and another hack for the fact that we can't usefully have optional
|
|
||||||
// distinguishing arguments but need a working zero-arg form of
|
|
||||||
// createTouchList().
|
|
||||||
/*TODO
|
|
||||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
||||||
TouchList createTouchList();
|
|
||||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
||||||
TouchList createTouchList(sequence<Touch> touches);
|
|
||||||
*/
|
|
||||||
|
|
||||||
[ChromeOnly]
|
|
||||||
attribute boolean styleSheetChangeEventsEnabled;
|
|
||||||
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
void obsoleteSheet(URI sheetURI);
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
void obsoleteSheet(DOMString sheetURI);
|
|
||||||
|
|
||||||
[ChromeOnly] readonly attribute nsIDocShell? docShell;
|
|
||||||
|
|
||||||
[ChromeOnly] readonly attribute DOMString contentLanguage;
|
|
||||||
|
|
||||||
[ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
|
|
||||||
|
|
||||||
// Blocks the initial document parser until the given promise is settled.
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
Promise<any> blockParsing(Promise<any> promise,
|
|
||||||
optional BlockParsingOptions options);
|
|
||||||
|
|
||||||
// like documentURI, except that for error pages, it returns the URI we were
|
|
||||||
// trying to load when we hit an error, rather than the error page's own URI.
|
|
||||||
[ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
|
|
||||||
|
|
||||||
// A promise that is resolved, with this document itself, when we have both
|
|
||||||
// fired DOMContentLoaded and are ready to start layout. This is used for the
|
|
||||||
// "document_idle" webextension script injection point.
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
readonly attribute Promise<Document> documentReadyForIdle;
|
|
||||||
};
|
|
||||||
|
|
||||||
dictionary BlockParsingOptions {
|
dictionary BlockParsingOptions {
|
||||||
/**
|
/**
|
||||||
* If true, blocks script-created parsers (created via document.open()) in
|
* If true, blocks script-created parsers (created via document.open()) in
|
||||||
@ -507,16 +421,6 @@ partial interface Document {
|
|||||||
void notifyUserGestureActivation();
|
void notifyUserGestureActivation();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Extension to give chrome and XBL JS the ability to determine whether
|
|
||||||
// the document is sandboxed without permission to run scripts
|
|
||||||
// and whether inline scripts are blocked by the document's CSP.
|
|
||||||
/*Non standard
|
|
||||||
partial interface Document {
|
|
||||||
[Func="IsChromeOrXBL"] readonly attribute boolean hasScriptsBlockedBySandbox;
|
|
||||||
[Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
// For more information on Flash classification, see
|
// For more information on Flash classification, see
|
||||||
// toolkit/components/url-classifier/flash-block-lists.rst
|
// toolkit/components/url-classifier/flash-block-lists.rst
|
||||||
enum FlashClassification {
|
enum FlashClassification {
|
||||||
|
@ -225,15 +225,6 @@ partial interface Element {
|
|||||||
readonly attribute long clientLeft;
|
readonly attribute long clientLeft;
|
||||||
readonly attribute long clientWidth;
|
readonly attribute long clientWidth;
|
||||||
readonly attribute long clientHeight;
|
readonly attribute long clientHeight;
|
||||||
|
|
||||||
// Mozilla specific stuff
|
|
||||||
/* The minimum/maximum offset that the element can be scrolled to
|
|
||||||
(i.e., the value that scrollLeft/scrollTop would be clamped to if they were
|
|
||||||
set to arbitrarily large values. */
|
|
||||||
[ChromeOnly] readonly attribute long scrollTopMin;
|
|
||||||
readonly attribute long scrollTopMax;
|
|
||||||
[ChromeOnly] readonly attribute long scrollLeftMin;
|
|
||||||
readonly attribute long scrollLeftMax;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
|
// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
|
||||||
|
25
crates/web-sys/webidls/enabled/Event.webidl
vendored
25
crates/web-sys/webidls/enabled/Event.webidl
vendored
@ -58,31 +58,6 @@ interface Event {
|
|||||||
attribute boolean cancelBubble;
|
attribute boolean cancelBubble;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla specific legacy stuff.
|
|
||||||
partial interface Event {
|
|
||||||
const long ALT_MASK = 0x00000001;
|
|
||||||
const long CONTROL_MASK = 0x00000002;
|
|
||||||
const long SHIFT_MASK = 0x00000004;
|
|
||||||
const long META_MASK = 0x00000008;
|
|
||||||
|
|
||||||
/** The original target of the event, before any retargetings. */
|
|
||||||
readonly attribute EventTarget? originalTarget;
|
|
||||||
/**
|
|
||||||
* The explicit original target of the event. If the event was retargeted
|
|
||||||
* for some reason other than an anonymous boundary crossing, this will be set
|
|
||||||
* to the target before the retargeting occurs. For example, mouse events
|
|
||||||
* are retargeted to their parent node when they happen over text nodes (bug
|
|
||||||
* 185889), and in that case .target will show the parent and
|
|
||||||
* .explicitOriginalTarget will show the text node.
|
|
||||||
* .explicitOriginalTarget differs from .originalTarget in that it will never
|
|
||||||
* contain anonymous content.
|
|
||||||
*/
|
|
||||||
readonly attribute EventTarget? explicitOriginalTarget;
|
|
||||||
[ChromeOnly] readonly attribute EventTarget? composedTarget;
|
|
||||||
[ChromeOnly] readonly attribute boolean multipleActionsPrevented;
|
|
||||||
[ChromeOnly] readonly attribute boolean isSynthesized;
|
|
||||||
};
|
|
||||||
|
|
||||||
dictionary EventInit {
|
dictionary EventInit {
|
||||||
boolean bubbles = false;
|
boolean bubbles = false;
|
||||||
boolean cancelable = false;
|
boolean cancelable = false;
|
||||||
|
@ -116,11 +116,6 @@ interface GlobalEventHandlers {
|
|||||||
[Pref="dom.w3c_pointer_events.enabled"]
|
[Pref="dom.w3c_pointer_events.enabled"]
|
||||||
attribute EventHandler onlostpointercapture;
|
attribute EventHandler onlostpointercapture;
|
||||||
|
|
||||||
// Mozilla-specific handlers. Unprefixed handlers live in
|
|
||||||
// Document rather than here.
|
|
||||||
attribute EventHandler onmozfullscreenchange;
|
|
||||||
attribute EventHandler onmozfullscreenerror;
|
|
||||||
|
|
||||||
// CSS-Animation and CSS-Transition handlers.
|
// CSS-Animation and CSS-Transition handlers.
|
||||||
attribute EventHandler onanimationcancel;
|
attribute EventHandler onanimationcancel;
|
||||||
attribute EventHandler onanimationend;
|
attribute EventHandler onanimationend;
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
|
|
||||||
dictionary EventListenerOptions {
|
dictionary EventListenerOptions {
|
||||||
boolean capture = false;
|
boolean capture = false;
|
||||||
/* Setting to true make the listener be added to the system group. */
|
|
||||||
/*Non standard
|
|
||||||
[Func="ThreadSafeIsChromeOrXBL"]
|
|
||||||
boolean mozSystemGroup = false;
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary AddEventListenerOptions : EventListenerOptions {
|
dictionary AddEventListenerOptions : EventListenerOptions {
|
||||||
|
@ -33,23 +33,6 @@ interface HTMLCanvasElement : HTMLElement {
|
|||||||
optional any encoderOptions);
|
optional any encoderOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla specific bits
|
|
||||||
partial interface HTMLCanvasElement {
|
|
||||||
[Pure, SetterThrows]
|
|
||||||
attribute boolean mozOpaque;
|
|
||||||
[Throws, NeedsSubjectPrincipal]
|
|
||||||
File mozGetAsFile(DOMString name, optional DOMString? type = null);
|
|
||||||
// A Mozilla-only extension to get a canvas context backed by double-buffered
|
|
||||||
// shared memory. Only privileged callers can call this.
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
nsISupports? MozGetIPCContext(DOMString contextId);
|
|
||||||
|
|
||||||
attribute PrintCallback? mozPrintCallback;
|
|
||||||
|
|
||||||
[Throws, Pref="canvas.capturestream.enabled", NeedsSubjectPrincipal]
|
|
||||||
CanvasCaptureMediaStream captureStream(optional double frameRate);
|
|
||||||
};
|
|
||||||
|
|
||||||
// For OffscreenCanvas
|
// For OffscreenCanvas
|
||||||
// Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
|
// Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
|
||||||
partial interface HTMLCanvasElement {
|
partial interface HTMLCanvasElement {
|
||||||
|
@ -193,20 +193,6 @@ partial interface HTMLInputElement {
|
|||||||
AutocompleteInfo? getAutocompleteInfo();
|
AutocompleteInfo? getAutocompleteInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]
|
|
||||||
interface MozEditableElement {
|
|
||||||
[Pure, ChromeOnly]
|
|
||||||
readonly attribute nsIEditor? editor;
|
|
||||||
|
|
||||||
/*Non standard
|
|
||||||
// This is similar to set .value on nsIDOMInput/TextAreaElements, but handling
|
|
||||||
// of the value change is closer to the normal user input, so 'change' event
|
|
||||||
// for example will be dispatched when focusing out the element.
|
|
||||||
[Func="IsChromeOrXBL", NeedsSubjectPrincipal]
|
|
||||||
void setUserInput(DOMString input);
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
HTMLInputElement implements MozEditableElement;
|
HTMLInputElement implements MozEditableElement;
|
||||||
|
|
||||||
/*Non standard
|
/*Non standard
|
||||||
@ -264,31 +250,6 @@ partial interface HTMLInputElement {
|
|||||||
[Pref="dom.forms.datetime", ChromeOnly,
|
[Pref="dom.forms.datetime", ChromeOnly,
|
||||||
BinaryName="getMaximumAsDouble"]
|
BinaryName="getMaximumAsDouble"]
|
||||||
double getMaximum();
|
double getMaximum();
|
||||||
|
|
||||||
/*Non standard
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
|
|
||||||
void openDateTimePicker(optional DateTimeValue initialValue);
|
|
||||||
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
|
|
||||||
void updateDateTimePicker(optional DateTimeValue value);
|
|
||||||
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
|
|
||||||
void closeDateTimePicker();
|
|
||||||
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
|
|
||||||
void setFocusState(boolean aIsFocused);
|
|
||||||
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
|
|
||||||
void updateValidityState();
|
|
||||||
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL",
|
|
||||||
BinaryName="getStepAsDouble"]
|
|
||||||
double getStep();
|
|
||||||
|
|
||||||
[Pref="dom.forms.datetime", Func="IsChromeOrXBL",
|
|
||||||
BinaryName="getStepBaseAsDouble"]
|
|
||||||
double getStepBase();
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface HTMLInputElement {
|
partial interface HTMLInputElement {
|
||||||
|
@ -98,55 +98,6 @@ interface HTMLMediaElement : HTMLElement {
|
|||||||
optional DOMString language = "");
|
optional DOMString language = "");
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla extensions:
|
|
||||||
partial interface HTMLMediaElement {
|
|
||||||
[Func="HasDebuggerOrTabsPrivilege"]
|
|
||||||
readonly attribute MediaSource? mozMediaSourceObject;
|
|
||||||
[Func="HasDebuggerOrTabsPrivilege"]
|
|
||||||
readonly attribute DOMString mozDebugReaderData;
|
|
||||||
[Func="HasDebuggerOrTabsPrivilege", NewObject]
|
|
||||||
Promise<DOMString> mozRequestDebugInfo();
|
|
||||||
|
|
||||||
[Func="HasDebuggerOrTabsPrivilege", NewObject]
|
|
||||||
static void mozEnableDebugLog();
|
|
||||||
[Func="HasDebuggerOrTabsPrivilege", NewObject]
|
|
||||||
Promise<DOMString> mozRequestDebugLog();
|
|
||||||
|
|
||||||
[Pref="media.test.dumpDebugInfo"]
|
|
||||||
Promise<void> mozDumpDebugInfo();
|
|
||||||
|
|
||||||
attribute MediaStream? srcObject;
|
|
||||||
|
|
||||||
attribute boolean mozPreservesPitch;
|
|
||||||
|
|
||||||
/*Non standard
|
|
||||||
// NB: for internal use with the video controls:
|
|
||||||
[Func="IsChromeOrXBL"] attribute boolean mozAllowCasting;
|
|
||||||
[Func="IsChromeOrXBL"] attribute boolean mozIsCasting;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Mozilla extension: stream capture
|
|
||||||
[Throws]
|
|
||||||
MediaStream mozCaptureStream();
|
|
||||||
[Throws]
|
|
||||||
MediaStream mozCaptureStreamUntilEnded();
|
|
||||||
readonly attribute boolean mozAudioCaptured;
|
|
||||||
|
|
||||||
// Mozilla extension: return embedded metadata from the stream as a
|
|
||||||
// JSObject with key:value pairs for each tag. This can be used by
|
|
||||||
// player interfaces to display the song title, artist, etc.
|
|
||||||
[Throws]
|
|
||||||
object? mozGetMetadata();
|
|
||||||
|
|
||||||
// Mozilla extension: provides access to the fragment end time if
|
|
||||||
// the media element has a fragment URI for the currentSrc, otherwise
|
|
||||||
// it is equal to the media duration.
|
|
||||||
readonly attribute double mozFragmentEnd;
|
|
||||||
|
|
||||||
[ChromeOnly]
|
|
||||||
void reportCanPlayTelemetry();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Encrypted Media Extensions
|
// Encrypted Media Extensions
|
||||||
partial interface HTMLMediaElement {
|
partial interface HTMLMediaElement {
|
||||||
readonly attribute MediaKeys? mediaKeys;
|
readonly attribute MediaKeys? mediaKeys;
|
||||||
@ -160,16 +111,6 @@ partial interface HTMLMediaElement {
|
|||||||
attribute EventHandler onwaitingforkey;
|
attribute EventHandler onwaitingforkey;
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is just for testing
|
|
||||||
partial interface HTMLMediaElement {
|
|
||||||
[Pref="media.useAudioChannelService.testing"]
|
|
||||||
readonly attribute double computedVolume;
|
|
||||||
[Pref="media.useAudioChannelService.testing"]
|
|
||||||
readonly attribute boolean computedMuted;
|
|
||||||
[Pref="media.useAudioChannelService.testing"]
|
|
||||||
readonly attribute unsigned long computedSuspended;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HTMLMediaElement::seekToNextFrame() is a Mozilla experimental feature.
|
* HTMLMediaElement::seekToNextFrame() is a Mozilla experimental feature.
|
||||||
*
|
*
|
||||||
|
@ -30,33 +30,3 @@ partial interface HTMLMenuElement {
|
|||||||
[CEReactions, SetterThrows]
|
[CEReactions, SetterThrows]
|
||||||
attribute boolean compact;
|
attribute boolean compact;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla specific stuff
|
|
||||||
partial interface HTMLMenuElement {
|
|
||||||
/**
|
|
||||||
* Creates and dispatches a trusted event named "show".
|
|
||||||
* The event is not cancelable and does not bubble.
|
|
||||||
* See http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
void sendShowEvent();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a native menu builder. The builder type is dependent on menu type.
|
|
||||||
* Currently, it returns the @mozilla.org/content/html-menu-builder;1
|
|
||||||
* component. Toolbar menus are not yet supported (the method returns null).
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
MenuBuilder? createBuilder();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Builds a menu by iterating over menu children.
|
|
||||||
* See http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#building-menus-and-toolbars
|
|
||||||
* The caller can use a native builder by calling createBuilder() or provide
|
|
||||||
* a custom builder that implements the nsIMenuBuilder interface.
|
|
||||||
* A custom builder can be used for example to build native context menus
|
|
||||||
* that are not defined using <menupopup>.
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
void build(MenuBuilder aBuilder);
|
|
||||||
};
|
|
||||||
|
@ -21,12 +21,6 @@ interface HTMLTableCellElement : HTMLElement {
|
|||||||
[CEReactions, SetterThrows]
|
[CEReactions, SetterThrows]
|
||||||
attribute DOMString headers;
|
attribute DOMString headers;
|
||||||
readonly attribute long cellIndex;
|
readonly attribute long cellIndex;
|
||||||
|
|
||||||
// Mozilla-specific extensions
|
|
||||||
[CEReactions, SetterThrows]
|
|
||||||
attribute DOMString abbr;
|
|
||||||
[CEReactions, SetterThrows]
|
|
||||||
attribute DOMString scope;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface HTMLTableCellElement {
|
partial interface HTMLTableCellElement {
|
||||||
|
@ -23,40 +23,6 @@ interface HTMLVideoElement : HTMLMediaElement {
|
|||||||
attribute DOMString poster;
|
attribute DOMString poster;
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface HTMLVideoElement {
|
|
||||||
// A count of the number of video frames that have demuxed from the media
|
|
||||||
// resource. If we were playing perfectly, we'd be able to paint this many
|
|
||||||
// frames.
|
|
||||||
readonly attribute unsigned long mozParsedFrames;
|
|
||||||
|
|
||||||
// A count of the number of frames that have been decoded. We may drop
|
|
||||||
// frames if the decode is taking too much time.
|
|
||||||
readonly attribute unsigned long mozDecodedFrames;
|
|
||||||
|
|
||||||
// A count of the number of frames that have been presented to the rendering
|
|
||||||
// pipeline. We may drop frames if they arrive late at the renderer.
|
|
||||||
readonly attribute unsigned long mozPresentedFrames;
|
|
||||||
|
|
||||||
// Number of presented frames which were painted on screen.
|
|
||||||
readonly attribute unsigned long mozPaintedFrames;
|
|
||||||
|
|
||||||
// Time which the last painted video frame was late by, in seconds.
|
|
||||||
readonly attribute double mozFrameDelay;
|
|
||||||
|
|
||||||
// True if the video has an audio track available.
|
|
||||||
readonly attribute boolean mozHasAudio;
|
|
||||||
|
|
||||||
/*Non standard
|
|
||||||
// Attributes for builtin video controls to lock screen orientation.
|
|
||||||
// True if video controls should lock orientation when fullscreen.
|
|
||||||
[Pref="media.videocontrols.lock-video-orientation", Func="IsChromeOrXBL"]
|
|
||||||
readonly attribute boolean mozOrientationLockEnabled;
|
|
||||||
// True if screen orientation is locked by video controls.
|
|
||||||
[Pref="media.videocontrols.lock-video-orientation", Func="IsChromeOrXBL"]
|
|
||||||
attribute boolean mozIsOrientationLocked;
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
|
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
|
||||||
partial interface HTMLVideoElement {
|
partial interface HTMLVideoElement {
|
||||||
[Func="mozilla::dom::MediaSource::Enabled", NewObject]
|
[Func="mozilla::dom::MediaSource::Enabled", NewObject]
|
||||||
|
@ -17,21 +17,4 @@ dictionary MediaTrackSettings {
|
|||||||
boolean noiseSuppression;
|
boolean noiseSuppression;
|
||||||
boolean autoGainControl;
|
boolean autoGainControl;
|
||||||
long channelCount;
|
long channelCount;
|
||||||
|
|
||||||
// Mozilla-specific extensions:
|
|
||||||
|
|
||||||
// http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
|
|
||||||
// OBE by http://w3c.github.io/mediacapture-screen-share
|
|
||||||
|
|
||||||
DOMString mediaSource;
|
|
||||||
|
|
||||||
// Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
|
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
|
|
||||||
|
|
||||||
long long browserWindow;
|
|
||||||
boolean scrollWithPage;
|
|
||||||
long viewportOffsetX;
|
|
||||||
long viewportOffsetY;
|
|
||||||
long viewportWidth;
|
|
||||||
long viewportHeight;
|
|
||||||
};
|
};
|
||||||
|
@ -23,21 +23,4 @@ dictionary MediaTrackSupportedConstraints {
|
|||||||
boolean channelCount = true;
|
boolean channelCount = true;
|
||||||
boolean deviceId = true;
|
boolean deviceId = true;
|
||||||
boolean groupId; // to be supported
|
boolean groupId; // to be supported
|
||||||
|
|
||||||
// Mozilla-specific extensions:
|
|
||||||
|
|
||||||
// http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
|
|
||||||
// OBE by http://w3c.github.io/mediacapture-screen-share
|
|
||||||
|
|
||||||
boolean mediaSource = true;
|
|
||||||
|
|
||||||
// Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
|
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
|
|
||||||
|
|
||||||
boolean browserWindow = true;
|
|
||||||
boolean scrollWithPage = true;
|
|
||||||
boolean viewportOffsetX = true;
|
|
||||||
boolean viewportOffsetY = true;
|
|
||||||
boolean viewportWidth = true;
|
|
||||||
boolean viewportHeight = true;
|
|
||||||
};
|
};
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
|
|
||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface MenuBoxObject : BoxObject {
|
|
||||||
|
|
||||||
void openMenu(boolean openFlag);
|
|
||||||
|
|
||||||
attribute Element? activeChild;
|
|
||||||
|
|
||||||
boolean handleKeyPress(KeyboardEvent keyEvent);
|
|
||||||
|
|
||||||
readonly attribute boolean openedWithKey;
|
|
||||||
|
|
||||||
};
|
|
52
crates/web-sys/webidls/enabled/Navigator.webidl
vendored
52
crates/web-sys/webidls/enabled/Navigator.webidl
vendored
@ -158,58 +158,6 @@ partial interface Navigator {
|
|||||||
readonly attribute MediaCapabilities mediaCapabilities;
|
readonly attribute MediaCapabilities mediaCapabilities;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mozilla-specific extensions
|
|
||||||
|
|
||||||
// Chrome-only interface for Vibration API permission handling.
|
|
||||||
partial interface Navigator {
|
|
||||||
/* Set permission state to device vibration.
|
|
||||||
* @param permitted permission state (true for allowing vibration)
|
|
||||||
* @param persistent make the permission session-persistent
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
void setVibrationPermission(boolean permitted,
|
|
||||||
optional boolean persistent = true);
|
|
||||||
};
|
|
||||||
|
|
||||||
callback interface MozIdleObserver {
|
|
||||||
// Time is in seconds and is read only when idle observers are added
|
|
||||||
// and removed.
|
|
||||||
readonly attribute unsigned long time;
|
|
||||||
void onidle();
|
|
||||||
void onactive();
|
|
||||||
};
|
|
||||||
|
|
||||||
partial interface Navigator {
|
|
||||||
[Throws, Constant, Cached, NeedsCallerType]
|
|
||||||
readonly attribute DOMString oscpu;
|
|
||||||
// WebKit/Blink support this; Trident/Presto do not.
|
|
||||||
readonly attribute DOMString vendor;
|
|
||||||
// WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
|
|
||||||
readonly attribute DOMString vendorSub;
|
|
||||||
// WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
|
|
||||||
readonly attribute DOMString productSub;
|
|
||||||
// WebKit/Blink/Trident/Presto support this.
|
|
||||||
readonly attribute boolean cookieEnabled;
|
|
||||||
[Throws, Constant, Cached, NeedsCallerType]
|
|
||||||
readonly attribute DOMString buildID;
|
|
||||||
|
|
||||||
// WebKit/Blink/Trident/Presto support this.
|
|
||||||
[Affects=Nothing, DependsOn=Nothing]
|
|
||||||
boolean javaEnabled();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigator requests to add an idle observer to the existing window.
|
|
||||||
*/
|
|
||||||
[Throws, ChromeOnly]
|
|
||||||
void addIdleObserver(MozIdleObserver aIdleObserver);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigator requests to remove an idle observer from the existing window.
|
|
||||||
*/
|
|
||||||
[Throws, ChromeOnly]
|
|
||||||
void removeIdleObserver(MozIdleObserver aIdleObserver);
|
|
||||||
};
|
|
||||||
|
|
||||||
// NetworkInformation
|
// NetworkInformation
|
||||||
partial interface Navigator {
|
partial interface Navigator {
|
||||||
[Throws, Pref="dom.netinfo.enabled"]
|
[Throws, Pref="dom.netinfo.enabled"]
|
||||||
|
116
crates/web-sys/webidls/enabled/Node.webidl
vendored
116
crates/web-sys/webidls/enabled/Node.webidl
vendored
@ -101,122 +101,6 @@ interface Node : EventTarget {
|
|||||||
DOMString? lookupNamespaceURI(DOMString? prefix);
|
DOMString? lookupNamespaceURI(DOMString? prefix);
|
||||||
[Pure]
|
[Pure]
|
||||||
boolean isDefaultNamespace(DOMString? namespace);
|
boolean isDefaultNamespace(DOMString? namespace);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
[ChromeOnly]
|
|
||||||
readonly attribute Principal nodePrincipal;
|
|
||||||
[ChromeOnly]
|
|
||||||
readonly attribute URI? baseURIObject;
|
|
||||||
[ChromeOnly]
|
|
||||||
DOMString generateXPath();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method provides a fast-path for the Fluent localization system to
|
|
||||||
* bypass the slowdowns in performance during initial document translation.
|
|
||||||
* The slowdowns are specific to XBL+Stylo.
|
|
||||||
* To learn more, see bug 1441037.
|
|
||||||
*
|
|
||||||
* The API is designed to fit into the DOMLocalization flow with minimal
|
|
||||||
* overhead, which dictates much of its signature.
|
|
||||||
* It takes the following steps:
|
|
||||||
*
|
|
||||||
* 1) The API can be called at any point on any DOM element and it
|
|
||||||
* synchronously scans the element subtree for all children with
|
|
||||||
* `data-l10n-id` attribute set.
|
|
||||||
*
|
|
||||||
* 2) Next, the API collects all of the l10n attributes
|
|
||||||
* (l10n-id, l10n-args and l10n-attrs), and passes them to the
|
|
||||||
* callback function together with three `Element` properties:
|
|
||||||
* `name` - name of the element as lowercase
|
|
||||||
* `namespaceURI` - namespace URI
|
|
||||||
* `type` - the type prop of the element (used for input sanitization)
|
|
||||||
*
|
|
||||||
* 3) The callback function is responsible for (asynchronously) collecting
|
|
||||||
* the translations for all l10n id+args pairs, sanitizing them and then
|
|
||||||
* return them back to this API.
|
|
||||||
*
|
|
||||||
* 4) The API takes the list of elements collected in step (1) and their
|
|
||||||
* translations and applies all of the translation values onto
|
|
||||||
* the elements.
|
|
||||||
*
|
|
||||||
* 5) The API returns a list with empty slots for all translated elements
|
|
||||||
* and references to elements that could not be translated.
|
|
||||||
*
|
|
||||||
* 6) The JS handles the translations of remaining elements.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Through the whole cycle, the API uses the same list of elements and
|
|
||||||
* corresponding translations. It means that after step (1), the element
|
|
||||||
* at index 1 will match the l10nData at index 1, translations at index 1
|
|
||||||
* and in the final return list, the element will be also stored at index 1
|
|
||||||
* or the slot will be empty if the translations was applied on the C++ side.
|
|
||||||
*
|
|
||||||
* Note: There are several reasons why the JS callback may pass undefined for
|
|
||||||
* a given element including missing translation, or the need to
|
|
||||||
* translate the element using DOM Overlays.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Example of use from JS:
|
|
||||||
*
|
|
||||||
* async function translateFragment(frag) {
|
|
||||||
* let untranslatedElements = await frag.localize(
|
|
||||||
* async cb(l10nItems) => { // 1
|
|
||||||
* let trans = await getTranslations(l10nItems); // 2
|
|
||||||
* return trans;
|
|
||||||
* }
|
|
||||||
* );
|
|
||||||
*
|
|
||||||
* annotateMissingTranslations(untranslatedElements); // 3
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* [1] l10nItems == [
|
|
||||||
* {
|
|
||||||
* l10nId: "key1",
|
|
||||||
* l10nArgs: null,
|
|
||||||
* l10nAttrs: null,
|
|
||||||
* name: "button"
|
|
||||||
* namespaceURI: "..."
|
|
||||||
* type: null
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* l10nId: "key2",
|
|
||||||
* l10nArgs: {unreadCount: 5},
|
|
||||||
* l10nAttrs: null,
|
|
||||||
* name: "label"
|
|
||||||
* namespaceURI: "..."
|
|
||||||
* type: null
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* l10nId: "key3",
|
|
||||||
* l10nArgs: null,
|
|
||||||
* l10nAttrs: "title",
|
|
||||||
* name: "window"
|
|
||||||
* namespaceURI: "..."
|
|
||||||
* type: null
|
|
||||||
* },
|
|
||||||
* ]
|
|
||||||
* [2] trans == [
|
|
||||||
* {value: "Key 1", attributes: {accesskey: "K"} },
|
|
||||||
* undefined,
|
|
||||||
* {value: null, attributes: {title: "Unread emails: 5"} },
|
|
||||||
* ]
|
|
||||||
* [3] untranslatedElements == [
|
|
||||||
* ,
|
|
||||||
* <label>
|
|
||||||
* ,
|
|
||||||
* ]
|
|
||||||
*
|
|
||||||
* For exact dictionary structures, see `L10nUtils.webidl`.
|
|
||||||
*/
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
Promise<void> localize(L10nCallback l10nCallback);
|
|
||||||
|
|
||||||
/*Unsupported ifdef
|
|
||||||
#ifdef ACCESSIBILITY
|
|
||||||
[Func="mozilla::dom::AccessibleNode::IsAOMEnabled", SameObject]
|
|
||||||
readonly attribute AccessibleNode? accessibleNode;
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*TODO
|
/*TODO
|
||||||
|
@ -26,7 +26,4 @@ interface SVGLengthList {
|
|||||||
SVGLength removeItem(unsigned long index);
|
SVGLength removeItem(unsigned long index);
|
||||||
[Throws]
|
[Throws]
|
||||||
SVGLength appendItem(SVGLength newItem);
|
SVGLength appendItem(SVGLength newItem);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
readonly attribute unsigned long length; // synonym for numberOfItems
|
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,4 @@ interface SVGNumberList {
|
|||||||
SVGNumber removeItem(unsigned long index);
|
SVGNumber removeItem(unsigned long index);
|
||||||
[Throws]
|
[Throws]
|
||||||
SVGNumber appendItem(SVGNumber newItem);
|
SVGNumber appendItem(SVGNumber newItem);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
readonly attribute unsigned long length; // synonym for numberOfItems
|
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,4 @@ interface SVGPathSegList {
|
|||||||
readonly attribute unsigned long numberOfItems;
|
readonly attribute unsigned long numberOfItems;
|
||||||
[Throws]
|
[Throws]
|
||||||
getter SVGPathSeg getItem(unsigned long index);
|
getter SVGPathSeg getItem(unsigned long index);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
readonly attribute unsigned long length; // synonym for numberOfItems
|
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,4 @@ interface SVGPointList {
|
|||||||
SVGPoint removeItem(unsigned long index);
|
SVGPoint removeItem(unsigned long index);
|
||||||
[Throws]
|
[Throws]
|
||||||
SVGPoint appendItem(SVGPoint newItem);
|
SVGPoint appendItem(SVGPoint newItem);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
readonly attribute unsigned long length; // synonym for numberOfItems
|
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,4 @@ interface SVGTransformList {
|
|||||||
SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
|
SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
|
||||||
[Throws]
|
[Throws]
|
||||||
SVGTransform? consolidate();
|
SVGTransform? consolidate();
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
readonly attribute unsigned long length; // synonym for numberOfItems
|
|
||||||
};
|
};
|
||||||
|
@ -1,200 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The SimpleGestureEvent interface is the datatype for all
|
|
||||||
* Mozilla-specific simple gesture events in the Document Object Model.
|
|
||||||
*
|
|
||||||
* The following events are generated:
|
|
||||||
*
|
|
||||||
* MozSwipeGestureMayStart - Generated when the user starts a horizontal
|
|
||||||
* swipe across the input device, but before we know whether the user
|
|
||||||
* is actually scrolling past a scroll edge.
|
|
||||||
* This event asks two questions: Should a swipe really be started, and
|
|
||||||
* in which directions should the user be able to swipe? The first
|
|
||||||
* question is answered by event listeners by calling or not calling
|
|
||||||
* preventDefault() on the event. Since a swipe swallows all scroll
|
|
||||||
* events, the default action of the swipe start event is *not* to
|
|
||||||
* start a swipe. Call preventDefault() if you want a swipe to be
|
|
||||||
* started. Doing so won't necessarily result in a swipe being started,
|
|
||||||
* it only communicates an intention. Once Gecko determines whether a
|
|
||||||
* swipe should actually be started, it will send a MozSwipeGestureStart
|
|
||||||
* event.
|
|
||||||
* The second question (swipe-able directions) is answered in the
|
|
||||||
* allowedDirections field.
|
|
||||||
*
|
|
||||||
* MozSwipeGestureStart - This event signals the start of a swipe.
|
|
||||||
* It guarantees a future MozSwipeGestureEnd event that will signal
|
|
||||||
* the end of a swipe animation.
|
|
||||||
*
|
|
||||||
* MozSwipeGestureUpdate - Generated periodically while the user is
|
|
||||||
* continuing a horizontal swipe gesture. The "delta" value represents
|
|
||||||
* the current absolute gesture amount. This event may even be sent
|
|
||||||
* after a MozSwipeGesture event fired in order to allow for fluid
|
|
||||||
* completion of a swipe animation. The direction value is meaningless
|
|
||||||
* on swipe update events.
|
|
||||||
*
|
|
||||||
* MozSwipeGestureEnd - Generated when the swipe animation is completed.
|
|
||||||
*
|
|
||||||
* MozSwipeGesture - Generated when the user releases a swipe across
|
|
||||||
* across the input device. This event signals that the actual swipe
|
|
||||||
* operation is complete, even though the animation might not be finished
|
|
||||||
* yet. This event can be sent without accompanying start / update / end
|
|
||||||
* events, and it can also be handled on its own if the consumer doesn't
|
|
||||||
* want to handle swipe animation events.
|
|
||||||
* Only the direction value has any significance, the delta value is
|
|
||||||
* meaningless.
|
|
||||||
*
|
|
||||||
* MozMagnifyGestureStart - Generated when the user begins the magnify
|
|
||||||
* ("pinch") gesture. The "delta" value represents the initial
|
|
||||||
* movement.
|
|
||||||
*
|
|
||||||
* MozMagnifyGestureUpdate - Generated periodically while the user is
|
|
||||||
* continuing the magnify ("pinch") gesture. The "delta" value
|
|
||||||
* represents the movement since the last MozMagnifyGestureStart or
|
|
||||||
* MozMagnifyGestureUpdate event.
|
|
||||||
*
|
|
||||||
* MozMagnifyGesture - Generated when the user has completed the
|
|
||||||
* magnify ("pinch") gesture. If you only want to receive a single
|
|
||||||
* event when the magnify gesture is complete, you only need to hook
|
|
||||||
* this event and can safely ignore the MozMagnifyGestureStart and the
|
|
||||||
* MozMagnifyGestureUpdate events. The "delta" value is the cumulative
|
|
||||||
* amount represented by the user's gesture.
|
|
||||||
*
|
|
||||||
* MozRotateGestureStart - Generated when the user begins the rotation
|
|
||||||
* gesture. The "delta" value represents the initial rotation.
|
|
||||||
*
|
|
||||||
* MozRotateGestureUpdate - Generated periodically while the user is
|
|
||||||
* continuing the rotation gesture. The "delta" value represents the
|
|
||||||
* rotation since the last MozRotateGestureStart or
|
|
||||||
* MozRotateGestureUpdate event.
|
|
||||||
*
|
|
||||||
* MozRotateGesture - Generated when the user has completed the
|
|
||||||
* rotation gesture. If you only want to receive a single event when
|
|
||||||
* the rotation gesture is complete, you only need to hook this event
|
|
||||||
* and can safely ignore the MozRotateGestureStart and the
|
|
||||||
* MozRotateGestureUpdate events. The "delta" value is the cumulative
|
|
||||||
* amount of rotation represented by the user's gesture.
|
|
||||||
*
|
|
||||||
* MozTapGesture - Generated when the user executes a two finger
|
|
||||||
* tap gesture on the input device. Client coordinates contain the
|
|
||||||
* center point of the tap.
|
|
||||||
* (XXX On OS X, only Lion (10.7) and up)
|
|
||||||
*
|
|
||||||
* MozPressTapGesture - Generated when the user executes a press
|
|
||||||
* and tap two finger gesture (first finger down, second finger down,
|
|
||||||
* second finger up, first finger up) on the input device.
|
|
||||||
* Client coordinates contain the center pivot point of the action.
|
|
||||||
* (XXX Not implemented on Mac)
|
|
||||||
*
|
|
||||||
* MozEdgeUIGesture - Generated when the user swipes the display to
|
|
||||||
* invoke edge ui.
|
|
||||||
* (XXX Win8 only)
|
|
||||||
*
|
|
||||||
* Default behavior:
|
|
||||||
*
|
|
||||||
* Some operating systems support default behaviors for gesture events
|
|
||||||
* when they are not handled by the application. Consumers should
|
|
||||||
* use event.preventDefault() to prevent default behavior when
|
|
||||||
* consuming events.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface SimpleGestureEvent : MouseEvent
|
|
||||||
{
|
|
||||||
/* Swipe direction constants */
|
|
||||||
const unsigned long DIRECTION_UP = 1;
|
|
||||||
const unsigned long DIRECTION_DOWN = 2;
|
|
||||||
const unsigned long DIRECTION_LEFT = 4;
|
|
||||||
const unsigned long DIRECTION_RIGHT = 8;
|
|
||||||
|
|
||||||
/* Rotational direction constants */
|
|
||||||
const unsigned long ROTATION_COUNTERCLOCKWISE = 1;
|
|
||||||
const unsigned long ROTATION_CLOCKWISE = 2;
|
|
||||||
|
|
||||||
/* Read-write value for swipe events.
|
|
||||||
*
|
|
||||||
* Reports the directions that can be swiped to; multiple directions
|
|
||||||
* should be OR'ed together.
|
|
||||||
*
|
|
||||||
* The allowedDirections field is designed to be set on SwipeGestureMayStart
|
|
||||||
* events by event listeners. Its value after event dispatch determines
|
|
||||||
* the behavior of the swipe animation that might be about to begin.
|
|
||||||
* Specifically, if the user swipes in a direction that can't be swiped
|
|
||||||
* to, the animation will have a bounce effect.
|
|
||||||
* Future SwipeGestureUpdate, SwipeGesture and SwipeGestureEnd events
|
|
||||||
* will carry the allowDirections value that was set on the SwipeMayStart
|
|
||||||
* event. Changing this field on non-SwipeGestureMayStart events doesn't
|
|
||||||
* have any effect.
|
|
||||||
*/
|
|
||||||
attribute unsigned long allowedDirections;
|
|
||||||
|
|
||||||
/* Direction of a gesture. Diagonals are indicated by OR'ing the
|
|
||||||
* applicable constants together.
|
|
||||||
*
|
|
||||||
* Swipes gestures may occur in any direction.
|
|
||||||
*
|
|
||||||
* Magnify gestures do not have a direction.
|
|
||||||
*
|
|
||||||
* Rotation gestures will be either ROTATION_COUNTERCLOCKWISE or
|
|
||||||
* ROTATION_CLOCKWISE.
|
|
||||||
*/
|
|
||||||
readonly attribute unsigned long direction;
|
|
||||||
|
|
||||||
/* Delta value for magnify, rotate and swipe gestures.
|
|
||||||
*
|
|
||||||
* For rotation, the value is in degrees and is positive for
|
|
||||||
* clockwise rotation and negative for counterclockwise
|
|
||||||
* rotation.
|
|
||||||
*
|
|
||||||
* For magnification, the value will be positive for a "zoom in"
|
|
||||||
* (i.e, increased magnification) and negative for a "zoom out"
|
|
||||||
* (i.e., decreased magnification). The particular units
|
|
||||||
* represented by the "delta" are currently implementation specific.
|
|
||||||
*
|
|
||||||
* XXX - The units for measuring magnification are currently
|
|
||||||
* unspecified because the units used by Mac OS X are currently
|
|
||||||
* undocumented. The values are typically in the range of 0.0 to
|
|
||||||
* 100.0, but it is only safe currently to rely on the delta being
|
|
||||||
* positive or negative.
|
|
||||||
*
|
|
||||||
* For swipe start, update and end events, the value is a fraction
|
|
||||||
* of one "page". If the resulting swipe will have DIRECTION_LEFT, the
|
|
||||||
* delta value will be positive; for DIRECTION_RIGHT, delta is negative.
|
|
||||||
* If this seems backwards to you, look at it this way: If the current
|
|
||||||
* page is pushed to the right during the animation (positive delta),
|
|
||||||
* the page left to the current page will be visible after the swipe
|
|
||||||
* (DIRECTION_LEFT).
|
|
||||||
*
|
|
||||||
* Units on Windows represent the difference between the initial
|
|
||||||
* and current/final width between the two touch points on the input
|
|
||||||
* device and are measured in pixels.
|
|
||||||
*/
|
|
||||||
readonly attribute double delta;
|
|
||||||
|
|
||||||
/* Click count value for taps. */
|
|
||||||
readonly attribute unsigned long clickCount;
|
|
||||||
|
|
||||||
void initSimpleGestureEvent(DOMString typeArg,
|
|
||||||
optional boolean canBubbleArg = false,
|
|
||||||
optional boolean cancelableArg = false,
|
|
||||||
optional Window? viewArg = null,
|
|
||||||
optional long detailArg = 0,
|
|
||||||
optional long screenXArg = 0,
|
|
||||||
optional long screenYArg = 0,
|
|
||||||
optional long clientXArg = 0,
|
|
||||||
optional long clientYArg = 0,
|
|
||||||
optional boolean ctrlKeyArg = false,
|
|
||||||
optional boolean altKeyArg = false,
|
|
||||||
optional boolean shiftKeyArg = false,
|
|
||||||
optional boolean metaKeyArg = false,
|
|
||||||
optional short buttonArg = 0,
|
|
||||||
optional EventTarget? relatedTargetArg = null,
|
|
||||||
optional unsigned long allowedDirectionsArg = 0,
|
|
||||||
optional unsigned long directionArg = 0,
|
|
||||||
optional double deltaArg = 0,
|
|
||||||
optional unsigned long clickCount = 0);
|
|
||||||
};
|
|
144
crates/web-sys/webidls/enabled/StreamFilter.webidl
vendored
144
crates/web-sys/webidls/enabled/StreamFilter.webidl
vendored
@ -1,144 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a Mozilla-specific WebExtension API, which is not available to web
|
|
||||||
* content. It allows monitoring and filtering of HTTP response stream data.
|
|
||||||
*
|
|
||||||
* This API should currently be considered experimental, and is not defined by
|
|
||||||
* any standard.
|
|
||||||
*/
|
|
||||||
|
|
||||||
enum StreamFilterStatus {
|
|
||||||
/**
|
|
||||||
* The StreamFilter is not fully initialized. No methods may be called until
|
|
||||||
* a "start" event has been received.
|
|
||||||
*/
|
|
||||||
"uninitialized",
|
|
||||||
/**
|
|
||||||
* The underlying channel is currently transferring data, which will be
|
|
||||||
* dispatched via "data" events.
|
|
||||||
*/
|
|
||||||
"transferringdata",
|
|
||||||
/**
|
|
||||||
* The underlying channel has finished transferring data. Data may still be
|
|
||||||
* written via write() calls at this point.
|
|
||||||
*/
|
|
||||||
"finishedtransferringdata",
|
|
||||||
/**
|
|
||||||
* Data transfer is currently suspended. It may be resumed by a call to
|
|
||||||
* resume(). Data may still be written via write() calls in this state.
|
|
||||||
*/
|
|
||||||
"suspended",
|
|
||||||
/**
|
|
||||||
* The channel has been closed by a call to close(). No further data wlil be
|
|
||||||
* delivered via "data" events, and no further data may be written via
|
|
||||||
* write() calls.
|
|
||||||
*/
|
|
||||||
"closed",
|
|
||||||
/**
|
|
||||||
* The channel has been disconnected by a call to disconnect(). All further
|
|
||||||
* data will be delivered directly, without passing through the filter. No
|
|
||||||
* further events will be dispatched, and no further data may be written by
|
|
||||||
* write() calls.
|
|
||||||
*/
|
|
||||||
"disconnected",
|
|
||||||
/**
|
|
||||||
* An error has occurred and the channel is disconnected. The `error`
|
|
||||||
* property contains the details of the error.
|
|
||||||
*/
|
|
||||||
"failed",
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An interface which allows an extension to intercept, and optionally modify,
|
|
||||||
* response data from an HTTP request.
|
|
||||||
*/
|
|
||||||
[Exposed=(Window,System),
|
|
||||||
Func="mozilla::extensions::StreamFilter::IsAllowedInContext"]
|
|
||||||
interface StreamFilter : EventTarget {
|
|
||||||
/**
|
|
||||||
* Creates a stream filter for the given add-on and the given extension ID.
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
static StreamFilter create(unsigned long long requestId, DOMString addonId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Suspends processing of the request. After this is called, no further data
|
|
||||||
* will be delivered until the request is resumed.
|
|
||||||
*/
|
|
||||||
[Throws]
|
|
||||||
void suspend();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resumes delivery of data for a suspended request.
|
|
||||||
*/
|
|
||||||
[Throws]
|
|
||||||
void resume();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes the request. After this is called, no more data may be written to
|
|
||||||
* the stream, and no further data will be delivered.
|
|
||||||
*
|
|
||||||
* This *must* be called after the consumer is finished writing data, unless
|
|
||||||
* disconnect() has already been called.
|
|
||||||
*/
|
|
||||||
[Throws]
|
|
||||||
void close();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Disconnects the stream filter from the request. After this is called, no
|
|
||||||
* further data will be delivered to the filter, and any unprocessed data
|
|
||||||
* will be written directly to the output stream.
|
|
||||||
*/
|
|
||||||
[Throws]
|
|
||||||
void disconnect();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes a chunk of data to the output stream. This may not be called
|
|
||||||
* before the "start" event has been received.
|
|
||||||
*/
|
|
||||||
[Throws]
|
|
||||||
void write((ArrayBuffer or Uint8Array) data);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the current status of the stream.
|
|
||||||
*/
|
|
||||||
[Pure]
|
|
||||||
readonly attribute StreamFilterStatus status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* After an "error" event has been dispatched, this contains a message
|
|
||||||
* describing the error.
|
|
||||||
*/
|
|
||||||
[Pure]
|
|
||||||
readonly attribute DOMString error;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dispatched with a StreamFilterDataEvent whenever incoming data is
|
|
||||||
* available on the stream. This data will not be delivered to the output
|
|
||||||
* stream unless it is explicitly written via a write() call.
|
|
||||||
*/
|
|
||||||
attribute EventHandler ondata;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dispatched when the stream is opened, and is about to begin delivering
|
|
||||||
* data.
|
|
||||||
*/
|
|
||||||
attribute EventHandler onstart;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dispatched when the stream has closed, and has no more data to deliver.
|
|
||||||
* The output stream remains open and writable until close() is called.
|
|
||||||
*/
|
|
||||||
attribute EventHandler onstop;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dispatched when an error has occurred. No further data may be read or
|
|
||||||
* written after this point.
|
|
||||||
*/
|
|
||||||
attribute EventHandler onerror;
|
|
||||||
};
|
|
@ -1,28 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a Mozilla-specific WebExtension API, which is not available to web
|
|
||||||
* content. It allows monitoring and filtering of HTTP response stream data.
|
|
||||||
*
|
|
||||||
* This API should currently be considered experimental, and is not defined by
|
|
||||||
* any standard.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Constructor(DOMString type, optional StreamFilterDataEventInit eventInitDict),
|
|
||||||
Func="mozilla::extensions::StreamFilter::IsAllowedInContext",
|
|
||||||
Exposed=(Window,System)]
|
|
||||||
interface StreamFilterDataEvent : Event {
|
|
||||||
/**
|
|
||||||
* Contains a chunk of data read from the input stream.
|
|
||||||
*/
|
|
||||||
[Pure]
|
|
||||||
readonly attribute ArrayBuffer data;
|
|
||||||
};
|
|
||||||
|
|
||||||
dictionary StreamFilterDataEventInit : EventInit {
|
|
||||||
required ArrayBuffer data;
|
|
||||||
};
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// A dumping ground for random testing functions
|
|
||||||
|
|
||||||
callback PromiseReturner = Promise<any>();
|
|
||||||
|
|
||||||
[Pref="dom.expose_test_interfaces",
|
|
||||||
Constructor]
|
|
||||||
interface TestFunctions {
|
|
||||||
[Throws]
|
|
||||||
static void throwUncatchableException();
|
|
||||||
|
|
||||||
// Simply returns its argument. Can be used to test Promise
|
|
||||||
// argument processing behavior.
|
|
||||||
static Promise<any> passThroughPromise(Promise<any> arg);
|
|
||||||
|
|
||||||
// Returns whatever Promise the given PromiseReturner returned.
|
|
||||||
[Throws]
|
|
||||||
static Promise<any> passThroughCallbackPromise(PromiseReturner callback);
|
|
||||||
|
|
||||||
// Some basic tests for string binding round-tripping behavior.
|
|
||||||
void setStringData(DOMString arg);
|
|
||||||
|
|
||||||
// Get the string data, using an nsAString argument on the C++ side.
|
|
||||||
// This will just use Assign/operator=, whatever that does.
|
|
||||||
DOMString getStringDataAsAString();
|
|
||||||
|
|
||||||
// Get the string data, but only "length" chars of it, using an
|
|
||||||
// nsAString argument on the C++ side. This will always copy on the
|
|
||||||
// C++ side.
|
|
||||||
DOMString getStringDataAsAString(unsigned long length);
|
|
||||||
|
|
||||||
// Get the string data, but only "length" chars of it, using a
|
|
||||||
// DOMString argument on the C++ side and trying to hand it
|
|
||||||
// stringbuffers. If length not passed, use our full length.
|
|
||||||
DOMString getStringDataAsDOMString(optional unsigned long length);
|
|
||||||
|
|
||||||
// Functions that just punch through to mozITestInterfaceJS.idl
|
|
||||||
[Throws]
|
|
||||||
void testThrowNsresult();
|
|
||||||
[Throws]
|
|
||||||
void testThrowNsresultFromNative();
|
|
||||||
|
|
||||||
// Throws an InvalidStateError to auto-create a rejected promise.
|
|
||||||
[Throws]
|
|
||||||
static Promise<any> throwToRejectPromise();
|
|
||||||
|
|
||||||
// Some attributes for the toJSON to work with.
|
|
||||||
readonly attribute long one;
|
|
||||||
[Func="mozilla::dom::TestFunctions::ObjectFromAboutBlank"]
|
|
||||||
readonly attribute long two;
|
|
||||||
|
|
||||||
// Testing for how default toJSON behaves.
|
|
||||||
[Default] object toJSON();
|
|
||||||
};
|
|
@ -1,84 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
dictionary TestInterfaceJSUnionableDictionary {
|
|
||||||
object objectMember;
|
|
||||||
any anyMember;
|
|
||||||
};
|
|
||||||
|
|
||||||
[JSImplementation="@mozilla.org/dom/test-interface-js;1",
|
|
||||||
Pref="dom.expose_test_interfaces",
|
|
||||||
Constructor(optional any anyArg, optional object objectArg, optional TestInterfaceJSDictionary dictionaryArg)]
|
|
||||||
interface TestInterfaceJS : EventTarget {
|
|
||||||
readonly attribute any anyArg;
|
|
||||||
readonly attribute object objectArg;
|
|
||||||
[Cached, Pure] readonly attribute TestInterfaceJSDictionary dictionaryArg;
|
|
||||||
attribute any anyAttr;
|
|
||||||
attribute object objectAttr;
|
|
||||||
[Cached, Pure] attribute TestInterfaceJSDictionary dictionaryAttr;
|
|
||||||
any pingPongAny(any arg);
|
|
||||||
object pingPongObject(object obj);
|
|
||||||
any pingPongObjectOrString((object or DOMString) objOrString);
|
|
||||||
TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict);
|
|
||||||
long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong);
|
|
||||||
DOMString pingPongMap(record<DOMString, any> map);
|
|
||||||
long objectSequenceLength(sequence<object> seq);
|
|
||||||
long anySequenceLength(sequence<any> seq);
|
|
||||||
|
|
||||||
// For testing bug 968335.
|
|
||||||
DOMString getCallerPrincipal();
|
|
||||||
|
|
||||||
DOMString convertSVS(USVString svs);
|
|
||||||
|
|
||||||
(TestInterfaceJS or long) pingPongUnion((TestInterfaceJS or long) something);
|
|
||||||
(DOMString or TestInterfaceJS?) pingPongUnionContainingNull((TestInterfaceJS? or DOMString) something);
|
|
||||||
(TestInterfaceJS or long)? pingPongNullableUnion((TestInterfaceJS or long)? something);
|
|
||||||
(Location or TestInterfaceJS) returnBadUnion();
|
|
||||||
|
|
||||||
[Cached, Pure]
|
|
||||||
readonly attribute short cachedAttr;
|
|
||||||
void setCachedAttr(short n);
|
|
||||||
void clearCachedAttrCache();
|
|
||||||
|
|
||||||
// Test for sequence overloading and union behavior
|
|
||||||
void testSequenceOverload(sequence<DOMString> arg);
|
|
||||||
void testSequenceOverload(DOMString arg);
|
|
||||||
|
|
||||||
void testSequenceUnion((sequence<DOMString> or DOMString) arg);
|
|
||||||
|
|
||||||
// Tests for exception-throwing behavior
|
|
||||||
[Throws]
|
|
||||||
void testThrowError();
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
void testThrowDOMException();
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
void testThrowTypeError();
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
void testThrowCallbackError(Function callback);
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
void testThrowXraySelfHosted();
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
void testThrowSelfHosted();
|
|
||||||
|
|
||||||
// Tests for promise-rejection behavior
|
|
||||||
Promise<void> testPromiseWithThrowingChromePromiseInit();
|
|
||||||
Promise<void> testPromiseWithThrowingContentPromiseInit(Function func);
|
|
||||||
Promise<void> testPromiseWithDOMExceptionThrowingPromiseInit();
|
|
||||||
Promise<void> testPromiseWithThrowingChromeThenFunction();
|
|
||||||
Promise<void> testPromiseWithThrowingContentThenFunction(AnyCallback func);
|
|
||||||
Promise<void> testPromiseWithDOMExceptionThrowingThenFunction();
|
|
||||||
Promise<void> testPromiseWithThrowingChromeThenable();
|
|
||||||
Promise<void> testPromiseWithThrowingContentThenable(object thenable);
|
|
||||||
Promise<void> testPromiseWithDOMExceptionThrowingThenable();
|
|
||||||
|
|
||||||
// Event handler tests
|
|
||||||
attribute EventHandler onsomething;
|
|
||||||
};
|
|
@ -1,27 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//
|
|
||||||
// These dictionaries are in a separate WebIDL file to avoid circular include
|
|
||||||
// problems. One of the dictionary includes a union as a member, so that
|
|
||||||
// dictionary's header needs to include UnionTypes.h. But the API in
|
|
||||||
// TestInterfaceJS also declares a union of dictionaries, so _that_
|
|
||||||
// dictionary's header needs to be included _by_ UnionTypes.h. The solution
|
|
||||||
// is to separate those two dictionaries into separate header files.
|
|
||||||
//
|
|
||||||
|
|
||||||
dictionary TestInterfaceJSDictionary2 {
|
|
||||||
object innerObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
dictionary TestInterfaceJSDictionary {
|
|
||||||
TestInterfaceJSDictionary2 innerDictionary;
|
|
||||||
object objectMember;
|
|
||||||
any anyMember;
|
|
||||||
(object or DOMString) objectOrStringMember;
|
|
||||||
sequence<any> anySequenceMember;
|
|
||||||
};
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceMaplike {
|
|
||||||
maplike<DOMString, long>;
|
|
||||||
void setInternal(DOMString aKey, long aValue);
|
|
||||||
void clearInternal();
|
|
||||||
boolean deleteInternal(DOMString aKey);
|
|
||||||
boolean hasInternal(DOMString aKey);
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceMaplikeObject {
|
|
||||||
readonly maplike<DOMString, TestInterfaceMaplike>;
|
|
||||||
void setInternal(DOMString aKey);
|
|
||||||
void clearInternal();
|
|
||||||
boolean deleteInternal(DOMString aKey);
|
|
||||||
boolean hasInternal(DOMString aKey);
|
|
||||||
};
|
|
||||||
|
|
||||||
[Pref="dom.expose_test_interfaces",
|
|
||||||
JSImplementation="@mozilla.org/dom/test-interface-js-maplike;1",
|
|
||||||
Constructor()]
|
|
||||||
interface TestInterfaceJSMaplike {
|
|
||||||
readonly maplike<DOMString, long>;
|
|
||||||
void setInternal(DOMString aKey, long aValue);
|
|
||||||
void clearInternal();
|
|
||||||
boolean deleteInternal(DOMString aKey);
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceSetlike {
|
|
||||||
setlike<DOMString>;
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceSetlikeNode {
|
|
||||||
setlike<Node>;
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceIterableSingle {
|
|
||||||
iterable<long>;
|
|
||||||
getter long(unsigned long index);
|
|
||||||
readonly attribute unsigned long length;
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceIterableDouble {
|
|
||||||
iterable<DOMString, DOMString>;
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor(),
|
|
||||||
Pref="dom.expose_test_interfaces"]
|
|
||||||
interface TestInterfaceIterableDoubleUnion {
|
|
||||||
iterable<DOMString, (DOMString or long)>;
|
|
||||||
};
|
|
||||||
|
|
35
crates/web-sys/webidls/enabled/TreeColumn.webidl
vendored
35
crates/web-sys/webidls/enabled/TreeColumn.webidl
vendored
@ -1,35 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface TreeColumn {
|
|
||||||
readonly attribute Element element;
|
|
||||||
|
|
||||||
readonly attribute TreeColumns? columns;
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
readonly attribute long x;
|
|
||||||
[Throws]
|
|
||||||
readonly attribute long width;
|
|
||||||
|
|
||||||
readonly attribute DOMString id;
|
|
||||||
readonly attribute long index;
|
|
||||||
|
|
||||||
readonly attribute boolean primary;
|
|
||||||
readonly attribute boolean cycler;
|
|
||||||
readonly attribute boolean editable;
|
|
||||||
readonly attribute boolean selectable;
|
|
||||||
|
|
||||||
const short TYPE_TEXT = 1;
|
|
||||||
const short TYPE_CHECKBOX = 2;
|
|
||||||
const short TYPE_PROGRESSMETER = 3;
|
|
||||||
const short TYPE_PASSWORD = 4;
|
|
||||||
readonly attribute short type;
|
|
||||||
|
|
||||||
TreeColumn? getNext();
|
|
||||||
TreeColumn? getPrevious();
|
|
||||||
|
|
||||||
[Throws]
|
|
||||||
void invalidate();
|
|
||||||
};
|
|
@ -1,54 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface TreeColumns {
|
|
||||||
/**
|
|
||||||
* The tree widget for these columns.
|
|
||||||
*/
|
|
||||||
readonly attribute TreeBoxObject? tree;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The number of columns.
|
|
||||||
*/
|
|
||||||
readonly attribute unsigned long count;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An alias for count (for the benefit of scripts which treat this as an
|
|
||||||
* array).
|
|
||||||
*/
|
|
||||||
readonly attribute unsigned long length;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the first/last column.
|
|
||||||
*/
|
|
||||||
TreeColumn? getFirstColumn();
|
|
||||||
TreeColumn? getLastColumn();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attribute based column getters.
|
|
||||||
*/
|
|
||||||
TreeColumn? getPrimaryColumn();
|
|
||||||
TreeColumn? getSortedColumn();
|
|
||||||
TreeColumn? getKeyColumn();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the column for the given element.
|
|
||||||
*/
|
|
||||||
TreeColumn? getColumnFor(Element? element);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parametric column getters.
|
|
||||||
*/
|
|
||||||
getter TreeColumn? getNamedColumn(DOMString name);
|
|
||||||
getter TreeColumn? getColumnAt(unsigned long index);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called whenever a treecol is added or removed and
|
|
||||||
* the column cache needs to be rebuilt.
|
|
||||||
*/
|
|
||||||
void invalidateColumns();
|
|
||||||
|
|
||||||
void restoreNaturalOrder();
|
|
||||||
};
|
|
@ -1,20 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
interface TreeContentView
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Retrieve the content item associated with the specified row.
|
|
||||||
*/
|
|
||||||
[Throws]
|
|
||||||
Element? getItemAtIndex(long row);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve the index associated with the specified content item.
|
|
||||||
*/
|
|
||||||
long getIndexOfItem(Element? item);
|
|
||||||
};
|
|
||||||
TreeContentView implements TreeView;
|
|
273
crates/web-sys/webidls/enabled/Window.webidl
vendored
273
crates/web-sys/webidls/enabled/Window.webidl
vendored
@ -230,137 +230,6 @@ interface SpeechSynthesisGetter {
|
|||||||
Window implements SpeechSynthesisGetter;
|
Window implements SpeechSynthesisGetter;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
partial interface Window {
|
|
||||||
//[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
|
||||||
[NewObject, Throws] CSSStyleDeclaration? getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
|
||||||
|
|
||||||
// Mozilla extensions
|
|
||||||
/**
|
|
||||||
* Method for scrolling this window by a number of lines.
|
|
||||||
*/
|
|
||||||
void scrollByLines(long numLines, optional ScrollOptions options);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method for scrolling this window by a number of pages.
|
|
||||||
*/
|
|
||||||
void scrollByPages(long numPages, optional ScrollOptions options);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method for sizing this window to the content in the window.
|
|
||||||
*/
|
|
||||||
[Throws, NeedsCallerType] void sizeToContent();
|
|
||||||
|
|
||||||
// XXX Shouldn't this be in nsIDOMChromeWindow?
|
|
||||||
[ChromeOnly, Replaceable, Throws] readonly attribute XULControllers controllers;
|
|
||||||
|
|
||||||
[ChromeOnly, Throws] readonly attribute Element? realFrameElement;
|
|
||||||
|
|
||||||
[Throws, NeedsCallerType]
|
|
||||||
readonly attribute float mozInnerScreenX;
|
|
||||||
[Throws, NeedsCallerType]
|
|
||||||
readonly attribute float mozInnerScreenY;
|
|
||||||
[Replaceable, Throws, NeedsCallerType]
|
|
||||||
readonly attribute double devicePixelRatio;
|
|
||||||
|
|
||||||
/* The maximum offset that the window can be scrolled to
|
|
||||||
(i.e., the document width/height minus the scrollport width/height) */
|
|
||||||
[ChromeOnly, Throws] readonly attribute long scrollMinX;
|
|
||||||
[ChromeOnly, Throws] readonly attribute long scrollMinY;
|
|
||||||
[Replaceable, Throws] readonly attribute long scrollMaxX;
|
|
||||||
[Replaceable, Throws] readonly attribute long scrollMaxY;
|
|
||||||
|
|
||||||
[Throws] attribute boolean fullScreen;
|
|
||||||
|
|
||||||
[Throws, ChromeOnly] void back();
|
|
||||||
[Throws, ChromeOnly] void forward();
|
|
||||||
[Throws, ChromeOnly, NeedsSubjectPrincipal] void home();
|
|
||||||
|
|
||||||
// XXX Should this be in nsIDOMChromeWindow?
|
|
||||||
void updateCommands(DOMString action,
|
|
||||||
optional Selection? sel = null,
|
|
||||||
optional short reason = 0);
|
|
||||||
|
|
||||||
/* Find in page.
|
|
||||||
* @param str: the search pattern
|
|
||||||
* @param caseSensitive: is the search caseSensitive
|
|
||||||
* @param backwards: should we search backwards
|
|
||||||
* @param wrapAround: should we wrap the search
|
|
||||||
* @param wholeWord: should we search only for whole words
|
|
||||||
* @param searchInFrames: should we search through all frames
|
|
||||||
* @param showDialog: should we show the Find dialog
|
|
||||||
*/
|
|
||||||
[Throws] boolean find(optional DOMString str = "",
|
|
||||||
optional boolean caseSensitive = false,
|
|
||||||
optional boolean backwards = false,
|
|
||||||
optional boolean wrapAround = false,
|
|
||||||
optional boolean wholeWord = false,
|
|
||||||
optional boolean searchInFrames = false,
|
|
||||||
optional boolean showDialog = false);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of times this document for this window has
|
|
||||||
* been painted to the screen.
|
|
||||||
*/
|
|
||||||
[Throws] readonly attribute unsigned long long mozPaintCount;
|
|
||||||
|
|
||||||
attribute EventHandler ondevicemotion;
|
|
||||||
attribute EventHandler ondeviceorientation;
|
|
||||||
attribute EventHandler onabsolutedeviceorientation;
|
|
||||||
attribute EventHandler ondeviceproximity;
|
|
||||||
attribute EventHandler onuserproximity;
|
|
||||||
attribute EventHandler ondevicelight;
|
|
||||||
|
|
||||||
void dump(DOMString str);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is here for backwards compatibility with 4.x only,
|
|
||||||
* its implementation is a no-op
|
|
||||||
*/
|
|
||||||
void setResizable(boolean resizable);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the scriptable version of
|
|
||||||
* nsIDOMWindow::openDialog() that takes 3 optional
|
|
||||||
* arguments, plus any additional arguments are passed on as
|
|
||||||
* arguments on the dialog's window object (window.arguments).
|
|
||||||
*/
|
|
||||||
[Throws, ChromeOnly] WindowProxy? openDialog(optional DOMString url = "",
|
|
||||||
optional DOMString name = "",
|
|
||||||
optional DOMString options = "",
|
|
||||||
any... extraArguments);
|
|
||||||
|
|
||||||
[
|
|
||||||
//#ifdef NIGHTLY_BUILD
|
|
||||||
// ChromeOnly,
|
|
||||||
//#endif
|
|
||||||
NonEnumerable, Replaceable, Throws, NeedsCallerType]
|
|
||||||
readonly attribute object? content;
|
|
||||||
|
|
||||||
[Throws, ChromeOnly] any getInterface(IID iid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
|
|
||||||
*/
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
readonly attribute WindowRoot? windowRoot;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ChromeOnly method to determine if a particular window should see console
|
|
||||||
* reports from service workers of the given scope.
|
|
||||||
*/
|
|
||||||
[ChromeOnly]
|
|
||||||
boolean shouldReportForServiceWorkerScope(USVString aScope);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* InstallTrigger is used for extension installs. Ideally it would
|
|
||||||
* be something like a WebIDL namespace, but we don't support
|
|
||||||
* JS-implemented static things yet. See bug 863952.
|
|
||||||
*/
|
|
||||||
[Replaceable]
|
|
||||||
readonly attribute InstallTriggerImpl? InstallTrigger;
|
|
||||||
};
|
|
||||||
|
|
||||||
Window implements TouchEventHandlers;
|
Window implements TouchEventHandlers;
|
||||||
|
|
||||||
Window implements OnErrorEventHandlerForWindow;
|
Window implements OnErrorEventHandlerForWindow;
|
||||||
@ -384,121 +253,6 @@ partial interface Window {
|
|||||||
|
|
||||||
callback PromiseDocumentFlushedCallback = any ();
|
callback PromiseDocumentFlushedCallback = any ();
|
||||||
|
|
||||||
// Mozilla extensions for Chrome windows.
|
|
||||||
partial interface Window {
|
|
||||||
// The STATE_* constants need to match the corresponding enum in nsGlobalWindow.cpp.
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
const unsigned short STATE_MAXIMIZED = 1;
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
const unsigned short STATE_MINIMIZED = 2;
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
const unsigned short STATE_NORMAL = 3;
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
const unsigned short STATE_FULLSCREEN = 4;
|
|
||||||
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
readonly attribute unsigned short windowState;
|
|
||||||
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
readonly attribute boolean isFullyOccluded;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* browserDOMWindow provides access to yet another layer of
|
|
||||||
* utility functions implemented by chrome script. It will be null
|
|
||||||
* for DOMWindows not corresponding to browsers.
|
|
||||||
*/
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
attribute nsIBrowserDOMWindow? browserDOMWindow;
|
|
||||||
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void getAttention();
|
|
||||||
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void getAttentionWithCycleCount(long aCycleCount);
|
|
||||||
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void setCursor(DOMString cursor);
|
|
||||||
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void maximize();
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void minimize();
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void restore();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Notify a default button is loaded on a dialog or a wizard.
|
|
||||||
* defaultButton is the default button.
|
|
||||||
*/
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void notifyDefaultButtonLoaded(Element defaultButton);
|
|
||||||
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
readonly attribute ChromeMessageBroadcaster messageManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the message manager identified by the given group name that
|
|
||||||
* manages all frame loaders belonging to that group.
|
|
||||||
*/
|
|
||||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
ChromeMessageBroadcaster getGroupMessageManager(DOMString aGroup);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* On some operating systems, we must allow the window manager to
|
|
||||||
* handle window dragging. This function tells the window manager to
|
|
||||||
* start dragging the window. This function will fail unless called
|
|
||||||
* while the left mouse button is held down, callers must check this.
|
|
||||||
*
|
|
||||||
* Throws NS_ERROR_NOT_IMPLEMENTED if the OS doesn't support this.
|
|
||||||
*/
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
void beginWindowMove(Event mouseDownEvent);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls the given function as soon as a style or layout flush for the
|
|
||||||
* top-level document is not necessary, and returns a Promise which
|
|
||||||
* resolves to the callback's return value after it executes.
|
|
||||||
*
|
|
||||||
* In the event that the window goes away before a flush can occur, the
|
|
||||||
* callback will still be called and the Promise resolved as the window
|
|
||||||
* tears itself down.
|
|
||||||
*
|
|
||||||
* Note that the callback can be called either synchronously or asynchronously
|
|
||||||
* depending on whether or not flushes are pending:
|
|
||||||
*
|
|
||||||
* The callback will be called synchronously when calling
|
|
||||||
* promiseDocumentFlushed when NO flushes are already pending. This is
|
|
||||||
* to ensure that no script has a chance to dirty the DOM before the callback
|
|
||||||
* is called.
|
|
||||||
*
|
|
||||||
* The callback will be called asynchronously if a flush is pending.
|
|
||||||
*
|
|
||||||
* The expected execution order is that all pending callbacks will
|
|
||||||
* be fired first (and in the order that they were queued) and then the
|
|
||||||
* Promise resolution handlers will all be invoked later on during the
|
|
||||||
* next microtask checkpoint.
|
|
||||||
*
|
|
||||||
* promiseDocumentFlushed does not support re-entrancy - so calling it from
|
|
||||||
* within a promiseDocumentFlushed callback will result in the inner call
|
|
||||||
* throwing an NS_ERROR_FAILURE exception, and the outer Promise rejecting
|
|
||||||
* with that exception.
|
|
||||||
*
|
|
||||||
* The callback function *must not make any changes which would require
|
|
||||||
* a style or layout flush*.
|
|
||||||
*
|
|
||||||
* Also throws NS_ERROR_FAILURE if the window is not in a state where flushes
|
|
||||||
* can be waited for (for example, the PresShell has not yet been created).
|
|
||||||
*
|
|
||||||
* @param {function} callback
|
|
||||||
* @returns {Promise}
|
|
||||||
*/
|
|
||||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
|
||||||
Promise<any> promiseDocumentFlushed(PromiseDocumentFlushedCallback callback);
|
|
||||||
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
readonly attribute boolean isChromeWindow;
|
|
||||||
};
|
|
||||||
|
|
||||||
partial interface Window {
|
partial interface Window {
|
||||||
[Pref="dom.vr.enabled"]
|
[Pref="dom.vr.enabled"]
|
||||||
attribute EventHandler onvrdisplayconnect;
|
attribute EventHandler onvrdisplayconnect;
|
||||||
@ -534,31 +288,4 @@ dictionary IdleRequestOptions {
|
|||||||
|
|
||||||
callback IdleRequestCallback = void (IdleDeadline deadline);
|
callback IdleRequestCallback = void (IdleDeadline deadline);
|
||||||
|
|
||||||
partial interface Window {
|
|
||||||
/**
|
|
||||||
* Returns a list of locales that the internationalization components
|
|
||||||
* should be localized to.
|
|
||||||
*
|
|
||||||
* The function name refers to Regional Preferences which can be either
|
|
||||||
* fetched from the internal internationalization database (CLDR), or
|
|
||||||
* from the host environment.
|
|
||||||
*
|
|
||||||
* The result is a sorted list of valid locale IDs and it should be
|
|
||||||
* used for all APIs that accept list of locales, like ECMA402 and L10n APIs.
|
|
||||||
*
|
|
||||||
* This API always returns at least one locale.
|
|
||||||
*
|
|
||||||
* Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"]
|
|
||||||
*/
|
|
||||||
[Func="IsChromeOrXBL"]
|
|
||||||
sequence<DOMString> getRegionalPrefsLocales();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Getter funcion for IntlUtils, which provides helper functions for
|
|
||||||
* localization.
|
|
||||||
*/
|
|
||||||
[Throws, Func="IsChromeOrXBL"]
|
|
||||||
readonly attribute IntlUtils intlUtils;
|
|
||||||
};
|
|
||||||
|
|
||||||
Window implements WebGPUProvider;
|
Window implements WebGPUProvider;
|
||||||
|
@ -22,9 +22,6 @@ enum XMLHttpRequestResponseType {
|
|||||||
"document",
|
"document",
|
||||||
"json",
|
"json",
|
||||||
"text",
|
"text",
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
"moz-chunked-arraybuffer",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,29 +115,4 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
|||||||
|
|
||||||
[Throws, Exposed=Window]
|
[Throws, Exposed=Window]
|
||||||
readonly attribute Document? responseXML;
|
readonly attribute Document? responseXML;
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
|
|
||||||
[ChromeOnly, SetterThrows]
|
|
||||||
attribute boolean mozBackgroundRequest;
|
|
||||||
|
|
||||||
[ChromeOnly, Exposed=Window]
|
|
||||||
readonly attribute MozChannel? channel;
|
|
||||||
|
|
||||||
[Throws, ChromeOnly, Exposed=Window]
|
|
||||||
any getInterface(IID iid);
|
|
||||||
|
|
||||||
[ChromeOnly, Exposed=Window]
|
|
||||||
void setOriginAttributes(optional OriginAttributesDictionary originAttributes);
|
|
||||||
|
|
||||||
[ChromeOnly, Throws]
|
|
||||||
void sendInputStream(InputStream body);
|
|
||||||
|
|
||||||
// Only works on MainThread.
|
|
||||||
// Its permanence is to be evaluated in bug 1368540 for Firefox 60.
|
|
||||||
[ChromeOnly]
|
|
||||||
readonly attribute unsigned short errorCode;
|
|
||||||
|
|
||||||
readonly attribute boolean mozAnon;
|
|
||||||
readonly attribute boolean mozSystem;
|
|
||||||
};
|
};
|
||||||
|
@ -21,19 +21,4 @@ interface XMLSerializer {
|
|||||||
*/
|
*/
|
||||||
[Throws]
|
[Throws]
|
||||||
DOMString serializeToString(Node root);
|
DOMString serializeToString(Node root);
|
||||||
|
|
||||||
// Mozilla-specific stuff
|
|
||||||
/**
|
|
||||||
* The subtree rooted by the specified element is serialized to
|
|
||||||
* a byte stream using the character set specified.
|
|
||||||
* @param root The root of the subtree to be serialized. This could
|
|
||||||
* be any node, including a Document.
|
|
||||||
* @param stream The byte stream to which the subtree is serialized.
|
|
||||||
* @param charset The name of the character set to use for the encoding
|
|
||||||
* to a byte stream. If this string is empty and root is
|
|
||||||
* a document, the document's character set will be used.
|
|
||||||
*/
|
|
||||||
[Throws, ChromeOnly]
|
|
||||||
void serializeToStream(Node root, OutputStream stream, DOMString? charset);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
4
crates/web-sys/webidls/enabled/nsISupports.webidl
vendored
Normal file
4
crates/web-sys/webidls/enabled/nsISupports.webidl
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// `nsISupports` is a Gecko thing that can be queried if it implements some
|
||||||
|
// interface. We can query anything via `JsCast`, so it is good enough to just
|
||||||
|
// call it an Object.
|
||||||
|
typedef Object nsISupports;
|
@ -123,7 +123,7 @@ impl<'src> FirstPass<'src, ()> for weedle::DictionaryDefinition<'src> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !record.dictionaries.insert(self.identifier.0) {
|
if !record.dictionaries.insert(self.identifier.0) {
|
||||||
warn!("encountered multiple dictionary declarations of {}", self.identifier.0);
|
info!("Encountered multiple dictionary declarations: {}", self.identifier.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -137,7 +137,7 @@ impl<'src> FirstPass<'src, ()> for weedle::EnumDefinition<'src> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !record.enums.insert(self.identifier.0) {
|
if !record.enums.insert(self.identifier.0) {
|
||||||
warn!("Encountered multiple enum declarations of {}", self.identifier.0);
|
info!("Encountered multiple enum declarations: {}", self.identifier.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -336,11 +336,11 @@ impl<'src> FirstPass<'src, &'src str> for weedle::interface::OperationInterfaceM
|
|||||||
}
|
}
|
||||||
|
|
||||||
if self.specials.len() > 1 {
|
if self.specials.len() > 1 {
|
||||||
warn!("Unsupported webidl operation {:?}", self);
|
warn!("Unsupported webidl operation: {:?}", self);
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
if let Some(StringifierOrStatic::Stringifier(_)) = self.modifier {
|
if let Some(StringifierOrStatic::Stringifier(_)) = self.modifier {
|
||||||
warn!("Unsupported webidl operation {:?}", self);
|
warn!("Unsupported webidl stringifier: {:?}", self);
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
let mut ids = vec![OperationId::Operation(self.identifier.map(|s| s.0))];
|
let mut ids = vec![OperationId::Operation(self.identifier.map(|s| s.0))];
|
||||||
@ -430,9 +430,10 @@ impl<'src> FirstPass<'src, &'src str> for weedle::mixin::OperationMixinMember<'s
|
|||||||
}
|
}
|
||||||
|
|
||||||
if self.stringifier.is_some() {
|
if self.stringifier.is_some() {
|
||||||
warn!("Unsupported webidl operation {:?}", self);
|
warn!("Unsupported webidl stringifier: {:?}", self);
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
first_pass_operation(
|
first_pass_operation(
|
||||||
record,
|
record,
|
||||||
FirstPassOperationType::Mixin,
|
FirstPassOperationType::Mixin,
|
||||||
@ -450,7 +451,7 @@ impl<'src> FirstPass<'src, ()> for weedle::TypedefDefinition<'src> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if record.typedefs.insert(self.identifier.0, &self.type_.type_).is_some() {
|
if record.typedefs.insert(self.identifier.0, &self.type_.type_).is_some() {
|
||||||
warn!("Encountered multiple declarations of {}", self.identifier.0);
|
info!("Encountered multiple typedef declarations: {}", self.identifier.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -290,7 +290,7 @@ impl<'a> ToIdlType<'a> for Identifier<'a> {
|
|||||||
} else if record.enums.contains(self.0) {
|
} else if record.enums.contains(self.0) {
|
||||||
Some(IdlType::Enum(self.0))
|
Some(IdlType::Enum(self.0))
|
||||||
} else {
|
} else {
|
||||||
warn!("unrecognized type {}", self.0);
|
warn!("Unrecognized type: {}", self.0);
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,12 +188,19 @@ impl<'src> WebidlParse<'src, ()> for weedle::Definition<'src> {
|
|||||||
weedle::Definition::Namespace(namespace) => {
|
weedle::Definition::Namespace(namespace) => {
|
||||||
namespace.webidl_parse(program, first_pass, ())?
|
namespace.webidl_parse(program, first_pass, ())?
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
| weedle::Definition::Callback(..)
|
weedle::Definition::Callback(..) => {
|
||||||
| weedle::Definition::CallbackInterface(..)
|
warn!("Unsupported WebIDL Callback definition: {:?}", self)
|
||||||
| weedle::Definition::Dictionary(..)
|
}
|
||||||
| weedle::Definition::PartialDictionary(..) => {
|
weedle::Definition::CallbackInterface(..) => {
|
||||||
warn!("Unsupported WebIDL definition: {:?}", self)
|
warn!("Unsupported WebIDL CallbackInterface definition: {:?}", self)
|
||||||
|
}
|
||||||
|
weedle::Definition::Dictionary(..) => {
|
||||||
|
warn!("Unsupported WebIDL Dictionary definition: {:?}", self)
|
||||||
|
}
|
||||||
|
weedle::Definition::PartialDictionary(..) => {
|
||||||
|
warn!("Unsupported WebIDL PartialDictionary definition: {:?}", self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -288,7 +295,7 @@ impl<'src> WebidlParse<'src, ()> for weedle::PartialInterfaceDefinition<'src> {
|
|||||||
.get(self.identifier.0)
|
.get(self.identifier.0)
|
||||||
.map(|interface_data| !interface_data.partial)
|
.map(|interface_data| !interface_data.partial)
|
||||||
.unwrap_or(true) {
|
.unwrap_or(true) {
|
||||||
warn!(
|
info!(
|
||||||
"Partial interface {} missing non-partial interface",
|
"Partial interface {} missing non-partial interface",
|
||||||
self.identifier.0
|
self.identifier.0
|
||||||
);
|
);
|
||||||
@ -453,10 +460,16 @@ impl<'src> WebidlParse<'src, &'src str> for weedle::interface::InterfaceMember<'
|
|||||||
iterable.webidl_parse(program, first_pass, self_name)
|
iterable.webidl_parse(program, first_pass, self_name)
|
||||||
}
|
}
|
||||||
// TODO
|
// TODO
|
||||||
| Maplike(_)
|
Maplike(_) => {
|
||||||
| Stringifier(_)
|
warn!("Unsupported WebIDL Maplike interface member: {:?}", self);
|
||||||
| Setlike(_) => {
|
Ok(())
|
||||||
warn!("Unsupported WebIDL interface member: {:?}", self);
|
}
|
||||||
|
Stringifier(_) => {
|
||||||
|
warn!("Unsupported WebIDL Stringifier interface member: {:?}", self);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
Setlike(_) => {
|
||||||
|
warn!("Unsupported WebIDL Setlike interface member: {:?}", self);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -482,7 +495,7 @@ impl<'a, 'src> WebidlParse<'src, &'a str> for weedle::mixin::MixinMember<'src> {
|
|||||||
}
|
}
|
||||||
// TODO
|
// TODO
|
||||||
weedle::mixin::MixinMember::Stringifier(_) => {
|
weedle::mixin::MixinMember::Stringifier(_) => {
|
||||||
warn!("Unsupported WebIDL mixin member: {:?}", self);
|
warn!("Unsupported WebIDL stringifier mixin member: {:?}", self);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,7 +564,7 @@ fn member_attribute<'src>(
|
|||||||
|
|
||||||
let is_static = match modifier {
|
let is_static = match modifier {
|
||||||
Some(Stringifier(_)) => {
|
Some(Stringifier(_)) => {
|
||||||
warn!("Unsupported stringifier on type {:?}", (self_name, identifier));
|
warn!("Unsupported stringifier on type: {:?}", (self_name, identifier));
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
Some(Inherit(_)) => false,
|
Some(Inherit(_)) => false,
|
||||||
@ -560,7 +573,7 @@ fn member_attribute<'src>(
|
|||||||
};
|
};
|
||||||
|
|
||||||
if type_.attributes.is_some() {
|
if type_.attributes.is_some() {
|
||||||
warn!("Unsupported attributes on type {:?}", (self_name, identifier));
|
warn!("Unsupported attributes on type: {:?}", (self_name, identifier));
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +669,7 @@ fn member_operation<'src>(
|
|||||||
|
|
||||||
let is_static = match modifier {
|
let is_static = match modifier {
|
||||||
Some(Stringifier(_)) => {
|
Some(Stringifier(_)) => {
|
||||||
warn!("Unsupported stringifier on type {:?}", (self_name, identifier));
|
warn!("Unsupported stringifier on type: {:?}", (self_name, identifier));
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
Some(Static(_)) => true,
|
Some(Static(_)) => true,
|
||||||
@ -668,7 +681,7 @@ fn member_operation<'src>(
|
|||||||
];
|
];
|
||||||
if specials.len() > 1 {
|
if specials.len() > 1 {
|
||||||
warn!(
|
warn!(
|
||||||
"Unsupported specials ({:?}) on type {:?}",
|
"Unsupported specials: ({:?}) on type {:?}",
|
||||||
specials,
|
specials,
|
||||||
(self_name, identifier),
|
(self_name, identifier),
|
||||||
);
|
);
|
||||||
@ -812,7 +825,12 @@ impl<'src> WebidlParse<'src, &'src str> for weedle::interface::ConstMember<'src>
|
|||||||
|
|
||||||
let ty = match idl_type.to_syn_type(TypePosition::Return) {
|
let ty = match idl_type.to_syn_type(TypePosition::Return) {
|
||||||
None => {
|
None => {
|
||||||
warn!("Can not convert const type to syn type: {:?}", idl_type);
|
warn!(
|
||||||
|
"Cannot convert const type to syn type: {:?} in {:?} on {:?}",
|
||||||
|
idl_type,
|
||||||
|
self,
|
||||||
|
self_name
|
||||||
|
);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
},
|
},
|
||||||
Some(ty) => ty,
|
Some(ty) => ty,
|
||||||
@ -888,8 +906,8 @@ impl<'src> WebidlParse<'src, (&'src str, &'src mut backend::ast::Module)> for we
|
|||||||
weedle::namespace::NamespaceMember::Operation(op) => {
|
weedle::namespace::NamespaceMember::Operation(op) => {
|
||||||
op.webidl_parse(program, first_pass, (self_name, module))?;
|
op.webidl_parse(program, first_pass, (self_name, module))?;
|
||||||
}
|
}
|
||||||
weedle::namespace::NamespaceMember::Attribute(_) => {
|
weedle::namespace::NamespaceMember::Attribute(attr) => {
|
||||||
warn!("Attribute namespace members are not supported")
|
warn!("Unsupported attribute namespace member: {:?}", attr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -235,7 +235,11 @@ impl<'src> FirstPassRecord<'src> {
|
|||||||
ret @ _ => {
|
ret @ _ => {
|
||||||
match ret.to_syn_type(TypePosition::Return) {
|
match ret.to_syn_type(TypePosition::Return) {
|
||||||
None => {
|
None => {
|
||||||
warn!("Can not convert return type to syn type: {:?}", ret);
|
warn!(
|
||||||
|
"Unsupported return type: {:?} on {:?}",
|
||||||
|
ret,
|
||||||
|
rust_name
|
||||||
|
);
|
||||||
return Vec::new();
|
return Vec::new();
|
||||||
},
|
},
|
||||||
Some(ret) => Some(ret),
|
Some(ret) => Some(ret),
|
||||||
@ -315,7 +319,11 @@ impl<'src> FirstPassRecord<'src> {
|
|||||||
let syn_type = if let Some(syn_type) = idl_type.to_syn_type(TypePosition::Argument) {
|
let syn_type = if let Some(syn_type) = idl_type.to_syn_type(TypePosition::Argument) {
|
||||||
syn_type
|
syn_type
|
||||||
} else {
|
} else {
|
||||||
warn!("Can not convert argument type to syn type: {:?}", idl_type);
|
warn!(
|
||||||
|
"Unsupported argument type: {:?} on {:?}",
|
||||||
|
idl_type,
|
||||||
|
rust_name
|
||||||
|
);
|
||||||
continue 'outer;
|
continue 'outer;
|
||||||
};
|
};
|
||||||
let argument_name = rust_ident(&argument_name.to_snake_case());
|
let argument_name = rust_ident(&argument_name.to_snake_case());
|
||||||
@ -389,7 +397,7 @@ impl<'src> FirstPassRecord<'src> {
|
|||||||
first_pass::OperationId::Constructor => panic!("constructors are unsupported"),
|
first_pass::OperationId::Constructor => panic!("constructors are unsupported"),
|
||||||
first_pass::OperationId::Operation(name) => match name {
|
first_pass::OperationId::Operation(name) => match name {
|
||||||
None => {
|
None => {
|
||||||
warn!("Operations without a name are unsupported");
|
warn!("Unsupported unnamed operation: {:?}", operation_id);
|
||||||
return Vec::new();
|
return Vec::new();
|
||||||
}
|
}
|
||||||
Some(name) => name,
|
Some(name) => name,
|
||||||
@ -533,7 +541,7 @@ impl<'src> FirstPassRecord<'src> {
|
|||||||
let name = match operation_name {
|
let name = match operation_name {
|
||||||
Some(name) => name.to_string(),
|
Some(name) => name.to_string(),
|
||||||
None => {
|
None => {
|
||||||
warn!("Operations without a name are unsupported");
|
warn!("Unsupported unnamed operation: on {:?}", self_name);
|
||||||
return Vec::new();
|
return Vec::new();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user