mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0
This commit is contained in:
parent
1d40075f03
commit
079092dfea
2381 changed files with 90360 additions and 17722 deletions
|
@ -84,8 +84,6 @@ interface ParentNode {
|
|||
[Unscopable] void prepend((Node or DOMString)... nodes);
|
||||
[Unscopable] void append((Node or DOMString)... nodes);
|
||||
|
||||
[Unscopable] Element? query(DOMString relativeSelectors);
|
||||
[NewObject, Unscopable] Elements queryAll(DOMString relativeSelectors);
|
||||
Element? querySelector(DOMString selectors);
|
||||
[NewObject] NodeList querySelectorAll(DOMString selectors);
|
||||
};
|
||||
|
@ -167,7 +165,7 @@ interface Node : EventTarget {
|
|||
const unsigned short ELEMENT_NODE = 1;
|
||||
const unsigned short ATTRIBUTE_NODE = 2; // historical
|
||||
const unsigned short TEXT_NODE = 3;
|
||||
const unsigned short CDATA_SECTION_NODE = 4; // historical
|
||||
const unsigned short CDATA_SECTION_NODE = 4;
|
||||
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
|
||||
const unsigned short ENTITY_NODE = 6; // historical
|
||||
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
|
||||
|
@ -239,6 +237,7 @@ interface Document : Node {
|
|||
[NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName);
|
||||
[NewObject] DocumentFragment createDocumentFragment();
|
||||
[NewObject] Text createTextNode(DOMString data);
|
||||
[NewObject] CDATASection createCDATASection(DOMString data);
|
||||
[NewObject] Comment createComment(DOMString data);
|
||||
[NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
|
||||
|
||||
|
@ -354,6 +353,10 @@ interface Text : CharacterData {
|
|||
readonly attribute DOMString wholeText;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface CDATASection : Text {
|
||||
};
|
||||
|
||||
interface ProcessingInstruction : CharacterData {
|
||||
readonly attribute DOMString target;
|
||||
};
|
||||
|
@ -443,7 +446,7 @@ callback interface NodeFilter {
|
|||
const unsigned long SHOW_ELEMENT = 0x1;
|
||||
const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
|
||||
const unsigned long SHOW_TEXT = 0x4;
|
||||
const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
|
||||
const unsigned long SHOW_CDATA_SECTION = 0x8;
|
||||
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
|
||||
const unsigned long SHOW_ENTITY = 0x20; // historical
|
||||
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
|
||||
|
@ -460,14 +463,13 @@ interface DOMTokenList {
|
|||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
boolean contains(DOMString token);
|
||||
void add(DOMString... tokens);
|
||||
void remove(DOMString... tokens);
|
||||
boolean toggle(DOMString token, optional boolean force);
|
||||
void replace(DOMString token, DOMString newToken);
|
||||
[CEReactions] void add(DOMString... tokens);
|
||||
[CEReactions] void remove(DOMString... tokens);
|
||||
[CEReactions] boolean toggle(DOMString token, optional boolean force);
|
||||
[CEReactions] void replace(DOMString token, DOMString newToken);
|
||||
boolean supports(DOMString token);
|
||||
attribute DOMString value;
|
||||
stringifier;
|
||||
// iterable<DOMString>;
|
||||
[CEReactions] stringifier attribute DOMString value;
|
||||
// iterable<DOMString>;
|
||||
};</script>
|
||||
<!-- UI Events IDLs -->
|
||||
<script type=text/plain class=untested>
|
||||
|
@ -907,63 +909,56 @@ interface DOMStringMap {
|
|||
deleter void (DOMString name);
|
||||
};
|
||||
|
||||
interface DOMElementMap {
|
||||
getter Element (DOMString name);
|
||||
setter creator void (DOMString name, Element value);
|
||||
deleter void (DOMString name);
|
||||
};
|
||||
|
||||
typedef (ArrayBuffer or CanvasProxy or MessagePort) Transferable;
|
||||
typedef (ArrayBuffer or MessagePort) Transferable;
|
||||
|
||||
callback FileCallback = void (File file);
|
||||
|
||||
enum DocumentReadyState { "loading", "interactive", "complete" };
|
||||
typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
|
||||
|
||||
[OverrideBuiltins]
|
||||
partial /*sealed*/ interface Document {
|
||||
// resource metadata management
|
||||
[PutForwards=href, Unforgeable] readonly attribute Location? location;
|
||||
attribute DOMString domain;
|
||||
readonly attribute DOMString referrer;
|
||||
attribute DOMString cookie;
|
||||
attribute USVString domain;
|
||||
readonly attribute USVString referrer;
|
||||
attribute USVString cookie;
|
||||
readonly attribute DOMString lastModified;
|
||||
readonly attribute DocumentReadyState readyState;
|
||||
|
||||
// DOM tree accessors
|
||||
getter object (DOMString name);
|
||||
attribute DOMString title;
|
||||
attribute DOMString dir;
|
||||
attribute HTMLElement? body;
|
||||
[CEReactions] attribute DOMString title;
|
||||
[CEReactions] attribute DOMString dir;
|
||||
[CEReactions] attribute HTMLElement? body;
|
||||
readonly attribute HTMLHeadElement? head;
|
||||
readonly attribute HTMLCollection images;
|
||||
readonly attribute HTMLCollection embeds;
|
||||
readonly attribute HTMLCollection plugins;
|
||||
readonly attribute HTMLCollection links;
|
||||
readonly attribute HTMLCollection forms;
|
||||
readonly attribute HTMLCollection scripts;
|
||||
[SameObject] readonly attribute HTMLCollection images;
|
||||
[SameObject] readonly attribute HTMLCollection embeds;
|
||||
[SameObject] readonly attribute HTMLCollection plugins;
|
||||
[SameObject] readonly attribute HTMLCollection links;
|
||||
[SameObject] readonly attribute HTMLCollection forms;
|
||||
[SameObject] readonly attribute HTMLCollection scripts;
|
||||
NodeList getElementsByName(DOMString elementName);
|
||||
readonly attribute DOMElementMap cssElementMap;
|
||||
readonly attribute HTMLScriptElement? currentScript;
|
||||
readonly attribute HTMLOrSVGScriptElement? currentScript; // classic scripts in a document tree only
|
||||
|
||||
// dynamic markup insertion
|
||||
Document open(optional DOMString type = "text/html", optional DOMString replace = "");
|
||||
WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
|
||||
void close();
|
||||
void write(DOMString... text);
|
||||
void writeln(DOMString... text);
|
||||
[CEReactions] Document open(optional DOMString type = "text/html", optional DOMString replace = "");
|
||||
WindowProxy open(USVString url, DOMString name, DOMString features);
|
||||
[CEReactions] void close();
|
||||
[CEReactions] void write(DOMString... text);
|
||||
[CEReactions] void writeln(DOMString... text);
|
||||
|
||||
// user interaction
|
||||
readonly attribute WindowProxy? defaultView;
|
||||
readonly attribute Element? activeElement;
|
||||
boolean hasFocus();
|
||||
attribute DOMString designMode;
|
||||
boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
|
||||
[CEReactions] attribute DOMString designMode;
|
||||
[CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
|
||||
boolean queryCommandEnabled(DOMString commandId);
|
||||
boolean queryCommandIndeterm(DOMString commandId);
|
||||
boolean queryCommandState(DOMString commandId);
|
||||
boolean queryCommandSupported(DOMString commandId);
|
||||
DOMString queryCommandValue(DOMString commandId);
|
||||
readonly attribute HTMLCollection commands;
|
||||
|
||||
// special event handler IDL attributes that only apply to Document objects
|
||||
[LenientThis] attribute EventHandler onreadystatechange;
|
||||
|
@ -971,44 +966,41 @@ partial /*sealed*/ interface Document {
|
|||
// also has obsolete members
|
||||
};
|
||||
Document implements GlobalEventHandlers;
|
||||
Document implements DocumentAndElementEventHandlers;
|
||||
|
||||
partial interface XMLDocument {
|
||||
boolean load(DOMString url);
|
||||
[NoInterfaceObject]
|
||||
interface ElementContentEditable {
|
||||
[CEReactions] attribute DOMString contentEditable;
|
||||
readonly attribute boolean isContentEditable;
|
||||
};
|
||||
|
||||
interface HTMLElement : Element {
|
||||
// metadata attributes
|
||||
attribute DOMString title;
|
||||
attribute DOMString lang;
|
||||
attribute boolean translate;
|
||||
attribute DOMString dir;
|
||||
readonly attribute DOMStringMap dataset;
|
||||
[CEReactions] attribute DOMString title;
|
||||
[CEReactions] attribute DOMString lang;
|
||||
[CEReactions] attribute boolean translate;
|
||||
[CEReactions] attribute DOMString dir;
|
||||
[SameObject] readonly attribute DOMStringMap dataset;
|
||||
|
||||
// user interaction
|
||||
attribute boolean hidden;
|
||||
[CEReactions] attribute boolean hidden;
|
||||
void click();
|
||||
attribute long tabIndex;
|
||||
[CEReactions] attribute long tabIndex;
|
||||
void focus();
|
||||
void blur();
|
||||
attribute DOMString accessKey;
|
||||
[CEReactions] attribute DOMString accessKey;
|
||||
readonly attribute DOMString accessKeyLabel;
|
||||
attribute boolean draggable;
|
||||
[PutForwards=value] readonly attribute DOMTokenList dropzone;
|
||||
attribute DOMString contentEditable;
|
||||
readonly attribute boolean isContentEditable;
|
||||
attribute HTMLMenuElement? contextMenu;
|
||||
attribute boolean spellcheck;
|
||||
[CEReactions] attribute boolean draggable;
|
||||
[CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList dropzone;
|
||||
[CEReactions] attribute HTMLMenuElement? contextMenu;
|
||||
[CEReactions] attribute boolean spellcheck;
|
||||
void forceSpellCheck();
|
||||
|
||||
// command API
|
||||
readonly attribute DOMString? commandType;
|
||||
readonly attribute DOMString? commandLabel;
|
||||
readonly attribute DOMString? commandIcon;
|
||||
readonly attribute boolean? commandHidden;
|
||||
readonly attribute boolean? commandDisabled;
|
||||
readonly attribute boolean? commandChecked;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString innerText;
|
||||
};
|
||||
HTMLElement implements GlobalEventHandlers;
|
||||
HTMLElement implements DocumentAndElementEventHandlers;
|
||||
HTMLElement implements ElementContentEditable;
|
||||
|
||||
interface HTMLUnknownElement : HTMLElement { };
|
||||
|
||||
|
@ -1050,9 +1042,9 @@ interface HTMLMetaElement : HTMLElement {
|
|||
};
|
||||
|
||||
interface HTMLStyleElement : HTMLElement {
|
||||
attribute DOMString media;
|
||||
attribute DOMString type;
|
||||
attribute boolean scoped;
|
||||
[CEReactions] attribute DOMString media;
|
||||
[CEReactions] attribute DOMString nonce;
|
||||
[CEReactions] attribute DOMString type;
|
||||
};
|
||||
HTMLStyleElement implements LinkStyle;
|
||||
|
||||
|
@ -1172,7 +1164,6 @@ interface HTMLIFrameElement : HTMLElement {
|
|||
attribute DOMString srcdoc;
|
||||
attribute DOMString name;
|
||||
[PutForwards=value] readonly attribute DOMTokenList sandbox;
|
||||
attribute boolean seamless;
|
||||
attribute boolean allowFullscreen;
|
||||
attribute DOMString width;
|
||||
attribute DOMString height;
|
||||
|
@ -1300,13 +1291,9 @@ interface HTMLMediaElement : HTMLElement {
|
|||
readonly attribute boolean ended;
|
||||
attribute boolean autoplay;
|
||||
attribute boolean loop;
|
||||
void play();
|
||||
Promise<void> play();
|
||||
void pause();
|
||||
|
||||
// media controller
|
||||
attribute DOMString mediaGroup;
|
||||
attribute MediaController? controller;
|
||||
|
||||
// controls
|
||||
attribute boolean controls;
|
||||
attribute double volume;
|
||||
|
@ -1365,46 +1352,6 @@ interface VideoTrack {
|
|||
attribute boolean selected;
|
||||
};
|
||||
|
||||
enum MediaControllerPlaybackState { "waiting", "playing", "ended" };
|
||||
[Constructor]
|
||||
interface MediaController : EventTarget {
|
||||
readonly attribute unsigned short readyState; // uses HTMLMediaElement.readyState's values
|
||||
|
||||
readonly attribute TimeRanges buffered;
|
||||
readonly attribute TimeRanges seekable;
|
||||
readonly attribute unrestricted double duration;
|
||||
attribute double currentTime;
|
||||
|
||||
readonly attribute boolean paused;
|
||||
readonly attribute MediaControllerPlaybackState playbackState;
|
||||
readonly attribute TimeRanges played;
|
||||
void pause();
|
||||
void unpause();
|
||||
void play(); // calls play() on all media elements as well
|
||||
|
||||
attribute double defaultPlaybackRate;
|
||||
attribute double playbackRate;
|
||||
|
||||
attribute double volume;
|
||||
attribute boolean muted;
|
||||
|
||||
attribute EventHandler onemptied;
|
||||
attribute EventHandler onloadedmetadata;
|
||||
attribute EventHandler onloadeddata;
|
||||
attribute EventHandler oncanplay;
|
||||
attribute EventHandler oncanplaythrough;
|
||||
attribute EventHandler onplaying;
|
||||
attribute EventHandler onended;
|
||||
attribute EventHandler onwaiting;
|
||||
|
||||
attribute EventHandler ondurationchange;
|
||||
attribute EventHandler ontimeupdate;
|
||||
attribute EventHandler onplay;
|
||||
attribute EventHandler onpause;
|
||||
attribute EventHandler onratechange;
|
||||
attribute EventHandler onvolumechange;
|
||||
};
|
||||
|
||||
interface TextTrackList : EventTarget {
|
||||
readonly attribute unsigned long length;
|
||||
getter TextTrack (unsigned long index);
|
||||
|
@ -1472,7 +1419,6 @@ dictionary TrackEventInit : EventInit {
|
|||
interface HTMLMapElement : HTMLElement {
|
||||
attribute DOMString name;
|
||||
readonly attribute HTMLCollection areas;
|
||||
readonly attribute HTMLCollection images;
|
||||
};
|
||||
|
||||
interface HTMLAreaElement : HTMLElement {
|
||||
|
@ -1503,8 +1449,6 @@ interface HTMLTableElement : HTMLElement {
|
|||
readonly attribute HTMLCollection rows;
|
||||
HTMLElement insertRow(optional long index = -1);
|
||||
void deleteRow(long index);
|
||||
attribute boolean sortable;
|
||||
void stopSorting();
|
||||
|
||||
// also has obsolete members
|
||||
};
|
||||
|
@ -1570,8 +1514,6 @@ interface HTMLFormElement : HTMLElement {
|
|||
void reset();
|
||||
boolean checkValidity();
|
||||
boolean reportValidity();
|
||||
|
||||
void requestAutocomplete();
|
||||
};
|
||||
|
||||
interface HTMLLabelElement : HTMLElement {
|
||||
|
@ -1618,8 +1560,6 @@ interface HTMLInputElement : HTMLElement {
|
|||
[TreatNullAs=EmptyString] attribute DOMString value;
|
||||
attribute Date? valueAsDate;
|
||||
attribute unrestricted double valueAsNumber;
|
||||
attribute double valueLow;
|
||||
attribute double valueHigh;
|
||||
attribute unsigned long width;
|
||||
|
||||
void stepUp(optional long n = 1);
|
||||
|
@ -1845,17 +1785,6 @@ interface HTMLLegendElement : HTMLElement {
|
|||
// also has obsolete members
|
||||
};
|
||||
|
||||
enum AutocompleteErrorReason { "" /* empty string */, "cancel", "disabled", "invalid" };
|
||||
|
||||
[Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)]
|
||||
interface AutocompleteErrorEvent : Event {
|
||||
readonly attribute AutocompleteErrorReason reason;
|
||||
};
|
||||
|
||||
dictionary AutocompleteErrorEventInit : EventInit {
|
||||
AutocompleteErrorReason reason;
|
||||
};
|
||||
|
||||
enum SelectionMode {
|
||||
"select",
|
||||
"start",
|
||||
|
@ -1942,98 +1871,135 @@ dictionary AssignedNodesOptions {
|
|||
};
|
||||
|
||||
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
|
||||
callback BlobCallback = void (Blob? blob);
|
||||
|
||||
interface HTMLCanvasElement : HTMLElement {
|
||||
attribute unsigned long width;
|
||||
attribute unsigned long height;
|
||||
|
||||
RenderingContext? getContext(DOMString contextId, any... arguments);
|
||||
boolean probablySupportsContext(DOMString contextId, any... arguments);
|
||||
|
||||
void setContext(RenderingContext context);
|
||||
CanvasProxy transferControlToProxy();
|
||||
|
||||
DOMString toDataURL(optional DOMString type, any... arguments);
|
||||
void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);
|
||||
void toBlob(BlobCallback _callback, optional DOMString type, any... arguments);
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface CanvasProxy {
|
||||
void setContext(RenderingContext context);
|
||||
};
|
||||
// CanvasProxy implements Transferable;
|
||||
|
||||
typedef (HTMLImageElement or
|
||||
SVGImageElement) HTMLOrSVGImageElement;
|
||||
|
||||
typedef (HTMLOrSVGImageElement or
|
||||
HTMLVideoElement or
|
||||
HTMLCanvasElement or
|
||||
CanvasRenderingContext2D or
|
||||
ImageBitmap) CanvasImageSource;
|
||||
|
||||
enum CanvasFillRule { "nonzero", "evenodd" };
|
||||
|
||||
[Constructor(optional unsigned long width, unsigned long height), Exposed=(Window,Worker)]
|
||||
interface CanvasRenderingContext2D {
|
||||
dictionary CanvasRenderingContext2DSettings {
|
||||
boolean alpha = true;
|
||||
};
|
||||
|
||||
enum ImageSmoothingQuality { "low", "medium", "high" };
|
||||
|
||||
interface CanvasRenderingContext2D {
|
||||
// back-reference to the canvas
|
||||
readonly attribute HTMLCanvasElement canvas;
|
||||
};
|
||||
CanvasRenderingContext2D implements CanvasState;
|
||||
CanvasRenderingContext2D implements CanvasTransform;
|
||||
CanvasRenderingContext2D implements CanvasCompositing;
|
||||
CanvasRenderingContext2D implements CanvasImageSmoothing;
|
||||
CanvasRenderingContext2D implements CanvasFillStrokeStyles;
|
||||
CanvasRenderingContext2D implements CanvasShadowStyles;
|
||||
CanvasRenderingContext2D implements CanvasFilters;
|
||||
CanvasRenderingContext2D implements CanvasRect;
|
||||
CanvasRenderingContext2D implements CanvasDrawPath;
|
||||
CanvasRenderingContext2D implements CanvasUserInterface;
|
||||
CanvasRenderingContext2D implements CanvasText;
|
||||
CanvasRenderingContext2D implements CanvasDrawImage;
|
||||
CanvasRenderingContext2D implements CanvasHitRegion;
|
||||
CanvasRenderingContext2D implements CanvasImageData;
|
||||
CanvasRenderingContext2D implements CanvasPathDrawingStyles;
|
||||
CanvasRenderingContext2D implements CanvasTextDrawingStyles;
|
||||
CanvasRenderingContext2D implements CanvasPath;
|
||||
|
||||
// canvas dimensions
|
||||
attribute unsigned long width;
|
||||
attribute unsigned long height;
|
||||
|
||||
// for contexts that aren't directly fixed to a specific canvas
|
||||
void commit(); // push the image to the output bitmap
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasState {
|
||||
// state
|
||||
void save(); // push state on state stack
|
||||
void restore(); // pop state stack and restore state
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasTransform {
|
||||
// transformations (default transform is the identity matrix)
|
||||
attribute SVGMatrix currentTransform;
|
||||
void scale(unrestricted double x, unrestricted double y);
|
||||
void rotate(unrestricted double angle);
|
||||
void translate(unrestricted double x, unrestricted double y);
|
||||
void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
||||
|
||||
[NewObject] DOMMatrix getTransform();
|
||||
void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
||||
void setTransform(optional DOMMatrixInit transform);
|
||||
void resetTransform();
|
||||
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasCompositing {
|
||||
// compositing
|
||||
attribute unrestricted double globalAlpha; // (default 1.0)
|
||||
attribute DOMString globalCompositeOperation; // (default source-over)
|
||||
attribute unrestricted double globalAlpha; // (default 1.0)
|
||||
attribute DOMString globalCompositeOperation; // (default source-over)
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasImageSmoothing {
|
||||
// image smoothing
|
||||
attribute boolean imageSmoothingEnabled; // (default true)
|
||||
attribute boolean imageSmoothingEnabled; // (default true)
|
||||
attribute ImageSmoothingQuality imageSmoothingQuality; // (default low)
|
||||
|
||||
// colours and styles (see also the CanvasDrawingStyles interface)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasFillStrokeStyles {
|
||||
// colours and styles (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
|
||||
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
|
||||
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
|
||||
CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
|
||||
CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
|
||||
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasShadowStyles {
|
||||
// shadows
|
||||
attribute unrestricted double shadowOffsetX; // (default 0)
|
||||
attribute unrestricted double shadowOffsetY; // (default 0)
|
||||
attribute unrestricted double shadowBlur; // (default 0)
|
||||
attribute DOMString shadowColor; // (default transparent black)
|
||||
attribute unrestricted double shadowOffsetX; // (default 0)
|
||||
attribute unrestricted double shadowOffsetY; // (default 0)
|
||||
attribute unrestricted double shadowBlur; // (default 0)
|
||||
attribute DOMString shadowColor; // (default transparent black)
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasFilters {
|
||||
// filters
|
||||
attribute DOMString filter; // (default "none")
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasRect {
|
||||
// rects
|
||||
void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
||||
void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
||||
void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
||||
};
|
||||
|
||||
// path API (see also CanvasPathMethods)
|
||||
[NoInterfaceObject]
|
||||
interface CanvasDrawPath {
|
||||
// path API (see also CanvasPath)
|
||||
void beginPath();
|
||||
void fill(optional CanvasFillRule fillRule = "nonzero");
|
||||
void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero");
|
||||
void stroke();
|
||||
void stroke(Path2D path);
|
||||
void drawSystemFocusRing(Element element);
|
||||
void drawSystemFocusRing(Path2D path, Element element);
|
||||
boolean drawCustomFocusRing(Element element);
|
||||
boolean drawCustomFocusRing(Path2D path, Element element);
|
||||
void scrollPathIntoView();
|
||||
void scrollPathIntoView(Path2D path);
|
||||
void clip(optional CanvasFillRule fillRule = "nonzero");
|
||||
void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero");
|
||||
void resetClip();
|
||||
|
@ -2041,21 +2007,42 @@ interface CanvasRenderingContext2D {
|
|||
boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero");
|
||||
boolean isPointInStroke(unrestricted double x, unrestricted double y);
|
||||
boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
||||
};
|
||||
|
||||
// text (see also the CanvasDrawingStyles interface)
|
||||
[NoInterfaceObject]
|
||||
interface CanvasUserInterface {
|
||||
void drawFocusIfNeeded(Element element);
|
||||
void drawFocusIfNeeded(Path2D path, Element element);
|
||||
void scrollPathIntoView();
|
||||
void scrollPathIntoView(Path2D path);
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasText {
|
||||
// text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
|
||||
void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
||||
void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
||||
TextMetrics measureText(DOMString text);
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasDrawImage {
|
||||
// drawing images
|
||||
void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy);
|
||||
void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
|
||||
void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasHitRegion {
|
||||
// hit regions
|
||||
void addHitRegion(optional HitRegionOptions options);
|
||||
void removeHitRegion(DOMString id);
|
||||
void clearHitRegions();
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasImageData {
|
||||
// pixel manipulation
|
||||
ImageData createImageData(double sw, double sh);
|
||||
ImageData createImageData(ImageData imagedata);
|
||||
|
@ -2063,31 +2050,38 @@ interface CanvasRenderingContext2D {
|
|||
void putImageData(ImageData imagedata, double dx, double dy);
|
||||
void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
|
||||
};
|
||||
CanvasRenderingContext2D implements CanvasDrawingStyles;
|
||||
CanvasRenderingContext2D implements CanvasPathMethods;
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface CanvasDrawingStyles {
|
||||
enum CanvasLineCap { "butt", "round", "square" };
|
||||
enum CanvasLineJoin { "round", "bevel", "miter"};
|
||||
enum CanvasTextAlign { "start", "end", "left", "right", "center" };
|
||||
enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
|
||||
enum CanvasDirection { "ltr", "rtl", "inherit" };
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasPathDrawingStyles {
|
||||
// line caps/joins
|
||||
attribute unrestricted double lineWidth; // (default 1)
|
||||
attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
|
||||
attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
|
||||
attribute unrestricted double miterLimit; // (default 10)
|
||||
attribute unrestricted double lineWidth; // (default 1)
|
||||
attribute CanvasLineCap lineCap; // (default "butt")
|
||||
attribute CanvasLineJoin lineJoin; // (default "miter")
|
||||
attribute unrestricted double miterLimit; // (default 10)
|
||||
|
||||
// dashed lines
|
||||
void setLineDash(sequence<unrestricted double> segments); // default empty
|
||||
sequence<unrestricted double> getLineDash();
|
||||
attribute unrestricted double lineDashOffset;
|
||||
attribute unrestricted double lineDashOffset;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasTextDrawingStyles {
|
||||
// text
|
||||
attribute DOMString font; // (default 10px sans-serif)
|
||||
attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
|
||||
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
|
||||
attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit")
|
||||
attribute DOMString font; // (default 10px sans-serif)
|
||||
attribute CanvasTextAlign textAlign; // (default: "start")
|
||||
attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
|
||||
attribute CanvasDirection direction; // (default: "inherit")
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface CanvasPathMethods {
|
||||
interface CanvasPath {
|
||||
// shared path API methods
|
||||
void closePath();
|
||||
void moveTo(unrestricted double x, unrestricted double y);
|
||||
|
@ -2101,19 +2095,16 @@ interface CanvasPathMethods {
|
|||
void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false);
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface CanvasGradient {
|
||||
// opaque object
|
||||
void addColorStop(double offset, DOMString color);
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface CanvasPattern {
|
||||
// opaque object
|
||||
void setTransform(SVGMatrix transform);
|
||||
void setTransform(optional DOMMatrixInit transform);
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface TextMetrics {
|
||||
// x-direction
|
||||
readonly attribute double width; // advance width
|
||||
|
@ -2154,23 +2145,14 @@ interface ImageData {
|
|||
readonly attribute Uint8ClampedArray data;
|
||||
};
|
||||
|
||||
[Constructor(optional Element scope), Exposed=(Window,Worker)]
|
||||
interface DrawingStyle { };
|
||||
DrawingStyle implements CanvasDrawingStyles;
|
||||
|
||||
[Constructor,
|
||||
Constructor(Path2D path),
|
||||
Constructor(Path2D[] paths, optional CanvasFillRule fillRule = "nonzero"),
|
||||
Constructor(sequence<Path2D> paths, optional CanvasFillRule fillRule = "nonzero"),
|
||||
Constructor(DOMString d), Exposed=(Window,Worker)]
|
||||
interface Path2D {
|
||||
void addPath(Path2D path, optional SVGMatrix? transformation = null);
|
||||
void addPathByStrokingPath(Path2D path, CanvasDrawingStyles styles, optional SVGMatrix? transformation = null);
|
||||
void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
||||
void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
||||
void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth);
|
||||
void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth);
|
||||
void addPath(Path2D path, optional DOMMatrixInit transform);
|
||||
};
|
||||
Path2D implements CanvasPathMethods;
|
||||
Path2D implements CanvasPath;
|
||||
|
||||
partial interface MouseEvent {
|
||||
readonly attribute DOMString? region;
|
||||
|
@ -2418,8 +2400,6 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
|||
[NoInterfaceObject]
|
||||
interface GlobalEventHandlers {
|
||||
attribute EventHandler onabort;
|
||||
attribute EventHandler onautocomplete;
|
||||
attribute EventHandler onautocompleteerror;
|
||||
attribute EventHandler onblur;
|
||||
attribute EventHandler oncancel;
|
||||
attribute EventHandler oncanplay;
|
||||
|
@ -2472,7 +2452,6 @@ interface GlobalEventHandlers {
|
|||
attribute EventHandler onseeking;
|
||||
attribute EventHandler onselect;
|
||||
attribute EventHandler onshow;
|
||||
attribute EventHandler onsort;
|
||||
attribute EventHandler onstalled;
|
||||
attribute EventHandler onsubmit;
|
||||
attribute EventHandler onsuspend;
|
||||
|
@ -2482,6 +2461,13 @@ interface GlobalEventHandlers {
|
|||
attribute EventHandler onwaiting;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface DocumentAndElementEventHandlers {
|
||||
attribute EventHandler oncopy;
|
||||
attribute EventHandler oncut;
|
||||
attribute EventHandler onpaste;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface WindowEventHandlers {
|
||||
attribute EventHandler onafterprint;
|
||||
|
@ -2530,48 +2516,50 @@ Navigator implements NavigatorID;
|
|||
Navigator implements NavigatorLanguage;
|
||||
Navigator implements NavigatorOnLine;
|
||||
Navigator implements NavigatorContentUtils;
|
||||
Navigator implements NavigatorStorageUtils;
|
||||
Navigator implements NavigatorCookies;
|
||||
Navigator implements NavigatorPlugins;
|
||||
Navigator implements NavigatorConcurrentHardware;
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorID {
|
||||
readonly attribute DOMString appCodeName; // constant "Mozilla"
|
||||
readonly attribute DOMString appName;
|
||||
[Exposed=Window] readonly attribute DOMString appCodeName; // constant "Mozilla"
|
||||
readonly attribute DOMString appName; // constant "Netscape"
|
||||
readonly attribute DOMString appVersion;
|
||||
readonly attribute DOMString platform;
|
||||
readonly attribute DOMString product; // constant "Gecko"
|
||||
boolean taintEnabled(); // constant false
|
||||
[Exposed=Window] readonly attribute DOMString product; // constant "Gecko"
|
||||
[Exposed=Window] readonly attribute DOMString productSub;
|
||||
readonly attribute DOMString userAgent;
|
||||
[Exposed=Window] readonly attribute DOMString vendor;
|
||||
[Exposed=Window] readonly attribute DOMString vendorSub; // constant ""
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorLanguage {
|
||||
readonly attribute DOMString? language;
|
||||
readonly attribute DOMString[] languages;
|
||||
readonly attribute DOMString language;
|
||||
readonly attribute FrozenArray<DOMString> languages;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorContentUtils {
|
||||
// content handler registration
|
||||
void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
|
||||
void registerContentHandler(DOMString mimeType, DOMString url, DOMString title);
|
||||
DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url);
|
||||
DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url);
|
||||
void unregisterProtocolHandler(DOMString scheme, DOMString url);
|
||||
void unregisterContentHandler(DOMString mimeType, DOMString url);
|
||||
void registerProtocolHandler(DOMString scheme, USVString url, DOMString title);
|
||||
void registerContentHandler(DOMString mimeType, USVString url, DOMString title);
|
||||
DOMString isProtocolHandlerRegistered(DOMString scheme, USVString url);
|
||||
DOMString isContentHandlerRegistered(DOMString mimeType, USVString url);
|
||||
void unregisterProtocolHandler(DOMString scheme, USVString url);
|
||||
void unregisterContentHandler(DOMString mimeType, USVString url);
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorStorageUtils {
|
||||
interface NavigatorCookies {
|
||||
readonly attribute boolean cookieEnabled;
|
||||
void yieldForStorageUpdates();
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorPlugins {
|
||||
readonly attribute PluginArray plugins;
|
||||
readonly attribute MimeTypeArray mimeTypes;
|
||||
readonly attribute boolean javaEnabled;
|
||||
[SameObject] readonly attribute PluginArray plugins;
|
||||
[SameObject] readonly attribute MimeTypeArray mimeTypes;
|
||||
boolean javaEnabled();
|
||||
};
|
||||
|
||||
interface PluginArray {
|
||||
|
@ -2581,6 +2569,11 @@ interface PluginArray {
|
|||
getter Plugin? namedItem(DOMString name);
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorConcurrentHardware {
|
||||
readonly attribute unsigned long long hardwareConcurrency;
|
||||
};
|
||||
|
||||
interface MimeTypeArray {
|
||||
readonly attribute unsigned long length;
|
||||
getter MimeType? item(unsigned long index);
|
||||
|
@ -2730,16 +2723,6 @@ interface MessagePort : EventTarget {
|
|||
};
|
||||
// MessagePort implements Transferable;
|
||||
|
||||
[Constructor, Exposed=(Window,Worker)]
|
||||
interface PortCollection {
|
||||
void add(MessagePort port);
|
||||
void remove(MessagePort port);
|
||||
void clear();
|
||||
void iterate(PortCollectionCallback callback);
|
||||
};
|
||||
|
||||
callback PortCollectionCallback = void (MessagePort port);
|
||||
|
||||
[Constructor(DOMString channel), Exposed=(Window,Worker)]
|
||||
interface BroadcastChannel : EventTarget {
|
||||
readonly attribute DOMString name;
|
||||
|
@ -3181,7 +3164,6 @@ window.onload = function() {
|
|||
RadioNodeList: [],
|
||||
HTMLOptionsCollection: ['document.createElement("select").options'],
|
||||
DOMStringMap: ['document.head.dataset'],
|
||||
DOMElementMap: ['document.cssElementMap'],
|
||||
Transferable: [],
|
||||
Document: ['iframe.contentDocument', 'new Document()'],
|
||||
XMLDocument: ['document.implementation.createDocument(null, "", null)'],
|
||||
|
@ -3238,7 +3220,6 @@ window.onload = function() {
|
|||
AudioTrack: [],
|
||||
VideoTrackList: [],
|
||||
VideoTrack: [],
|
||||
MediaController: ['new MediaController()'],
|
||||
TextTrackList: ['document.createElement("video").textTracks'],
|
||||
TextTrack: ['document.createElement("track").track'],
|
||||
TextTrackCueList: ['document.createElement("video").addTextTrack("subtitles").cues'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue