Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remaining IDL implements #17060

Merged
merged 3 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 40 additions & 30 deletions domxpath/interfaces.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,61 @@
<script src='/resources/WebIDLParser.js'></script>
<script src='/resources/idlharness.js'></script>
<script type='text/plain'>
[Constructor] interface XPathEvaluator {
[NewObject] XPathExpression createExpression(DOMString expression,
optional XPathNSResolver? resolver);
Node createNSResolver(Node nodeResolver);
XPathResult evaluate(DOMString expression, Node contextNode,
optional XPathNSResolver? resolver,
optional unsigned short type,
optional object? result);
[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;
// Maybe "DOMString?".
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 evaluate(Node contextNode,
optional unsigned short type,
optional object? result);
optional XPathResult? result);
};

callback interface XPathNSResolver {
DOMString? lookupNamespaceURI(DOMString? prefix);
};

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 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);
interface mixin XPathEvaluatorBase {
[NewObject] XPathExpression createExpression(DOMString expression,
optional XPathNSResolver? resolver);
XPathNSResolver createNSResolver(Node nodeResolver);
XPathResult evaluate(DOMString expression,
Node contextNode,
optional XPathNSResolver? resolver,
optional unsigned short type,
optional XPathResult? result);
};

[Exposed=Window, Constructor]
interface XPathEvaluator {};

XPathEvaluator includes XPathEvaluatorBase;
</script>
<script type='text/plain' class='untested'>
interface Document {};
Document implements XPathEvaluator;
Document includes XPathEvaluatorBase;
</script>
<script>
"use strict";
Expand Down
30 changes: 15 additions & 15 deletions interfaces/dedicated-workers.idl
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {

typedef (DOMString or Function) TimerHandler;

[NoInterfaceObject, Exposed=(Window,Worker)]
interface WindowOrWorkerGlobalScope {
[Exposed=(Window,Worker)]
interface mixin WindowOrWorkerGlobalScope {
[Replaceable] readonly attribute USVString origin;

// base64 utility methods
Expand All @@ -79,17 +79,17 @@ interface WindowOrWorkerGlobalScope {
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options);
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options);
};
WorkerGlobalScope implements WindowOrWorkerGlobalScope;
WorkerGlobalScope includes WindowOrWorkerGlobalScope;

[Exposed=Worker]
interface WorkerNavigator {};
WorkerNavigator implements NavigatorID;
WorkerNavigator implements NavigatorLanguage;
WorkerNavigator implements NavigatorOnLine;
WorkerNavigator implements NavigatorConcurrentHardware;
WorkerNavigator includes NavigatorID;
WorkerNavigator includes NavigatorLanguage;
WorkerNavigator includes NavigatorOnLine;
WorkerNavigator includes NavigatorConcurrentHardware;

[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorID {
[Exposed=(Window,Worker)]
interface mixin NavigatorID {
readonly attribute DOMString appCodeName; // constant "Mozilla"
readonly attribute DOMString appName; // constant "Netscape"
readonly attribute DOMString appVersion;
Expand All @@ -103,19 +103,19 @@ interface NavigatorID {
// also has additional members in a partial interface
};

[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorLanguage {
[Exposed=(Window,Worker)]
interface mixin NavigatorLanguage {
readonly attribute DOMString language;
readonly attribute FrozenArray<DOMString> languages;
};

[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorOnLine {
[Exposed=(Window,Worker)]
interface mixin NavigatorOnLine {
readonly attribute boolean onLine;
};

[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorConcurrentHardware {
[Exposed=(Window,Worker)]
interface mixin NavigatorConcurrentHardware {
readonly attribute unsigned long long hardwareConcurrency;
};

Expand Down