mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
test: update WPT interfaces and hr-time
This commit updates the interfaces to https://github.com/web-platform-tests/wpt/tree/8ada332aea/interfaces and updates the hr-time test status: - `window-worker-timeOrigin.window.js` should be skipped because we don't implement `Blob` - `idlharness.any.js` should be skipped since the IDL parser needs to be updated, but the parser update would also result in an update of the test harness which in turn requires updates of other tests. We need to fix the URL implementation first, and then update the harness and all the tests. PR-URL: https://github.com/nodejs/node/pull/33297 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
11 files changed
+3395
-18
No files matched your search
Vendored
+1
-1
@@ -14,7 +14,7 @@ Last update:
|
||||
- encoding: https://github.com/web-platform-tests/wpt/tree/5059d2c777/encoding
|
||||
- url: https://github.com/web-platform-tests/wpt/tree/418f7fabeb/url
|
||||
- resources: https://github.com/web-platform-tests/wpt/tree/e1fddfbf80/resources
|
||||
- interfaces: https://github.com/web-platform-tests/wpt/tree/712c9f275e/interfaces
|
||||
- interfaces: https://github.com/web-platform-tests/wpt/tree/8ada332aea/interfaces
|
||||
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/0c3bed38df/html/webappapis/microtask-queuing
|
||||
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/ddfe9c089b/html/webappapis/timers
|
||||
- hr-time: https://github.com/web-platform-tests/wpt/tree/a5d1774ecf/hr-time
|
||||
|
||||
+2
-2
@@ -12,10 +12,10 @@ namespace console { // but see namespace object requirements below
|
||||
void error(any... data);
|
||||
void info(any... data);
|
||||
void log(any... data);
|
||||
void table(any tabularData, optional sequence<DOMString> properties);
|
||||
void table(optional any tabularData, optional sequence<DOMString> properties);
|
||||
void trace(any... data);
|
||||
void warn(any... data);
|
||||
void dir(any item, optional object? options);
|
||||
void dir(optional any item, optional object? options);
|
||||
void dirxml(any... data);
|
||||
|
||||
// Counting
|
||||
|
||||
Vendored
+622
@@ -0,0 +1,622 @@
|
||||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: DOM Standard (https://dom.spec.whatwg.org/)
|
||||
|
||||
[Exposed=(Window,Worker,AudioWorklet)]
|
||||
interface Event {
|
||||
constructor(DOMString type, optional EventInit eventInitDict = {});
|
||||
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute EventTarget? target;
|
||||
readonly attribute EventTarget? srcElement; // historical
|
||||
readonly attribute EventTarget? currentTarget;
|
||||
sequence<EventTarget> composedPath();
|
||||
|
||||
const unsigned short NONE = 0;
|
||||
const unsigned short CAPTURING_PHASE = 1;
|
||||
const unsigned short AT_TARGET = 2;
|
||||
const unsigned short BUBBLING_PHASE = 3;
|
||||
readonly attribute unsigned short eventPhase;
|
||||
|
||||
void stopPropagation();
|
||||
attribute boolean cancelBubble; // historical alias of .stopPropagation
|
||||
void stopImmediatePropagation();
|
||||
|
||||
readonly attribute boolean bubbles;
|
||||
readonly attribute boolean cancelable;
|
||||
attribute boolean returnValue; // historical
|
||||
void preventDefault();
|
||||
readonly attribute boolean defaultPrevented;
|
||||
readonly attribute boolean composed;
|
||||
|
||||
[LegacyUnforgeable] readonly attribute boolean isTrusted;
|
||||
readonly attribute DOMHighResTimeStamp timeStamp;
|
||||
|
||||
void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
|
||||
};
|
||||
|
||||
dictionary EventInit {
|
||||
boolean bubbles = false;
|
||||
boolean cancelable = false;
|
||||
boolean composed = false;
|
||||
};
|
||||
|
||||
partial interface Window {
|
||||
[Replaceable] readonly attribute any event; // historical
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface CustomEvent : Event {
|
||||
constructor(DOMString type, optional CustomEventInit eventInitDict = {});
|
||||
|
||||
readonly attribute any detail;
|
||||
|
||||
void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
|
||||
};
|
||||
|
||||
dictionary CustomEventInit : EventInit {
|
||||
any detail = null;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker,AudioWorklet)]
|
||||
interface EventTarget {
|
||||
constructor();
|
||||
|
||||
void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
|
||||
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
|
||||
boolean dispatchEvent(Event event);
|
||||
};
|
||||
|
||||
callback interface EventListener {
|
||||
void handleEvent(Event event);
|
||||
};
|
||||
|
||||
dictionary EventListenerOptions {
|
||||
boolean capture = false;
|
||||
};
|
||||
|
||||
dictionary AddEventListenerOptions : EventListenerOptions {
|
||||
boolean passive = false;
|
||||
boolean once = false;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface AbortController {
|
||||
constructor();
|
||||
|
||||
[SameObject] readonly attribute AbortSignal signal;
|
||||
|
||||
void abort();
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface AbortSignal : EventTarget {
|
||||
readonly attribute boolean aborted;
|
||||
|
||||
attribute EventHandler onabort;
|
||||
};
|
||||
interface mixin NonElementParentNode {
|
||||
Element? getElementById(DOMString elementId);
|
||||
};
|
||||
Document includes NonElementParentNode;
|
||||
DocumentFragment includes NonElementParentNode;
|
||||
|
||||
interface mixin DocumentOrShadowRoot {
|
||||
};
|
||||
Document includes DocumentOrShadowRoot;
|
||||
ShadowRoot includes DocumentOrShadowRoot;
|
||||
|
||||
interface mixin ParentNode {
|
||||
[SameObject] readonly attribute HTMLCollection children;
|
||||
readonly attribute Element? firstElementChild;
|
||||
readonly attribute Element? lastElementChild;
|
||||
readonly attribute unsigned long childElementCount;
|
||||
|
||||
[CEReactions, Unscopable] void prepend((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] void append((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] void replaceChildren((Node or DOMString)... nodes);
|
||||
|
||||
Element? querySelector(DOMString selectors);
|
||||
[NewObject] NodeList querySelectorAll(DOMString selectors);
|
||||
};
|
||||
Document includes ParentNode;
|
||||
DocumentFragment includes ParentNode;
|
||||
Element includes ParentNode;
|
||||
|
||||
interface mixin NonDocumentTypeChildNode {
|
||||
readonly attribute Element? previousElementSibling;
|
||||
readonly attribute Element? nextElementSibling;
|
||||
};
|
||||
Element includes NonDocumentTypeChildNode;
|
||||
CharacterData includes NonDocumentTypeChildNode;
|
||||
|
||||
interface mixin ChildNode {
|
||||
[CEReactions, Unscopable] void before((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] void after((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] void replaceWith((Node or DOMString)... nodes);
|
||||
[CEReactions, Unscopable] void remove();
|
||||
};
|
||||
DocumentType includes ChildNode;
|
||||
Element includes ChildNode;
|
||||
CharacterData includes ChildNode;
|
||||
|
||||
interface mixin Slottable {
|
||||
readonly attribute HTMLSlotElement? assignedSlot;
|
||||
};
|
||||
Element includes Slottable;
|
||||
Text includes Slottable;
|
||||
|
||||
[Exposed=Window]
|
||||
interface NodeList {
|
||||
getter Node? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
iterable<Node>;
|
||||
};
|
||||
|
||||
[Exposed=Window, LegacyUnenumerableNamedProperties]
|
||||
interface HTMLCollection {
|
||||
readonly attribute unsigned long length;
|
||||
getter Element? item(unsigned long index);
|
||||
getter Element? namedItem(DOMString name);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface MutationObserver {
|
||||
constructor(MutationCallback callback);
|
||||
|
||||
void observe(Node target, optional MutationObserverInit options = {});
|
||||
void disconnect();
|
||||
sequence<MutationRecord> takeRecords();
|
||||
};
|
||||
|
||||
callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer);
|
||||
|
||||
dictionary MutationObserverInit {
|
||||
boolean childList = false;
|
||||
boolean attributes;
|
||||
boolean characterData;
|
||||
boolean subtree = false;
|
||||
boolean attributeOldValue;
|
||||
boolean characterDataOldValue;
|
||||
sequence<DOMString> attributeFilter;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface MutationRecord {
|
||||
readonly attribute DOMString type;
|
||||
[SameObject] readonly attribute Node target;
|
||||
[SameObject] readonly attribute NodeList addedNodes;
|
||||
[SameObject] readonly attribute NodeList removedNodes;
|
||||
readonly attribute Node? previousSibling;
|
||||
readonly attribute Node? nextSibling;
|
||||
readonly attribute DOMString? attributeName;
|
||||
readonly attribute DOMString? attributeNamespace;
|
||||
readonly attribute DOMString? oldValue;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Node : EventTarget {
|
||||
const unsigned short ELEMENT_NODE = 1;
|
||||
const unsigned short ATTRIBUTE_NODE = 2;
|
||||
const unsigned short TEXT_NODE = 3;
|
||||
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;
|
||||
const unsigned short COMMENT_NODE = 8;
|
||||
const unsigned short DOCUMENT_NODE = 9;
|
||||
const unsigned short DOCUMENT_TYPE_NODE = 10;
|
||||
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
|
||||
const unsigned short NOTATION_NODE = 12; // historical
|
||||
readonly attribute unsigned short nodeType;
|
||||
readonly attribute DOMString nodeName;
|
||||
|
||||
readonly attribute USVString baseURI;
|
||||
|
||||
readonly attribute boolean isConnected;
|
||||
readonly attribute Document? ownerDocument;
|
||||
Node getRootNode(optional GetRootNodeOptions options = {});
|
||||
readonly attribute Node? parentNode;
|
||||
readonly attribute Element? parentElement;
|
||||
boolean hasChildNodes();
|
||||
[SameObject] readonly attribute NodeList childNodes;
|
||||
readonly attribute Node? firstChild;
|
||||
readonly attribute Node? lastChild;
|
||||
readonly attribute Node? previousSibling;
|
||||
readonly attribute Node? nextSibling;
|
||||
|
||||
[CEReactions] attribute DOMString? nodeValue;
|
||||
[CEReactions] attribute DOMString? textContent;
|
||||
[CEReactions] void normalize();
|
||||
|
||||
[CEReactions, NewObject] Node cloneNode(optional boolean deep = false);
|
||||
boolean isEqualNode(Node? otherNode);
|
||||
boolean isSameNode(Node? otherNode); // historical alias of ===
|
||||
|
||||
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
|
||||
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
|
||||
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
|
||||
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
|
||||
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
|
||||
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
|
||||
unsigned short compareDocumentPosition(Node other);
|
||||
boolean contains(Node? other);
|
||||
|
||||
DOMString? lookupPrefix(DOMString? namespace);
|
||||
DOMString? lookupNamespaceURI(DOMString? prefix);
|
||||
boolean isDefaultNamespace(DOMString? namespace);
|
||||
|
||||
[CEReactions] Node insertBefore(Node node, Node? child);
|
||||
[CEReactions] Node appendChild(Node node);
|
||||
[CEReactions] Node replaceChild(Node node, Node child);
|
||||
[CEReactions] Node removeChild(Node child);
|
||||
};
|
||||
|
||||
dictionary GetRootNodeOptions {
|
||||
boolean composed = false;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Document : Node {
|
||||
constructor();
|
||||
|
||||
[SameObject] readonly attribute DOMImplementation implementation;
|
||||
readonly attribute USVString URL;
|
||||
readonly attribute USVString documentURI;
|
||||
readonly attribute DOMString compatMode;
|
||||
readonly attribute DOMString characterSet;
|
||||
readonly attribute DOMString charset; // historical alias of .characterSet
|
||||
readonly attribute DOMString inputEncoding; // historical alias of .characterSet
|
||||
readonly attribute DOMString contentType;
|
||||
|
||||
readonly attribute DocumentType? doctype;
|
||||
readonly attribute Element? documentElement;
|
||||
HTMLCollection getElementsByTagName(DOMString qualifiedName);
|
||||
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
||||
HTMLCollection getElementsByClassName(DOMString classNames);
|
||||
|
||||
[CEReactions, NewObject] Element createElement(DOMString localName, optional (DOMString or ElementCreationOptions) options = {});
|
||||
[CEReactions, NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (DOMString or ElementCreationOptions) options = {});
|
||||
[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);
|
||||
|
||||
[CEReactions, NewObject] Node importNode(Node node, optional boolean deep = false);
|
||||
[CEReactions] Node adoptNode(Node node);
|
||||
|
||||
[NewObject] Attr createAttribute(DOMString localName);
|
||||
[NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName);
|
||||
|
||||
[NewObject] Event createEvent(DOMString interface); // historical
|
||||
|
||||
[NewObject] Range createRange();
|
||||
|
||||
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
|
||||
[NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
[NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface XMLDocument : Document {};
|
||||
|
||||
dictionary ElementCreationOptions {
|
||||
DOMString is;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DOMImplementation {
|
||||
[NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
|
||||
[NewObject] XMLDocument createDocument(DOMString? namespace, [LegacyNullToEmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
|
||||
[NewObject] Document createHTMLDocument(optional DOMString title);
|
||||
|
||||
boolean hasFeature(); // useless; always returns true
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DocumentType : Node {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute DOMString publicId;
|
||||
readonly attribute DOMString systemId;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DocumentFragment : Node {
|
||||
constructor();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface ShadowRoot : DocumentFragment {
|
||||
readonly attribute ShadowRootMode mode;
|
||||
readonly attribute Element host;
|
||||
attribute EventHandler onslotchange;
|
||||
};
|
||||
|
||||
enum ShadowRootMode { "open", "closed" };
|
||||
|
||||
[Exposed=Window]
|
||||
interface Element : Node {
|
||||
readonly attribute DOMString? namespaceURI;
|
||||
readonly attribute DOMString? prefix;
|
||||
readonly attribute DOMString localName;
|
||||
readonly attribute DOMString tagName;
|
||||
|
||||
[CEReactions] attribute DOMString id;
|
||||
[CEReactions] attribute DOMString className;
|
||||
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
|
||||
[CEReactions, Unscopable] attribute DOMString slot;
|
||||
|
||||
boolean hasAttributes();
|
||||
[SameObject] readonly attribute NamedNodeMap attributes;
|
||||
sequence<DOMString> getAttributeNames();
|
||||
DOMString? getAttribute(DOMString qualifiedName);
|
||||
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] void setAttribute(DOMString qualifiedName, DOMString value);
|
||||
[CEReactions] void setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
|
||||
[CEReactions] void removeAttribute(DOMString qualifiedName);
|
||||
[CEReactions] void removeAttributeNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
|
||||
boolean hasAttribute(DOMString qualifiedName);
|
||||
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
|
||||
|
||||
Attr? getAttributeNode(DOMString qualifiedName);
|
||||
Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] Attr? setAttributeNode(Attr attr);
|
||||
[CEReactions] Attr? setAttributeNodeNS(Attr attr);
|
||||
[CEReactions] Attr removeAttributeNode(Attr attr);
|
||||
|
||||
ShadowRoot attachShadow(ShadowRootInit init);
|
||||
readonly attribute ShadowRoot? shadowRoot;
|
||||
|
||||
Element? closest(DOMString selectors);
|
||||
boolean matches(DOMString selectors);
|
||||
boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
|
||||
|
||||
HTMLCollection getElementsByTagName(DOMString qualifiedName);
|
||||
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
||||
HTMLCollection getElementsByClassName(DOMString classNames);
|
||||
|
||||
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical
|
||||
void insertAdjacentText(DOMString where, DOMString data); // historical
|
||||
};
|
||||
|
||||
dictionary ShadowRootInit {
|
||||
required ShadowRootMode mode;
|
||||
boolean delegatesFocus = false;
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
LegacyUnenumerableNamedProperties]
|
||||
interface NamedNodeMap {
|
||||
readonly attribute unsigned long length;
|
||||
getter Attr? item(unsigned long index);
|
||||
getter Attr? getNamedItem(DOMString qualifiedName);
|
||||
Attr? getNamedItemNS(DOMString? namespace, DOMString localName);
|
||||
[CEReactions] Attr? setNamedItem(Attr attr);
|
||||
[CEReactions] Attr? setNamedItemNS(Attr attr);
|
||||
[CEReactions] Attr removeNamedItem(DOMString qualifiedName);
|
||||
[CEReactions] Attr removeNamedItemNS(DOMString? namespace, DOMString localName);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Attr : Node {
|
||||
readonly attribute DOMString? namespaceURI;
|
||||
readonly attribute DOMString? prefix;
|
||||
readonly attribute DOMString localName;
|
||||
readonly attribute DOMString name;
|
||||
[CEReactions] attribute DOMString value;
|
||||
|
||||
readonly attribute Element? ownerElement;
|
||||
|
||||
readonly attribute boolean specified; // useless; always returns true
|
||||
};
|
||||
[Exposed=Window]
|
||||
interface CharacterData : Node {
|
||||
attribute [LegacyNullToEmptyString] DOMString data;
|
||||
readonly attribute unsigned long length;
|
||||
DOMString substringData(unsigned long offset, unsigned long count);
|
||||
void appendData(DOMString data);
|
||||
void insertData(unsigned long offset, DOMString data);
|
||||
void deleteData(unsigned long offset, unsigned long count);
|
||||
void replaceData(unsigned long offset, unsigned long count, DOMString data);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Text : CharacterData {
|
||||
constructor(optional DOMString data = "");
|
||||
|
||||
[NewObject] Text splitText(unsigned long offset);
|
||||
readonly attribute DOMString wholeText;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface CDATASection : Text {
|
||||
};
|
||||
[Exposed=Window]
|
||||
interface ProcessingInstruction : CharacterData {
|
||||
readonly attribute DOMString target;
|
||||
};
|
||||
[Exposed=Window]
|
||||
interface Comment : CharacterData {
|
||||
constructor(optional DOMString data = "");
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface AbstractRange {
|
||||
readonly attribute Node startContainer;
|
||||
readonly attribute unsigned long startOffset;
|
||||
readonly attribute Node endContainer;
|
||||
readonly attribute unsigned long endOffset;
|
||||
readonly attribute boolean collapsed;
|
||||
};
|
||||
|
||||
dictionary StaticRangeInit {
|
||||
required Node startContainer;
|
||||
required unsigned long startOffset;
|
||||
required Node endContainer;
|
||||
required unsigned long endOffset;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface StaticRange : AbstractRange {
|
||||
constructor(StaticRangeInit init);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface Range : AbstractRange {
|
||||
constructor();
|
||||
|
||||
readonly attribute Node commonAncestorContainer;
|
||||
|
||||
void setStart(Node node, unsigned long offset);
|
||||
void setEnd(Node node, unsigned long offset);
|
||||
void setStartBefore(Node node);
|
||||
void setStartAfter(Node node);
|
||||
void setEndBefore(Node node);
|
||||
void setEndAfter(Node node);
|
||||
void collapse(optional boolean toStart = false);
|
||||
void selectNode(Node node);
|
||||
void selectNodeContents(Node node);
|
||||
|
||||
const unsigned short START_TO_START = 0;
|
||||
const unsigned short START_TO_END = 1;
|
||||
const unsigned short END_TO_END = 2;
|
||||
const unsigned short END_TO_START = 3;
|
||||
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
|
||||
[CEReactions] void deleteContents();
|
||||
[CEReactions, NewObject] DocumentFragment extractContents();
|
||||
[CEReactions, NewObject] DocumentFragment cloneContents();
|
||||
[CEReactions] void insertNode(Node node);
|
||||
[CEReactions] void surroundContents(Node newParent);
|
||||
|
||||
[NewObject] Range cloneRange();
|
||||
void detach();
|
||||
|
||||
boolean isPointInRange(Node node, unsigned long offset);
|
||||
short comparePoint(Node node, unsigned long offset);
|
||||
|
||||
boolean intersectsNode(Node node);
|
||||
|
||||
stringifier;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface NodeIterator {
|
||||
[SameObject] readonly attribute Node root;
|
||||
readonly attribute Node referenceNode;
|
||||
readonly attribute boolean pointerBeforeReferenceNode;
|
||||
readonly attribute unsigned long whatToShow;
|
||||
readonly attribute NodeFilter? filter;
|
||||
|
||||
Node? nextNode();
|
||||
Node? previousNode();
|
||||
|
||||
void detach();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface TreeWalker {
|
||||
[SameObject] readonly attribute Node root;
|
||||
readonly attribute unsigned long whatToShow;
|
||||
readonly attribute NodeFilter? filter;
|
||||
attribute Node currentNode;
|
||||
|
||||
Node? parentNode();
|
||||
Node? firstChild();
|
||||
Node? lastChild();
|
||||
Node? previousSibling();
|
||||
Node? nextSibling();
|
||||
Node? previousNode();
|
||||
Node? nextNode();
|
||||
};
|
||||
[Exposed=Window]
|
||||
callback interface NodeFilter {
|
||||
// Constants for acceptNode()
|
||||
const unsigned short FILTER_ACCEPT = 1;
|
||||
const unsigned short FILTER_REJECT = 2;
|
||||
const unsigned short FILTER_SKIP = 3;
|
||||
|
||||
// Constants for whatToShow
|
||||
const unsigned long SHOW_ALL = 0xFFFFFFFF;
|
||||
const unsigned long SHOW_ELEMENT = 0x1;
|
||||
const unsigned long SHOW_ATTRIBUTE = 0x2;
|
||||
const unsigned long SHOW_TEXT = 0x4;
|
||||
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;
|
||||
const unsigned long SHOW_COMMENT = 0x80;
|
||||
const unsigned long SHOW_DOCUMENT = 0x100;
|
||||
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
|
||||
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
|
||||
const unsigned long SHOW_NOTATION = 0x800; // historical
|
||||
|
||||
unsigned short acceptNode(Node node);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface DOMTokenList {
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
boolean contains(DOMString token);
|
||||
[CEReactions] void add(DOMString... tokens);
|
||||
[CEReactions] void remove(DOMString... tokens);
|
||||
[CEReactions] boolean toggle(DOMString token, optional boolean force);
|
||||
[CEReactions] boolean replace(DOMString token, DOMString newToken);
|
||||
boolean supports(DOMString token);
|
||||
[CEReactions] stringifier attribute DOMString value;
|
||||
iterable<DOMString>;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface XPathResult {
|
||||
const unsigned short ANY_TYPE = 0;
|
||||
const unsigned short NUMBER_TYPE = 1;
|
||||
const unsigned short STRING_TYPE = 2;
|
||||
const unsigned short BOOLEAN_TYPE = 3;
|
||||
const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
|
||||
const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
|
||||
const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
|
||||
const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
|
||||
const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
|
||||
const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
|
||||
|
||||
readonly attribute unsigned short resultType;
|
||||
readonly attribute unrestricted double numberValue;
|
||||
readonly attribute DOMString stringValue;
|
||||
readonly attribute boolean booleanValue;
|
||||
readonly attribute Node? singleNodeValue;
|
||||
readonly attribute boolean invalidIteratorState;
|
||||
readonly attribute unsigned long snapshotLength;
|
||||
|
||||
Node? iterateNext();
|
||||
Node? snapshotItem(unsigned long index);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface XPathExpression {
|
||||
// XPathResult.ANY_TYPE = 0
|
||||
XPathResult evaluate(Node contextNode, optional unsigned short type = 0, optional XPathResult? result = null);
|
||||
};
|
||||
|
||||
callback interface XPathNSResolver {
|
||||
DOMString? lookupNamespaceURI(DOMString? prefix);
|
||||
};
|
||||
|
||||
interface mixin XPathEvaluatorBase {
|
||||
[NewObject] XPathExpression createExpression(DOMString expression, optional XPathNSResolver? resolver = null);
|
||||
XPathNSResolver createNSResolver(Node nodeResolver);
|
||||
// XPathResult.ANY_TYPE = 0
|
||||
XPathResult evaluate(DOMString expression, Node contextNode, optional XPathNSResolver? resolver = null, optional unsigned short type = 0, optional XPathResult? result = null);
|
||||
};
|
||||
Document includes XPathEvaluatorBase;
|
||||
|
||||
[Exposed=Window]
|
||||
interface XPathEvaluator {
|
||||
constructor();
|
||||
};
|
||||
|
||||
XPathEvaluator includes XPathEvaluatorBase;
|
||||
+17
-9
@@ -18,10 +18,11 @@ dictionary TextDecodeOptions {
|
||||
boolean stream = false;
|
||||
};
|
||||
|
||||
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
|
||||
Exposed=(Window,Worker)]
|
||||
[Exposed=(Window,Worker)]
|
||||
interface TextDecoder {
|
||||
USVString decode(optional BufferSource input, optional TextDecodeOptions options);
|
||||
constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
|
||||
|
||||
USVString decode(optional [AllowShared] BufferSource input, optional TextDecodeOptions options = {});
|
||||
};
|
||||
TextDecoder includes TextDecoderCommon;
|
||||
|
||||
@@ -29,10 +30,17 @@ interface mixin TextEncoderCommon {
|
||||
readonly attribute DOMString encoding;
|
||||
};
|
||||
|
||||
[Constructor,
|
||||
Exposed=(Window,Worker)]
|
||||
dictionary TextEncoderEncodeIntoResult {
|
||||
unsigned long long read;
|
||||
unsigned long long written;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface TextEncoder {
|
||||
constructor();
|
||||
|
||||
[NewObject] Uint8Array encode(optional USVString input = "");
|
||||
TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
|
||||
};
|
||||
TextEncoder includes TextEncoderCommon;
|
||||
|
||||
@@ -41,16 +49,16 @@ interface mixin GenericTransformStream {
|
||||
readonly attribute WritableStream writable;
|
||||
};
|
||||
|
||||
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
|
||||
Exposed=(Window,Worker)]
|
||||
[Exposed=(Window,Worker)]
|
||||
interface TextDecoderStream {
|
||||
constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
|
||||
};
|
||||
TextDecoderStream includes TextDecoderCommon;
|
||||
TextDecoderStream includes GenericTransformStream;
|
||||
|
||||
[Constructor,
|
||||
Exposed=(Window,Worker)]
|
||||
[Exposed=(Window,Worker)]
|
||||
interface TextEncoderStream {
|
||||
constructor();
|
||||
};
|
||||
TextEncoderStream includes TextEncoderCommon;
|
||||
TextEncoderStream includes GenericTransformStream;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: High Resolution Time (https://w3c.github.io/hr-time/)
|
||||
|
||||
typedef double DOMHighResTimeStamp;
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface Performance : EventTarget {
|
||||
DOMHighResTimeStamp now();
|
||||
readonly attribute DOMHighResTimeStamp timeOrigin;
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
partial interface mixin WindowOrWorkerGlobalScope {
|
||||
[Replaceable] readonly attribute Performance performance;
|
||||
};
|
||||
+2615
File diff suppressed because it is too large.
Load diff
Vendored
+6
-4
@@ -3,10 +3,11 @@
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: URL Standard (https://url.spec.whatwg.org/)
|
||||
|
||||
[Constructor(USVString url, optional USVString base),
|
||||
Exposed=(Window,Worker),
|
||||
[Exposed=(Window,Worker),
|
||||
LegacyWindowAlias=webkitURL]
|
||||
interface URL {
|
||||
constructor(USVString url, optional USVString base);
|
||||
|
||||
stringifier attribute USVString href;
|
||||
readonly attribute USVString origin;
|
||||
attribute USVString protocol;
|
||||
@@ -23,9 +24,10 @@ interface URL {
|
||||
USVString toJSON();
|
||||
};
|
||||
|
||||
[Constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""),
|
||||
Exposed=(Window,Worker)]
|
||||
[Exposed=(Window,Worker)]
|
||||
interface URLSearchParams {
|
||||
constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = "");
|
||||
|
||||
void append(USVString name, USVString value);
|
||||
void delete(USVString name);
|
||||
USVString? get(USVString name);
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
// NOTE(edvardt):
|
||||
// This file is a slimmed down wrapper for the old SVGAnimationTestCase.js,
|
||||
// it has some convenience functions and should not be used for new tests.
|
||||
// New tests should not build on this API as it's just meant to keep things
|
||||
// working.
|
||||
|
||||
// Helper functions
|
||||
const xlinkNS = "http://www.w3.org/1999/xlink"
|
||||
|
||||
function expectFillColor(element, red, green, blue, message) {
|
||||
let color = window.getComputedStyle(element, null).fill;
|
||||
var re = new RegExp("rgba?\\(([^, ]*), ([^, ]*), ([^, ]*)(?:, )?([^, ]*)\\)");
|
||||
rgb = re.exec(color);
|
||||
|
||||
assert_approx_equals(Number(rgb[1]), red, 2.0, message);
|
||||
assert_approx_equals(Number(rgb[2]), green, 2.0, message);
|
||||
assert_approx_equals(Number(rgb[3]), blue, 2.0, message);
|
||||
}
|
||||
|
||||
function expectColor(element, red, green, blue, property) {
|
||||
if (typeof property != "string")
|
||||
color = getComputedStyle(element).getPropertyValue("color");
|
||||
else
|
||||
color = getComputedStyle(element).getPropertyValue(property);
|
||||
var re = new RegExp("rgba?\\(([^, ]*), ([^, ]*), ([^, ]*)(?:, )?([^, ]*)\\)");
|
||||
rgb = re.exec(color);
|
||||
assert_approx_equals(Number(rgb[1]), red, 2.0);
|
||||
assert_approx_equals(Number(rgb[2]), green, 2.0);
|
||||
assert_approx_equals(Number(rgb[3]), blue, 2.0);
|
||||
}
|
||||
|
||||
function createSVGElement(type) {
|
||||
return document.createElementNS("http://www.w3.org/2000/svg", type);
|
||||
}
|
||||
|
||||
// Inspired by Layoutests/animations/animation-test-helpers.js
|
||||
function moveAnimationTimelineAndSample(index) {
|
||||
var animationId = expectedResults[index][0];
|
||||
var time = expectedResults[index][1];
|
||||
var sampleCallback = expectedResults[index][2];
|
||||
var animation = rootSVGElement.ownerDocument.getElementById(animationId);
|
||||
|
||||
// If we want to sample the animation end, add a small delta, to reliable point past the end of the animation.
|
||||
newTime = time;
|
||||
|
||||
// The sample time is relative to the start time of the animation, take that into account.
|
||||
rootSVGElement.setCurrentTime(newTime);
|
||||
|
||||
// NOTE(edvardt):
|
||||
// This is a dumb hack, some of the old tests sampled before the animation start, this
|
||||
// isn't technically part of the animation tests and is "impossible" to translate since
|
||||
// tests start automatically. Thus I solved it by skipping it.
|
||||
if (time != 0.0)
|
||||
sampleCallback();
|
||||
}
|
||||
|
||||
var currentTest = 0;
|
||||
var expectedResults;
|
||||
|
||||
function sampleAnimation(t) {
|
||||
if (currentTest == expectedResults.length) {
|
||||
t.done();
|
||||
return;
|
||||
}
|
||||
|
||||
moveAnimationTimelineAndSample(currentTest);
|
||||
++currentTest;
|
||||
|
||||
step_timeout(t.step_func(function () { sampleAnimation(t); }), 0);
|
||||
}
|
||||
|
||||
function runAnimationTest(t, expected) {
|
||||
if (!expected)
|
||||
throw("Expected results are missing!");
|
||||
if (currentTest > 0)
|
||||
throw("Not allowed to call runAnimationTest() twice");
|
||||
|
||||
expectedResults = expected;
|
||||
testCount = expectedResults.length;
|
||||
currentTest = 0;
|
||||
|
||||
step_timeout(t.step_func(function () { sampleAnimation(this); }), 50);
|
||||
}
|
||||
|
||||
function smil_async_test(func) {
|
||||
async_test(t => {
|
||||
window.onload = t.step_func(function () {
|
||||
// Pause animations, we'll drive them manually.
|
||||
// This also ensures that the timeline is paused before
|
||||
// it starts. This should make the instance time of the below
|
||||
// 'click' (for instance) 0, and hence minimize rounding
|
||||
// errors for the addition in moveAnimationTimelineAndSample.
|
||||
rootSVGElement.pauseAnimations();
|
||||
|
||||
// If eg. an animation is running with begin="0s", and
|
||||
// we want to sample the first time, before the animation
|
||||
// starts, then we can't delay the testing by using an
|
||||
// onclick event, as the animation would be past start time.
|
||||
func(t);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
This directory contains a built version of the [webidl2.js library](https://github.com/w3c/webidl2.js).
|
||||
It is built by running `npm run build-debug` at the root of that repository.
|
||||
|
||||
The `webidl2.js.headers` file is a local addition to ensure the script is interpreted as UTF-8.
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@
|
||||
"path": "resources"
|
||||
},
|
||||
"interfaces": {
|
||||
"commit": "712c9f275e83997884749dbcaa503f12c0ff5bba",
|
||||
"commit": "8ada332aeac03764f73ec7ff66f682c5c0b454b4",
|
||||
"path": "interfaces"
|
||||
},
|
||||
"html/webappapis/microtask-queuing": {
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
{}
|
||||
{
|
||||
"window-worker-timeOrigin.window.js": {
|
||||
"fail": "Blob is not defined"
|
||||
},
|
||||
"idlharness.any.js": {
|
||||
"skip": "TODO: update IDL parser"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user