WebKit Bugzilla
Attachment 348908 Details for
Bug 189303
: Update idlharness.js and webidl2.js.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189303-20180905154157.patch (text/plain), 583.86 KB, created by
Ms2ger (he/him; ⌚ UTC+1/+2)
on 2018-09-05 06:42:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ms2ger (he/him; ⌚ UTC+1/+2)
Created:
2018-09-05 06:42:00 PDT
Size:
583.86 KB
patch
obsolete
>Subversion Revision: 235664 >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index cf7b31b0ff0b0823f5dc2948d8d5e026eb1b9ac9..01e18f33fc272c1d3003acef7dd9c9e198786118 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,189 @@ >+2018-09-05 Ms2ger <Ms2ger@igalia.com> >+ >+ Update idlharness.js and webidl2.js. >+ https://bugs.webkit.org/show_bug.cgi?id=189303 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/resources/idlharness.js: >+ * web-platform-tests/resources/webidl2/CHANGELOG.md: Added. >+ * web-platform-tests/resources/webidl2/README.md: >+ * web-platform-tests/resources/webidl2/checker/index.html: Added. >+ * web-platform-tests/resources/webidl2/checker/w3c-import.log: Added. >+ * web-platform-tests/resources/webidl2/lib/w3c-import.log: >+ * web-platform-tests/resources/webidl2/lib/webidl2.js: >+ * web-platform-tests/resources/webidl2/lib/writer.js: >+ * web-platform-tests/resources/webidl2/package-lock.json: Added. >+ * web-platform-tests/resources/webidl2/package.json: >+ * web-platform-tests/resources/webidl2/test/invalid.js: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/array.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/array.widl. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/caller.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/caller.widl. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/duplicate.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/exception.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/iterator.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterator.widl. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon-callback.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/promise-with-extended-attribute.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/record-key-with-extended-attribute.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/setter-creator.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/stray-slash.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.idl. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl: >+ * web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/idl/w3c-import.log: >+ * web-platform-tests/resources/webidl2/test/invalid/json/array.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/caller.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/duplicate.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/enum.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/exception.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/iterator.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/module.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon-callback.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/promise-with-extended-attribute.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/raises.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/record-key-with-extended-attribute.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/record-key.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/record-single.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/setter-creator.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/stray-slash.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json: >+ * web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/union-one.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json: Added. >+ * web-platform-tests/resources/webidl2/test/invalid/json/w3c-import.log: >+ * web-platform-tests/resources/webidl2/test/syntax.js: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/exception-inheritance.widl: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/idl/exception.widl: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/indexed-properties.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/mixin.widl: Added. >+ * web-platform-tests/resources/webidl2/test/syntax/idl/overloading.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl: Added. >+ * web-platform-tests/resources/webidl2/test/syntax/idl/record.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/serializer.widl: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.widl: Renamed from LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.idl. >+ * web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl: >+ * web-platform-tests/resources/webidl2/test/syntax/idl/w3c-import.log: >+ * web-platform-tests/resources/webidl2/test/syntax/json/allowany.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/array.json: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/json/attributes.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/callback.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/caller.json: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/json/constants.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/constructor.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/documentation-dos.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/documentation.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/enum.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/exception.json: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/generic.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/implements.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/iterable.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/iterator.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/maplike.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/mixin.json: Added. >+ * web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/namespace.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/nullable.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/overloading.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/primitives.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json: Added. >+ * web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/record.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/sequence.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/serializer.json: Removed. >+ * web-platform-tests/resources/webidl2/test/syntax/json/setlike.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/static.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/typedef.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json: >+ * web-platform-tests/resources/webidl2/test/syntax/json/w3c-import.log: >+ * web-platform-tests/resources/webidl2/test/util/acquire.js: Added. >+ * web-platform-tests/resources/webidl2/test/util/collect.js: Added. >+ * web-platform-tests/resources/webidl2/test/util/w3c-import.log: Added. >+ * web-platform-tests/resources/webidl2/test/w3c-import.log: >+ * web-platform-tests/resources/webidl2/test/web/w3c-import.log: >+ * web-platform-tests/resources/webidl2/test/writer.js: Added. >+ * web-platform-tests/resources/webidl2/w3c-import.log: >+ > 2018-09-04 Frederic Wang <fwang@igalia.com> > > Add basic support for ScrollIntoViewOptions >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/idlharness.js b/LayoutTests/imported/w3c/web-platform-tests/resources/idlharness.js >index c3045c49f909c9514597a6d6f8a9a3f7fe0f4df2..a088bc4c2a78002500fb879410e1800f16845af7 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/idlharness.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/idlharness.js >@@ -48,6 +48,13 @@ policies and contribution forms [3]. > */ > (function(){ > "use strict"; >+// Support subsetTestByKey from /common/subset-tests-by-key.js, but make it optional >+if (!('subsetTestByKey' in self)) { >+ self.subsetTestByKey = function(key, callback, ...args) { >+ return callback(...args); >+ } >+ self.shouldRunSubTest = () => true; >+} > /// Helpers /// > function constValue (cnt) > //@{ >@@ -63,6 +70,11 @@ function constValue (cnt) > function minOverloadLength(overloads) > //@{ > { >+ // "The value of the Function objectâs âlengthâ property is >+ // a Number determined as follows: >+ // ". . . >+ // "Return the length of the shortest argument list of the >+ // entries in S." > if (!overloads.length) { > return 0; > } >@@ -183,11 +195,19 @@ self.IdlArray = function() > * A implements C; > * D implements E; > * >- * results in { A: ["B", "C"], D: ["E"] }. >+ * results in this["implements"] = { A: ["B", "C"], D: ["E"] }. >+ * >+ * Similarly, >+ * >+ * interface A : B {}; >+ * interface B : C {}; >+ * >+ * results in this["inheritance"] = { A: "B", B: "C" } > */ > this.partials = []; > this["implements"] = {}; > this["includes"] = {}; >+ this["inheritance"] = {}; > }; > > //@} >@@ -204,19 +224,142 @@ IdlArray.prototype.add_untested_idls = function(raw_idls, options) > { > /** Entry point. See documentation at beginning of file. */ > var parsed_idls = WebIDL2.parse(raw_idls); >- for (var i = 0; i < parsed_idls.length; i++) >- { >+ this.mark_as_untested(parsed_idls); >+ this.internal_add_idls(parsed_idls, options); >+}; >+ >+//@} >+IdlArray.prototype.mark_as_untested = function (parsed_idls) >+//@{ >+{ >+ for (var i = 0; i < parsed_idls.length; i++) { > parsed_idls[i].untested = true; >- if ("members" in parsed_idls[i]) >- { >- for (var j = 0; j < parsed_idls[i].members.length; j++) >- { >+ if ("members" in parsed_idls[i]) { >+ for (var j = 0; j < parsed_idls[i].members.length; j++) { > parsed_idls[i].members[j].untested = true; > } > } > } >- this.internal_add_idls(parsed_idls, options); > }; >+//@} >+ >+//@} >+IdlArray.prototype.is_excluded_by_options = function (name, options) >+//@{ >+{ >+ return options && >+ (options.except && options.except.includes(name) >+ || options.only && !options.only.includes(name)); >+}; >+//@} >+ >+//@} >+IdlArray.prototype.add_dependency_idls = function(raw_idls, options) >+//@{ >+{ >+ const parsed_idls = WebIDL2.parse(raw_idls); >+ const new_options = { only: [] } >+ >+ const all_deps = new Set(); >+ Object.values(this.inheritance).forEach(v => all_deps.add(v)); >+ Object.entries(this.implements).forEach(([k, v]) => { >+ all_deps.add(k); >+ all_deps.add(v); >+ }); >+ // NOTE: If 'A includes B' for B that we care about, then A is also a dep. >+ Object.keys(this.includes).forEach(k => { >+ all_deps.add(k); >+ this.includes[k].forEach(v => all_deps.add(v)); >+ }); >+ this.partials.map(p => p.name).forEach(v => all_deps.add(v)); >+ // Add the attribute idlTypes of all the nested members of all tested idls. >+ for (const obj of [this.members, this.partials]) { >+ const tested = Object.values(obj).filter(m => !m.untested && m.members); >+ for (const parsed of tested) { >+ for (const attr of Object.values(parsed.members).filter(m => !m.untested && m.type === 'attribute')) { >+ all_deps.add(attr.idlType.idlType); >+ } >+ } >+ } >+ >+ if (options && options.except && options.only) { >+ throw new IdlHarnessError("The only and except options can't be used together."); >+ } >+ >+ const should_skip = name => { >+ // NOTE: Deps are untested, so we're lenient, and skip re-encountered definitions. >+ // e.g. for 'idl' containing A:B, B:C, C:D >+ // array.add_idls(idl, {only: ['A','B']}). >+ // array.add_dependency_idls(idl); >+ // B would be encountered as tested, and encountered as a dep, so we ignore. >+ return name in this.members >+ || this.is_excluded_by_options(name, options); >+ } >+ // Record of skipped items, in case we later determine they are a dependency. >+ // Maps name -> [parsed_idl, ...] >+ const skipped = new Map(); >+ const process = function(parsed) { >+ var deps = []; >+ if (parsed.name) { >+ deps.push(parsed.name); >+ } else if (parsed.type === "implements") { >+ deps.push(parsed.target); >+ deps.push(parsed.implements); >+ } else if (parsed.type === "includes") { >+ deps.push(parsed.target); >+ deps.push(parsed.includes); >+ } >+ >+ deps = deps.filter(function(name) { >+ if (!name || should_skip(name) || !all_deps.has(name)) { >+ // Flag as skipped, if it's not already processed, so we can >+ // come back to it later if we retrospectively call it a dep. >+ if (name && !(name in this.members)) { >+ skipped.has(name) >+ ? skipped.get(name).push(parsed) >+ : skipped.set(name, [parsed]); >+ } >+ return false; >+ } >+ return true; >+ }.bind(this)); >+ >+ deps.forEach(function(name) { >+ new_options.only.push(name); >+ >+ const follow_up = new Set(); >+ for (const dep_type of ["inheritance", "implements", "includes"]) { >+ if (parsed[dep_type]) { >+ const inheriting = parsed[dep_type]; >+ const inheritor = parsed.name || parsed.target; >+ for (const dep of [inheriting, inheritor]) { >+ new_options.only.push(dep); >+ all_deps.add(dep); >+ follow_up.add(dep); >+ } >+ } >+ } >+ >+ for (const deferred of follow_up) { >+ if (skipped.has(deferred)) { >+ const next = skipped.get(deferred); >+ skipped.delete(deferred); >+ next.forEach(process); >+ } >+ } >+ }); >+ }.bind(this); >+ >+ for (let parsed of parsed_idls) { >+ process(parsed); >+ } >+ >+ this.mark_as_untested(parsed_idls); >+ >+ if (new_options.only.length) { >+ this.internal_add_idls(parsed_idls, new_options); >+ } >+} > > //@} > IdlArray.prototype.internal_add_idls = function(parsed_idls, options) >@@ -242,22 +385,19 @@ IdlArray.prototype.internal_add_idls = function(parsed_idls, options) > throw new IdlHarnessError("The only and except options can't be used together."); > } > >- function should_skip(name) >- { >- if (options && options.only && options.only.indexOf(name) == -1) >- { >- return true; >- } >- if (options && options.except && options.except.indexOf(name) != -1) >- { >- return true; >- } >- return false; >+ var should_skip = name => { >+ return this.is_excluded_by_options(name, options); > } > > parsed_idls.forEach(function(parsed_idl) > { >- if (parsed_idl.partial && ["interface", "dictionary"].includes(parsed_idl.type)) >+ var partial_types = [ >+ "interface", >+ "interface mixin", >+ "dictionary", >+ "namespace", >+ ]; >+ if (parsed_idl.partial && partial_types.includes(parsed_idl.type)) > { > if (should_skip(parsed_idl.name)) > { >@@ -304,6 +444,17 @@ IdlArray.prototype.internal_add_idls = function(parsed_idls, options) > { > throw new IdlHarnessError("Duplicate identifier " + parsed_idl.name); > } >+ >+ if (parsed_idl["inheritance"]) { >+ // NOTE: Clash should be impossible (would require redefinition of parsed_idl.name). >+ if (parsed_idl.name in this["inheritance"] >+ && parsed_idl["inheritance"] != this["inheritance"][parsed_idl.name]) { >+ throw new IdlHarnessError( >+ `Inheritance for ${parsed_idl.name} was already defined`); >+ } >+ this["inheritance"][parsed_idl.name] = parsed_idl["inheritance"]; >+ } >+ > switch(parsed_idl.type) > { > case "interface": >@@ -340,6 +491,10 @@ IdlArray.prototype.internal_add_idls = function(parsed_idls, options) > new IdlInterface(parsed_idl, /* is_callback = */ true, /* is_mixin = */ false); > break; > >+ case "namespace": >+ this.members[parsed_idl.name] = new IdlNamespace(parsed_idl); >+ break; >+ > default: > throw parsed_idl.name + ": " + parsed_idl.type + " not yet supported"; > } >@@ -553,41 +708,48 @@ IdlArray.prototype.is_json_type = function(type) > }; > > function exposure_set(object, default_set) { >- var exposed = object.extAttrs.filter(function(a) { return a.name == "Exposed" }); >- if (exposed.length > 1 || exposed.length < 0) { >- throw new IdlHarnessError("Unexpected Exposed extended attributes on " + memberName + ": " + exposed); >+ var exposed = object.extAttrs && object.extAttrs.filter(a => a.name === "Exposed"); >+ if (exposed && exposed.length > 1) { >+ throw new IdlHarnessError( >+ `Multiple 'Exposed' extended attributes on ${object.name}`); > } > >- if (exposed.length === 0) { >- return default_set; >+ let result = default_set || ["Window"]; >+ if (result && !(result instanceof Set)) { >+ result = new Set(result); > } >- >- var set = exposed[0].rhs.value; >- // Could be a list or a string. >- if (typeof set == "string") { >- set = [ set ]; >+ if (exposed && exposed.length) { >+ var set = exposed[0].rhs.value; >+ // Could be a list or a string. >+ if (typeof set == "string") { >+ set = [ set ]; >+ } >+ result = new Set(set); >+ } >+ if (result && result.has("Worker")) { >+ result.delete("Worker"); >+ result.add("DedicatedWorker"); >+ result.add("ServiceWorker"); >+ result.add("SharedWorker"); > } >- return set; >+ return result; > } > > function exposed_in(globals) { > if ('document' in self) { >- return globals.indexOf("Window") >= 0; >+ return globals.has("Window"); > } > if ('DedicatedWorkerGlobalScope' in self && > self instanceof DedicatedWorkerGlobalScope) { >- return globals.indexOf("Worker") >= 0 || >- globals.indexOf("DedicatedWorker") >= 0; >+ return globals.has("DedicatedWorker"); > } > if ('SharedWorkerGlobalScope' in self && > self instanceof SharedWorkerGlobalScope) { >- return globals.indexOf("Worker") >= 0 || >- globals.indexOf("SharedWorker") >= 0; >+ return globals.has("SharedWorker"); > } > if ('ServiceWorkerGlobalScope' in self && > self instanceof ServiceWorkerGlobalScope) { >- return globals.indexOf("Worker") >= 0 || >- globals.indexOf("ServiceWorker") >= 0; >+ return globals.has("ServiceWorker"); > } > throw new IdlHarnessError("Unexpected global object"); > } >@@ -627,27 +789,7 @@ IdlArray.prototype.test = function() > > // First merge in all the partial interfaces and implements statements we > // encountered. >- this.partials.forEach(function(parsed_idl) >- { >- if (!(parsed_idl.name in this.members) >- || !(this.members[parsed_idl.name] instanceof IdlInterface >- || this.members[parsed_idl.name] instanceof IdlDictionary)) >- { >- throw new IdlHarnessError(`Partial ${parsed_idl.type} ${parsed_idl.name} with no original ${parsed_idl.type}`); >- } >- if (parsed_idl.extAttrs) >- { >- parsed_idl.extAttrs.forEach(function(extAttr) >- { >- this.members[parsed_idl.name].extAttrs.push(extAttr); >- }.bind(this)); >- } >- parsed_idl.members.forEach(function(member) >- { >- this.members[parsed_idl.name].members.push(new IdlInterfaceMember(member)); >- }.bind(this)); >- }.bind(this)); >- this.partials = []; >+ this.collapse_partials(); > > for (var lhs in this["implements"]) > { >@@ -683,13 +825,28 @@ IdlArray.prototype.test = function() > } > this["includes"] = {}; > >+ // Assert B defined for A : B >+ for (const member of Object.values(this.members).filter(m => m.base)) { >+ const lhs = member.name; >+ const rhs = member.base; >+ if (!(rhs in this.members)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is undefined.`); >+ const lhs_is_interface = this.members[lhs] instanceof IdlInterface; >+ const rhs_is_interface = this.members[rhs] instanceof IdlInterface; >+ if (rhs_is_interface != lhs_is_interface) { >+ if (!lhs_is_interface) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${lhs} is not an interface.`); >+ if (!rhs_is_interface) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is not an interface.`); >+ } >+ // Check for circular dependencies. >+ member.get_inheritance_stack(); >+ } >+ > Object.getOwnPropertyNames(this.members).forEach(function(memberName) { > var member = this.members[memberName]; > if (!(member instanceof IdlInterface)) { > return; > } > >- var globals = exposure_set(member, ["Window"]); >+ var globals = exposure_set(member); > member.exposed = exposed_in(globals); > member.exposureSet = globals; > }.bind(this)); >@@ -700,14 +857,104 @@ IdlArray.prototype.test = function() > this.members[name].test(); > if (name in this.objects) > { >- this.objects[name].forEach(function(str) >+ const objects = this.objects[name]; >+ if (!objects || !Array.isArray(objects)) { >+ throw new IdlHarnessError(`Invalid or empty objects for member ${name}`); >+ } >+ objects.forEach(function(str) > { >+ if (!this.members[name] || !(this.members[name] instanceof IdlInterface)) { >+ throw new IdlHarnessError(`Invalid object member name ${name}`); >+ } > this.members[name].test_object(str); > }.bind(this)); > } > } > }; > >+//@} >+IdlArray.prototype.collapse_partials = function() >+//@{ >+{ >+ const testedPartials = new Map(); >+ this.partials.forEach(function(parsed_idl) >+ { >+ const originalExists = parsed_idl.name in this.members >+ && (this.members[parsed_idl.name] instanceof IdlInterface >+ || this.members[parsed_idl.name] instanceof IdlDictionary >+ || this.members[parsed_idl.name] instanceof IdlNamespace); >+ >+ let partialTestName = parsed_idl.name; >+ if (!parsed_idl.untested) { >+ // Ensure unique test name in case of multiple partials. >+ let partialTestCount = 1; >+ if (testedPartials.has(parsed_idl.name)) { >+ partialTestCount += testedPartials.get(parsed_idl.name); >+ partialTestName = `${partialTestName}[${partialTestCount}]`; >+ } >+ testedPartials.set(parsed_idl.name, partialTestCount); >+ >+ test(function () { >+ assert_true(originalExists, `Original ${parsed_idl.type} should be defined`); >+ >+ var expected = IdlInterface; >+ switch (parsed_idl.type) { >+ case 'interface': expected = IdlInterface; break; >+ case 'dictionary': expected = IdlDictionary; break; >+ case 'namespace': expected = IdlNamespace; break; >+ } >+ assert_true( >+ expected.prototype.isPrototypeOf(this.members[parsed_idl.name]), >+ `Original ${parsed_idl.name} definition should have type ${parsed_idl.type}`); >+ }.bind(this), `Partial ${parsed_idl.type} ${partialTestName}: original ${parsed_idl.type} defined`); >+ } >+ if (!originalExists) { >+ // Not good.. but keep calm and carry on. >+ return; >+ } >+ >+ if (parsed_idl.extAttrs) >+ { >+ // Special-case "Exposed". Must be a subset of original interface's exposure. >+ // Exposed on a partial is the equivalent of having the same Exposed on all nested members. >+ // See https://github.com/heycam/webidl/issues/154 for discrepency between Exposed and >+ // other extended attributes on partial interfaces. >+ const exposureAttr = parsed_idl.extAttrs.find(a => a.name === "Exposed"); >+ if (exposureAttr) { >+ if (!parsed_idl.untested) { >+ test(function () { >+ const partialExposure = exposure_set(parsed_idl); >+ const memberExposure = exposure_set(this.members[parsed_idl.name]); >+ partialExposure.forEach(name => { >+ if (!memberExposure || !memberExposure.has(name)) { >+ throw new IdlHarnessError( >+ `Partial ${parsed_idl.name} ${parsed_idl.type} is exposed to '${name}', the original ${parsed_idl.type} is not.`); >+ } >+ }); >+ }.bind(this), `Partial ${parsed_idl.type} ${partialTestName}: valid exposure set`); >+ } >+ parsed_idl.members.forEach(function (member) { >+ member.extAttrs.push(exposureAttr); >+ }.bind(this)); >+ } >+ >+ parsed_idl.extAttrs.forEach(function(extAttr) >+ { >+ // "Exposed" already handled above. >+ if (extAttr.name === "Exposed") { >+ return; >+ } >+ this.members[parsed_idl.name].extAttrs.push(extAttr); >+ }.bind(this)); >+ } >+ parsed_idl.members.forEach(function(member) >+ { >+ this.members[parsed_idl.name].members.push(new IdlInterfaceMember(member)); >+ }.bind(this)); >+ }.bind(this)); >+ this.partials = []; >+} >+ > //@} > IdlArray.prototype.assert_type_is = function(value, type) > //@{ >@@ -762,7 +1009,7 @@ IdlArray.prototype.assert_type_is = function(value, type) > return; > } > >- if (type.sequence) >+ if (type.generic === "sequence") > { > assert_true(Array.isArray(value), "should be an Array"); > if (!value.length) >@@ -1111,6 +1358,10 @@ IdlInterface.prototype.get_inheritance_stack = function() { > var base = this.array.members[idl_interface.base]; > if (!base) { > throw new Error(idl_interface.type + " " + idl_interface.base + " not found (inherited by " + idl_interface.name + ")"); >+ } else if (stack.indexOf(base) > -1) { >+ stack.push(base); >+ let dep_chain = stack.map(i => i.name).join(','); >+ throw new IdlHarnessError(`${this.name} has a circular dependency: ${dep_chain}`); > } > idl_interface = base; > stack.push(idl_interface); >@@ -1206,7 +1457,7 @@ IdlInterface.prototype.test = function() > } > > if (!this.exposed) { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > assert_false(this.name in self); > }.bind(this), this.name + " interface: existence and properties of interface object"); > return; >@@ -1232,7 +1483,7 @@ IdlInterface.prototype.test = function() > IdlInterface.prototype.test_self = function() > //@{ > { >- test(function() >+ subsetTestByKey(this.name, test, function() > { > // This function tests WebIDL as of 2015-01-13. > >@@ -1339,7 +1590,7 @@ IdlInterface.prototype.test_self = function() > }.bind(this), this.name + " interface: existence and properties of interface object"); > > if (!this.is_callback()) { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > // This function tests WebIDL as of 2014-10-25. > // https://heycam.github.io/webidl/#es-interface-call > >@@ -1366,7 +1617,7 @@ IdlInterface.prototype.test_self = function() > } > > if (!this.is_callback() || this.has_constants()) { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > // This function tests WebIDL as of 2015-11-17. > // https://heycam.github.io/webidl/#interface-object > >@@ -1391,7 +1642,7 @@ IdlInterface.prototype.test_self = function() > > > if (this.has_extended_attribute("LegacyWindowAlias")) { >- test(function() >+ subsetTestByKey(this.name, test, function() > { > var aliasAttrs = this.extAttrs.filter(function(o) { return o.name === "LegacyWindowAlias"; }); > if (aliasAttrs.length > 1) { >@@ -1400,7 +1651,7 @@ IdlInterface.prototype.test_self = function() > if (this.is_callback()) { > throw new IdlHarnessError("Invalid IDL: LegacyWindowAlias extended attribute on non-interface " + this.name); > } >- if (this.exposureSet.indexOf("Window") === -1) { >+ if (!this.exposureSet.has("Window")) { > throw new IdlHarnessError("Invalid IDL: LegacyWindowAlias extended attribute on " + this.name + " which is not exposed in Window"); > } > // TODO: when testing of [NoInterfaceObject] interfaces is supported, >@@ -1443,7 +1694,7 @@ IdlInterface.prototype.test_self = function() > } > // TODO: Test named constructors if I find any interfaces that have them. > >- test(function() >+ subsetTestByKey(this.name, test, function() > { > // This function tests WebIDL as of 2015-01-21. > // https://heycam.github.io/webidl/#interface-object >@@ -1493,8 +1744,6 @@ IdlInterface.prototype.test_self = function() > // object. > // "Otherwise, if A is declared to inherit from another interface, then > // return the interface prototype object for the inherited interface. >- // "Otherwise, if A is declared with the [LegacyArrayClass] extended >- // attribute, then return %ArrayPrototype%. > // "Otherwise, return %ObjectPrototype%. > // > // "In the ECMAScript binding, the DOMException type has some additional >@@ -1517,9 +1766,6 @@ IdlInterface.prototype.test_self = function() > !this.array > .members[inherit_interface] > .has_extended_attribute("NoInterfaceObject"); >- } else if (this.has_extended_attribute('LegacyArrayClass')) { >- inherit_interface = 'Array'; >- inherit_interface_has_interface_object = true; > } else if (this.name === "DOMException") { > inherit_interface = 'Error'; > inherit_interface_has_interface_object = true; >@@ -1575,7 +1821,7 @@ IdlInterface.prototype.test_self = function() > this.test_immutable_prototype("interface prototype object", self[this.name].prototype); > } > >- test(function() >+ subsetTestByKey(this.name, test, function() > { > if (this.is_callback() && !this.has_constants()) { > return; >@@ -1611,7 +1857,7 @@ IdlInterface.prototype.test_self = function() > }.bind(this), this.name + ' interface: existence and properties of interface prototype object\'s "constructor" property'); > > >- test(function() >+ subsetTestByKey(this.name, test, function() > { > if (this.is_callback() && !this.has_constants()) { > return; >@@ -1671,7 +1917,6 @@ IdlInterface.prototype.test_self = function() > this.name + '.prototype should not have @@unscopables'); > } > }.bind(this), this.name + ' interface: existence and properties of interface prototype object\'s @@unscopables property'); >- > }; > > //@} >@@ -1682,7 +1927,7 @@ IdlInterface.prototype.test_immutable_prototype = function(type, obj) > return; > } > >- test(function(t) { >+ subsetTestByKey(this.name, test, function(t) { > var originalValue = Object.getPrototypeOf(obj); > var newValue = Object.create(null); > >@@ -1705,7 +1950,7 @@ IdlInterface.prototype.test_immutable_prototype = function(type, obj) > "of " + type + " - setting to a new value via Object.setPrototypeOf " + > "should throw a TypeError"); > >- test(function(t) { >+ subsetTestByKey(this.name, test, function(t) { > var originalValue = Object.getPrototypeOf(obj); > var newValue = Object.create(null); > >@@ -1732,7 +1977,7 @@ IdlInterface.prototype.test_immutable_prototype = function(type, obj) > "of " + type + " - setting to a new value via __proto__ " + > "should throw a TypeError"); > >- test(function(t) { >+ subsetTestByKey(this.name, test, function(t) { > var originalValue = Object.getPrototypeOf(obj); > var newValue = Object.create(null); > >@@ -1753,7 +1998,7 @@ IdlInterface.prototype.test_immutable_prototype = function(type, obj) > "of " + type + " - setting to a new value via Reflect.setPrototypeOf " + > "should return false"); > >- test(function() { >+ subsetTestByKey(this.name, test, function() { > var originalValue = Object.getPrototypeOf(obj); > > Object.setPrototypeOf(obj, originalValue); >@@ -1761,7 +2006,7 @@ IdlInterface.prototype.test_immutable_prototype = function(type, obj) > "of " + type + " - setting to its original value via Object.setPrototypeOf " + > "should not throw"); > >- test(function() { >+ subsetTestByKey(this.name, test, function() { > var originalValue = Object.getPrototypeOf(obj); > > obj.__proto__ = originalValue; >@@ -1769,7 +2014,7 @@ IdlInterface.prototype.test_immutable_prototype = function(type, obj) > "of " + type + " - setting to its original value via __proto__ " + > "should not throw"); > >- test(function() { >+ subsetTestByKey(this.name, test, function() { > var originalValue = Object.getPrototypeOf(obj); > > assert_true(Reflect.setPrototypeOf(obj, originalValue)); >@@ -1786,7 +2031,7 @@ IdlInterface.prototype.test_member_const = function(member) > throw new IdlHarnessError("Internal error: test_member_const called without any constants"); > } > >- test(function() >+ subsetTestByKey(this.name, test, function() > { > assert_own_property(self, this.name, > "self does not have own property " + format_value(this.name)); >@@ -1812,7 +2057,7 @@ IdlInterface.prototype.test_member_const = function(member) > > // "In addition, a property with the same characteristics must > // exist on the interface prototype object." >- test(function() >+ subsetTestByKey(this.name, test, function() > { > assert_own_property(self, this.name, > "self does not have own property " + format_value(this.name)); >@@ -1843,7 +2088,10 @@ IdlInterface.prototype.test_member_const = function(member) > IdlInterface.prototype.test_member_attribute = function(member) > //@{ > { >- var a_test = async_test(this.name + " interface: attribute " + member.name); >+ if (!shouldRunSubTest(this.name)) { >+ return; >+ } >+ var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: attribute " + member.name); > a_test.step(function() > { > if (this.is_callback() && !this.has_constants()) { >@@ -1861,7 +2109,12 @@ IdlInterface.prototype.test_member_attribute = function(member) > "The interface object must have a property " + > format_value(member.name)); > a_test.done(); >- } else if (this.is_global()) { >+ return; >+ } >+ >+ this.do_member_unscopable_asserts(member); >+ >+ if (this.is_global()) { > assert_own_property(self, member.name, > "The global object must have a property " + > format_value(member.name)); >@@ -1922,20 +2175,18 @@ IdlInterface.prototype.test_member_attribute = function(member) > // since it will call done() on a_test. > this.do_interface_attribute_asserts(self[this.name].prototype, member, a_test); > } >- > } > }.bind(this)); >- >- test(function () { >- this.do_member_unscopable_asserts(member); >- }.bind(this), 'Unscopable handled correctly for ' + member.name + ' property on ' + this.name); > }; > > //@} > IdlInterface.prototype.test_member_operation = function(member) > //@{ > { >- var a_test = async_test(this.name + " interface: operation " + member.name + >+ if (!shouldRunSubTest(this.name)) { >+ return; >+ } >+ var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: operation " + member.name + > "(" + member.arguments.map( > function(m) {return m.idlType.idlType; } ).join(", ") > +")"); >@@ -1991,16 +2242,9 @@ IdlInterface.prototype.test_member_operation = function(member) > "interface prototype object missing non-static operation"); > memberHolderObject = self[this.name].prototype; > } >+ this.do_member_unscopable_asserts(member); > this.do_member_operation_asserts(memberHolderObject, member, a_test); > }.bind(this)); >- >- test(function () { >- this.do_member_unscopable_asserts(member); >- }.bind(this), >- 'Unscopable handled correctly for ' + member.name + "(" + >- member.arguments.map( >- function(m) {return m.idlType.idlType; } ).join(", ") >- + ")" + ' on ' + this.name); > }; > > IdlInterface.prototype.do_member_unscopable_asserts = function(member) >@@ -2051,15 +2295,13 @@ IdlInterface.prototype.do_member_operation_asserts = function(memberHolderObject > // behavior is as follows . . ." > assert_equals(typeof memberHolderObject[member.name], "function", > "property must be a function"); >- // "The value of the Function objectâs âlengthâ property is >- // a Number determined as follows: >- // ". . . >- // "Return the length of the shortest argument list of the >- // entries in S." >- assert_equals(memberHolderObject[member.name].length, >- minOverloadLength(this.members.filter(function(m) { >- return m.type == "operation" && m.name == member.name; >- })), >+ >+ const ctors = this.members.filter(function(m) { >+ return m.type == "operation" && m.name == member.name; >+ }); >+ assert_equals( >+ memberHolderObject[member.name].length, >+ minOverloadLength(ctors), > "property has wrong .length"); > > // Make some suitable arguments >@@ -2119,10 +2361,11 @@ IdlInterface.prototype.add_iterable_members = function(member) > }; > > IdlInterface.prototype.test_to_json_operation = function(memberHolderObject, member) { >- var instanceName = memberHolderObject.constructor.name; >+ var instanceName = memberHolderObject && memberHolderObject.constructor.name >+ || member.name + " object"; > if (member.has_extended_attribute("Default")) { >- var map = this.default_to_json_operation(); >- test(function() { >+ subsetTestByKey(this.name, test, function() { >+ var map = this.default_to_json_operation(); > var json = memberHolderObject.toJSON(); > map.forEach(function(type, k) { > assert_true(k in json, "property " + JSON.stringify(k) + " should be present in the output of " + this.name + ".prototype.toJSON()"); >@@ -2135,7 +2378,7 @@ IdlInterface.prototype.test_to_json_operation = function(memberHolderObject, mem > }, this); > }.bind(this), "Test default toJSON operation of " + instanceName); > } else { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > assert_true(this.array.is_json_type(member.idlType), JSON.stringify(member.idlType) + " is not an appropriate return value for the toJSON operation of " + instanceName); > this.array.assert_type_is(memberHolderObject.toJSON(), member.idlType); > }.bind(this), "Test toJSON operation of " + instanceName); >@@ -2147,8 +2390,8 @@ IdlInterface.prototype.test_member_iterable = function(member) > //@{ > { > var interfaceName = this.name; >- var isPairIterator = member.idlType instanceof Array; >- test(function() >+ var isPairIterator = member.idlType.length === 2; >+ subsetTestByKey(this.name, test, function() > { > var descriptor = Object.getOwnPropertyDescriptor(self[interfaceName].prototype, Symbol.iterator); > assert_true(descriptor.writable, "property should be writable"); >@@ -2158,11 +2401,11 @@ IdlInterface.prototype.test_member_iterable = function(member) > }, "Testing Symbol.iterator property of iterable interface " + interfaceName); > > if (isPairIterator) { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > assert_equals(self[interfaceName].prototype[Symbol.iterator], self[interfaceName].prototype["entries"], "entries method is not the same as @@iterator"); > }, "Testing pair iterable interface " + interfaceName); > } else { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > ["entries", "keys", "values", "forEach", Symbol.Iterator].forEach(function(property) { > assert_equals(self[interfaceName].prototype[property], Array.prototype[property], property + " function is not the same as Array one"); > }); >@@ -2174,7 +2417,7 @@ IdlInterface.prototype.test_member_iterable = function(member) > IdlInterface.prototype.test_member_stringifier = function(member) > //@{ > { >- test(function() >+ subsetTestByKey(this.name, test, function() > { > if (this.is_callback() && !this.has_constants()) { > return; >@@ -2259,7 +2502,7 @@ IdlInterface.prototype.test_members = function() > } > > if (!exposed_in(exposure_set(member, this.exposureSet))) { >- test(function() { >+ subsetTestByKey(this.name, test, function() { > // It's not exposed, so we shouldn't find it anywhere. > assert_false(member.name in self[this.name], > "The interface object must not have a property " + >@@ -2380,7 +2623,7 @@ IdlInterface.prototype.test_primary_interface_of = function(desc, obj, exception > if (!this.has_extended_attribute("NoInterfaceObject") > && (typeof obj != expected_typeof || obj instanceof Object)) > { >- test(function() >+ subsetTestByKey(this.name, test, function() > { > assert_equals(exception, null, "Unexpected exception when evaluating object"); > assert_equals(typeof obj, expected_typeof, "wrong typeof object"); >@@ -2402,7 +2645,7 @@ IdlInterface.prototype.test_primary_interface_of = function(desc, obj, exception > // "The class string of a platform object that implements one or more > // interfaces must be the identifier of the primary interface of the > // platform object." >- test(function() >+ subsetTestByKey(this.name, test, function() > { > assert_equals(exception, null, "Unexpected exception when evaluating object"); > assert_equals(typeof obj, expected_typeof, "wrong typeof object"); >@@ -2420,6 +2663,9 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect > { > // TODO: Indexed and named properties, more checks on interface members > this.already_tested = true; >+ if (!shouldRunSubTest(this.name)) { >+ return; >+ } > > for (var i = 0; i < this.members.length; i++) > { >@@ -2428,14 +2674,15 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect > continue; > } > if (!exposed_in(exposure_set(member, this.exposureSet))) { >- test(function() { >+ subsetTestByKey(this.name, test, function() { >+ assert_equals(exception, null, "Unexpected exception when evaluating object"); > assert_false(member.name in obj); > }.bind(this), this.name + " interface: " + desc + ' must not have property "' + member.name + '"'); > continue; > } > if (member.type == "attribute" && member.isUnforgeable) > { >- var a_test = async_test(this.name + " interface: " + desc + ' must have own property "' + member.name + '"'); >+ var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: " + desc + ' must have own property "' + member.name + '"'); > a_test.step(function() { > assert_equals(exception, null, "Unexpected exception when evaluating object"); > assert_equals(typeof obj, expected_typeof, "wrong typeof object"); >@@ -2447,7 +2694,7 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect > member.name && > member.isUnforgeable) > { >- var a_test = async_test(this.name + " interface: " + desc + ' must have own property "' + member.name + '"'); >+ var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: " + desc + ' must have own property "' + member.name + '"'); > a_test.step(function() > { > assert_equals(exception, null, "Unexpected exception when evaluating object"); >@@ -2467,7 +2714,7 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect > { > described_name += "(" + member.arguments.map(arg => arg.idlType.idlType).join(", ") + ")"; > } >- test(function() >+ subsetTestByKey(this.name, test, function() > { > assert_equals(exception, null, "Unexpected exception when evaluating object"); > assert_equals(typeof obj, expected_typeof, "wrong typeof object"); >@@ -2513,7 +2760,7 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect > // TODO: Test passing arguments of the wrong type. > if (member.type == "operation" && member.name && member.arguments.length) > { >- var a_test = async_test( this.name + " interface: calling " + member.name + >+ var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: calling " + member.name + > "(" + member.arguments.map(function(m) { return m.idlType.idlType; }).join(", ") + > ") on " + desc + " with too few arguments must throw TypeError"); > a_test.step(function() >@@ -2804,5 +3051,198 @@ function IdlTypedef(obj) > > IdlTypedef.prototype = Object.create(IdlObject.prototype); > >+/// IdlNamespace /// >+function IdlNamespace(obj) >+//@{ >+{ >+ this.name = obj.name; >+ this.extAttrs = obj.extAttrs; >+ this.untested = obj.untested; >+ /** A back-reference to our IdlArray. */ >+ this.array = obj.array; >+ >+ /** An array of IdlInterfaceMembers. */ >+ this.members = obj.members.map(m => new IdlInterfaceMember(m)); >+} >+//@} >+ >+IdlNamespace.prototype = Object.create(IdlObject.prototype); >+ >+IdlNamespace.prototype.do_member_operation_asserts = function (memberHolderObject, member, a_test) >+//@{ >+{ >+ var desc = Object.getOwnPropertyDescriptor(memberHolderObject, member.name); >+ >+ assert_false("get" in desc, "property should not have a getter"); >+ assert_false("set" in desc, "property should not have a setter"); >+ assert_equals( >+ desc.writable, >+ !member.isUnforgeable, >+ "property should be writable if and only if not unforgeable"); >+ assert_true(desc.enumerable, "property should be enumerable"); >+ assert_equals( >+ desc.configurable, >+ !member.isUnforgeable, >+ "property should be configurable if and only if not unforgeable"); >+ >+ assert_equals( >+ typeof memberHolderObject[member.name], >+ "function", >+ "property must be a function"); >+ >+ assert_equals( >+ memberHolderObject[member.name].length, >+ minOverloadLength(this.members.filter(function(m) { >+ return m.type == "operation" && m.name == member.name; >+ })), >+ "operation has wrong .length"); >+ a_test.done(); >+} >+//@} >+ >+IdlNamespace.prototype.test_member_operation = function(member) >+//@{ >+{ >+ if (!shouldRunSubTest(this.name)) { >+ return; >+ } >+ var args = member.arguments.map(function(a) { >+ var s = a.idlType.idlType; >+ if (a.variadic) { >+ s += '...'; >+ } >+ return s; >+ }).join(", "); >+ var a_test = subsetTestByKey( >+ this.name, >+ async_test, >+ this.name + ' namespace: operation ' + member.name + '(' + args + ')'); >+ a_test.step(function() { >+ assert_own_property( >+ self[this.name], >+ member.name, >+ 'namespace object missing operation ' + format_value(member.name)); >+ >+ this.do_member_operation_asserts(self[this.name], member, a_test); >+ }.bind(this)); >+}; >+//@} >+ >+IdlNamespace.prototype.test_member_attribute = function (member) >+//@{ >+{ >+ if (!shouldRunSubTest(this.name)) { >+ return; >+ } >+ var a_test = subsetTestByKey( >+ this.name, >+ async_test, >+ this.name + ' namespace: attribute ' + member.name); >+ a_test.step(function() >+ { >+ assert_own_property( >+ self[this.name], >+ member.name, >+ this.name + ' does not have property ' + format_value(member.name)); >+ >+ var desc = Object.getOwnPropertyDescriptor(self[this.name], member.name); >+ assert_equals(desc.set, undefined, "setter must be undefined for namespace members"); >+ a_test.done(); >+ }.bind(this)); >+}; >+//@} >+ >+IdlNamespace.prototype.test = function () >+//@{ >+{ >+ /** >+ * TODO(lukebjerring): Assert: >+ * - "Note that unlike interfaces or dictionaries, namespaces do not create types." >+ * - "Of the extended attributes defined in this specification, only the >+ * [Exposed] and [SecureContext] extended attributes are applicable to namespaces." >+ * - "Namespaces must be annotated with the [Exposed] extended attribute." >+ */ >+ >+ for (const v of Object.values(this.members)) { >+ switch (v.type) { >+ >+ case 'operation': >+ this.test_member_operation(v); >+ break; >+ >+ case 'attribute': >+ this.test_member_attribute(v); >+ break; >+ >+ default: >+ throw 'Invalid namespace member ' + v.name + ': ' + v.type + ' not supported'; >+ } >+ }; >+}; >+//@} >+ > }()); >+ >+/** >+ * idl_test is a promise_test wrapper that handles the fetching of the IDL, >+ * avoiding repetitive boilerplate. >+ * >+ * @param {String|String[]} srcs Spec name(s) for source idl files (fetched from >+ * /interfaces/{name}.idl). >+ * @param {String|String[]} deps Spec name(s) for dependency idl files (fetched >+ * from /interfaces/{name}.idl). Order is important - dependencies from >+ * each source will only be included if they're already know to be a >+ * dependency (i.e. have already been seen). >+ * @param {Function} setup_func Function for extra setup of the idl_array, such >+ * as adding objects. Do not call idl_array.test() in the setup; it is >+ * called by this function (idl_test). >+ */ >+function idl_test(srcs, deps, idl_setup_func) { >+ return promise_test(function (t) { >+ var idl_array = new IdlArray(); >+ srcs = (srcs instanceof Array) ? srcs : [srcs] || []; >+ deps = (deps instanceof Array) ? deps : [deps] || []; >+ var setup_error = null; >+ return Promise.all( >+ srcs.concat(deps).map(function(spec) { >+ return fetch_spec(spec); >+ })) >+ .then(function(idls) { >+ for (var i = 0; i < srcs.length; i++) { >+ idl_array.add_idls(idls[i]); >+ } >+ for (var i = srcs.length; i < srcs.length + deps.length; i++) { >+ idl_array.add_dependency_idls(idls[i]); >+ } >+ }) >+ .then(function() { >+ if (idl_setup_func) { >+ return idl_setup_func(idl_array, t); >+ } >+ }) >+ .catch(function(e) { setup_error = e || 'IDL setup failed.'; }) >+ .then(function () { >+ var error = setup_error; >+ try { >+ idl_array.test(); // Test what we can. >+ } catch (e) { >+ // If testing fails hard here, the original setup error >+ // is more likely to be the real cause. >+ error = error || e; >+ } >+ if (error) { >+ throw error; >+ } >+ }); >+ }, 'idl_test setup'); >+} >+ >+/** >+ * fetch_spec is a shorthand for a Promise that fetches the spec's content. >+ */ >+function fetch_spec(spec) { >+ return fetch('/interfaces/' + spec + '.idl').then(function (r) { >+ return r.text(); >+ }); >+} > // vim: set expandtab shiftwidth=4 tabstop=4 foldmarker=@{,@} foldmethod=marker: >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/CHANGELOG.md b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/CHANGELOG.md >new file mode 100644 >index 0000000000000000000000000000000000000000..91e22275e0700e1f553148c7f5414d7ccaf0fe33 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/CHANGELOG.md >@@ -0,0 +1,292 @@ >+# Change Log >+ >+## [v10.2.1](https://github.com/w3c/webidl2.js/tree/v10.2.1) (2018-03-09) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.2.0...v10.2.1) >+ >+**Merged pull requests:** >+ >+- Optimise tokenisation and whitespace skipping [\#139](https://github.com/w3c/webidl2.js/pull/139) ([ricea](https://github.com/ricea)) >+- refactor: small syntax changes [\#137](https://github.com/w3c/webidl2.js/pull/137) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v10.2.0](https://github.com/w3c/webidl2.js/tree/v10.2.0) (2018-01-30) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.1.0...v10.2.0) >+ >+**Merged pull requests:** >+ >+- Type on union idlType [\#135](https://github.com/w3c/webidl2.js/pull/135) ([saschanaz](https://github.com/saschanaz)) >+- feat: add argument/return type [\#134](https://github.com/w3c/webidl2.js/pull/134) ([saschanaz](https://github.com/saschanaz)) >+- feat: add dictionary/typedef-type [\#133](https://github.com/w3c/webidl2.js/pull/133) ([saschanaz](https://github.com/saschanaz)) >+- feat: add const-type for idlTypes [\#132](https://github.com/w3c/webidl2.js/pull/132) ([saschanaz](https://github.com/saschanaz)) >+- feat: add types on idlTypes [\#131](https://github.com/w3c/webidl2.js/pull/131) ([saschanaz](https://github.com/saschanaz)) >+- Auto acquisition for parser result changes [\#130](https://github.com/w3c/webidl2.js/pull/130) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v10.1.0](https://github.com/w3c/webidl2.js/tree/v10.1.0) (2018-01-19) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.0.0...v10.1.0) >+ >+**Closed issues:** >+ >+- Support `raises` and `setraises` [\#128](https://github.com/w3c/webidl2.js/issues/128) >+- Support `legacycaller` [\#127](https://github.com/w3c/webidl2.js/issues/127) >+- Improve "No semicolon after enum" message [\#119](https://github.com/w3c/webidl2.js/issues/119) >+ >+**Merged pull requests:** >+ >+- Let error messages include the current definition name [\#129](https://github.com/w3c/webidl2.js/pull/129) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v10.0.0](https://github.com/w3c/webidl2.js/tree/v10.0.0) (2017-12-20) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v9.0.0...v10.0.0) >+ >+**Closed issues:** >+ >+- Always return an array for idlType, etc. [\#113](https://github.com/w3c/webidl2.js/issues/113) >+- Maintain writer.js or not? [\#109](https://github.com/w3c/webidl2.js/issues/109) >+ >+**Merged pull requests:** >+ >+- Remove typeExtAttrs from docs [\#124](https://github.com/w3c/webidl2.js/pull/124) ([saschanaz](https://github.com/saschanaz)) >+- Remove iterator documentation [\#123](https://github.com/w3c/webidl2.js/pull/123) ([saschanaz](https://github.com/saschanaz)) >+- Maintain writer.js [\#122](https://github.com/w3c/webidl2.js/pull/122) ([saschanaz](https://github.com/saschanaz)) >+- BREAKING CHANGE: remove deprecated iterator operation [\#121](https://github.com/w3c/webidl2.js/pull/121) ([saschanaz](https://github.com/saschanaz)) >+- Use for-of on tests [\#120](https://github.com/w3c/webidl2.js/pull/120) ([saschanaz](https://github.com/saschanaz)) >+- docs\(README\): iterables ildType is always array [\#118](https://github.com/w3c/webidl2.js/pull/118) ([marcoscaceres](https://github.com/marcoscaceres)) >+ >+## [v9.0.0](https://github.com/w3c/webidl2.js/tree/v9.0.0) (2017-11-30) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v8.1.0...v9.0.0) >+ >+**Closed issues:** >+ >+- Code quality [\#116](https://github.com/w3c/webidl2.js/issues/116) >+- Unable to parse HTMLAllCollection interface [\#114](https://github.com/w3c/webidl2.js/issues/114) >+- Add support for mixin syntax [\#112](https://github.com/w3c/webidl2.js/issues/112) >+- Whitespace issues [\#111](https://github.com/w3c/webidl2.js/issues/111) >+ >+**Merged pull requests:** >+ >+- Consistent array type for iterable.idlType [\#117](https://github.com/w3c/webidl2.js/pull/117) ([saschanaz](https://github.com/saschanaz)) >+- Revert "chore: drop Node 6 support \(\#102\)" [\#115](https://github.com/w3c/webidl2.js/pull/115) ([TimothyGu](https://github.com/TimothyGu)) >+ >+## [v8.1.0](https://github.com/w3c/webidl2.js/tree/v8.1.0) (2017-11-03) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v8.0.1...v8.1.0) >+ >+**Closed issues:** >+ >+- Extended Attributes `rhs` should always be there [\#96](https://github.com/w3c/webidl2.js/issues/96) >+ >+**Merged pull requests:** >+ >+- Always add rhs property [\#110](https://github.com/w3c/webidl2.js/pull/110) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v8.0.1](https://github.com/w3c/webidl2.js/tree/v8.0.1) (2017-11-03) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v8.0.0...v8.0.1) >+ >+**Fixed bugs:** >+ >+- Comment order parsing bug [\#107](https://github.com/w3c/webidl2.js/issues/107) >+ >+**Merged pull requests:** >+ >+- Remove m postfix from all\_ws\(\) [\#108](https://github.com/w3c/webidl2.js/pull/108) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v8.0.0](https://github.com/w3c/webidl2.js/tree/v8.0.0) (2017-11-03) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v7.0.0...v8.0.0) >+ >+**Closed issues:** >+ >+- Remove creators support [\#100](https://github.com/w3c/webidl2.js/issues/100) >+- Add mixin support [\#92](https://github.com/w3c/webidl2.js/issues/92) >+ >+**Merged pull requests:** >+ >+- Support mixins + includes statements [\#105](https://github.com/w3c/webidl2.js/pull/105) ([saschanaz](https://github.com/saschanaz)) >+- chore: drop Node 6 support [\#102](https://github.com/w3c/webidl2.js/pull/102) ([marcoscaceres](https://github.com/marcoscaceres)) >+- BREAKING CHANGE: drop creator support [\#101](https://github.com/w3c/webidl2.js/pull/101) ([saschanaz](https://github.com/saschanaz)) >+- Normalize some whitespace to pass wpt's lint [\#99](https://github.com/w3c/webidl2.js/pull/99) ([foolip](https://github.com/foolip)) >+ >+## [v7.0.0](https://github.com/w3c/webidl2.js/tree/v7.0.0) (2017-10-27) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v6.1.0...v7.0.0) >+ >+**Closed issues:** >+ >+- Type conversion on default values is destructive [\#94](https://github.com/w3c/webidl2.js/issues/94) >+- extended attribute structure missing type [\#89](https://github.com/w3c/webidl2.js/issues/89) >+ >+**Merged pull requests:** >+ >+- BREAKING CHANGE: argument + default types should be string [\#95](https://github.com/w3c/webidl2.js/pull/95) ([marcoscaceres](https://github.com/marcoscaceres)) >+ >+## [v6.1.0](https://github.com/w3c/webidl2.js/tree/v6.1.0) (2017-10-23) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v6.0.1...v6.1.0) >+ >+**Merged pull requests:** >+ >+- feat: give extended attributes a type [\#90](https://github.com/w3c/webidl2.js/pull/90) ([marcoscaceres](https://github.com/marcoscaceres)) >+ >+## [v6.0.1](https://github.com/w3c/webidl2.js/tree/v6.0.1) (2017-10-18) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v6.0.0...v6.0.1) >+ >+**Closed issues:** >+ >+- Enum values should be objects [\#86](https://github.com/w3c/webidl2.js/issues/86) >+ >+**Merged pull requests:** >+ >+- Use ES2015 syntax for tests [\#88](https://github.com/w3c/webidl2.js/pull/88) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v6.0.0](https://github.com/w3c/webidl2.js/tree/v6.0.0) (2017-10-17) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v5.0.0...v6.0.0) >+ >+**Merged pull requests:** >+ >+- BREAKING CHANGE: ret enum value as object [\#87](https://github.com/w3c/webidl2.js/pull/87) ([marcoscaceres](https://github.com/marcoscaceres)) >+ >+## [v5.0.0](https://github.com/w3c/webidl2.js/tree/v5.0.0) (2017-10-17) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.2.0...v5.0.0) >+ >+**Closed issues:** >+ >+- Unable to parse annotated types in generics [\#83](https://github.com/w3c/webidl2.js/issues/83) >+- Drop support for Node 4, move to 6 LTS [\#82](https://github.com/w3c/webidl2.js/issues/82) >+ >+**Merged pull requests:** >+ >+- BREAKING CHANGE: Use ES2015 syntax [\#84](https://github.com/w3c/webidl2.js/pull/84) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v4.2.0](https://github.com/w3c/webidl2.js/tree/v4.2.0) (2017-10-16) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.1.0...v4.2.0) >+ >+**Closed issues:** >+ >+- Remove legacy caller support [\#78](https://github.com/w3c/webidl2.js/issues/78) >+- Should report error for using duplicate names [\#77](https://github.com/w3c/webidl2.js/issues/77) >+ >+**Merged pull requests:** >+ >+- Check duplicated names [\#80](https://github.com/w3c/webidl2.js/pull/80) ([saschanaz](https://github.com/saschanaz)) >+- Remove legacycaller [\#79](https://github.com/w3c/webidl2.js/pull/79) ([saschanaz](https://github.com/saschanaz)) >+- Add "sequence" property to IDL Type AST definition [\#76](https://github.com/w3c/webidl2.js/pull/76) ([lerouche](https://github.com/lerouche)) >+ >+## [v4.1.0](https://github.com/w3c/webidl2.js/tree/v4.1.0) (2017-07-04) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.0.0...v4.1.0) >+ >+**Closed issues:** >+ >+- Parsing error for annonated inner types of generic types [\#71](https://github.com/w3c/webidl2.js/issues/71) >+ >+**Merged pull requests:** >+ >+- Support TypeWithExtendedAttributes on generics [\#75](https://github.com/w3c/webidl2.js/pull/75) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v4.0.0](https://github.com/w3c/webidl2.js/tree/v4.0.0) (2017-06-27) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v3.0.2...v4.0.0) >+ >+**Closed issues:** >+ >+- Remove serializer-related productions [\#73](https://github.com/w3c/webidl2.js/issues/73) >+- Records don't seem to be working right [\#72](https://github.com/w3c/webidl2.js/issues/72) >+- Document namespace member output [\#59](https://github.com/w3c/webidl2.js/issues/59) >+ >+**Merged pull requests:** >+ >+- BREAKING CHANGE: remove serializers \(closes \#73\) [\#74](https://github.com/w3c/webidl2.js/pull/74) ([marcoscaceres](https://github.com/marcoscaceres)) >+- Add documentation for namespaces [\#70](https://github.com/w3c/webidl2.js/pull/70) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v3.0.2](https://github.com/w3c/webidl2.js/tree/v3.0.2) (2017-05-29) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v3.0.1...v3.0.2) >+ >+**Closed issues:** >+ >+- Whitespace issues [\#64](https://github.com/w3c/webidl2.js/issues/64) >+ >+**Merged pull requests:** >+ >+- Test for latest LTS/stable node versions [\#69](https://github.com/w3c/webidl2.js/pull/69) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v3.0.1](https://github.com/w3c/webidl2.js/tree/v3.0.1) (2017-05-18) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v2.4.0...v3.0.1) >+ >+**Closed issues:** >+ >+- Is array syntax dead? [\#66](https://github.com/w3c/webidl2.js/issues/66) >+- Remove exceptions support [\#65](https://github.com/w3c/webidl2.js/issues/65) >+ >+**Merged pull requests:** >+ >+- Fix whitespace error on parsing extended attributes [\#68](https://github.com/w3c/webidl2.js/pull/68) ([saschanaz](https://github.com/saschanaz)) >+- Remove deprecated IDL arrays and exceptions [\#67](https://github.com/w3c/webidl2.js/pull/67) ([saschanaz](https://github.com/saschanaz)) >+ >+## [v2.4.0](https://github.com/w3c/webidl2.js/tree/v2.4.0) (2017-04-12) >+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v2.1.0...v2.4.0) >+ >+**Closed issues:** >+ >+- Add support for Annotated Types [\#60](https://github.com/w3c/webidl2.js/issues/60) >+- Question: Convert WebIDL -\> Javascript [\#56](https://github.com/w3c/webidl2.js/issues/56) >+- Get Robin to give us push permissions on npm [\#54](https://github.com/w3c/webidl2.js/issues/54) >+- Add support for records [\#53](https://github.com/w3c/webidl2.js/issues/53) >+- module not supported? [\#52](https://github.com/w3c/webidl2.js/issues/52) >+- Add support for namespaces [\#51](https://github.com/w3c/webidl2.js/issues/51) >+- Export is not AMD compatible [\#48](https://github.com/w3c/webidl2.js/issues/48) >+- Can't represent large constants [\#21](https://github.com/w3c/webidl2.js/issues/21) >+ >+**Merged pull requests:** >+ >+- Update webidl2.js [\#63](https://github.com/w3c/webidl2.js/pull/63) ([tqeto](https://github.com/tqeto)) >+- Remove support for MapClass \(no longer valid in WebIDL\) [\#62](https://github.com/w3c/webidl2.js/pull/62) ([dontcallmedom](https://github.com/dontcallmedom)) >+- Add support for annotated types [\#61](https://github.com/w3c/webidl2.js/pull/61) ([dontcallmedom](https://github.com/dontcallmedom)) >+- Support namespaces [\#58](https://github.com/w3c/webidl2.js/pull/58) ([saschanaz](https://github.com/saschanaz)) >+- Add support for records [\#57](https://github.com/w3c/webidl2.js/pull/57) ([TimothyGu](https://github.com/TimothyGu)) >+- Refactor [\#50](https://github.com/w3c/webidl2.js/pull/50) ([marcoscaceres](https://github.com/marcoscaceres)) >+- feat\(lib\): add AMD export support \(closes \#48\) [\#49](https://github.com/w3c/webidl2.js/pull/49) ([marcoscaceres](https://github.com/marcoscaceres)) >+ >+## [v2.1.0](https://github.com/w3c/webidl2.js/tree/v2.1.0) (2016-08-12) >+**Closed issues:** >+ >+- Exception when parsing test/syntax/idl/typedef.widl [\#46](https://github.com/w3c/webidl2.js/issues/46) >+- Wrong jsondiffpatch location [\#42](https://github.com/w3c/webidl2.js/issues/42) >+- 'npm install' fails on building microtime [\#40](https://github.com/w3c/webidl2.js/issues/40) >+- Can't represent union types in typedefs [\#38](https://github.com/w3c/webidl2.js/issues/38) >+- tokenise\(\) assumes a specific property enumeration order [\#27](https://github.com/w3c/webidl2.js/issues/27) >+- Add support for iterable\<\>, maplike\<\>, setlike\<\> declarations [\#24](https://github.com/w3c/webidl2.js/issues/24) >+- WebIDL2 fails to parse `attribute Promise\<DOMString\>\[\] baz` [\#19](https://github.com/w3c/webidl2.js/issues/19) >+- Support for ExtendedAttributeIdentList \(current editor's draft\) [\#18](https://github.com/w3c/webidl2.js/issues/18) >+- No Licensing Information [\#17](https://github.com/w3c/webidl2.js/issues/17) >+- how to regenerate w3c idl files ? [\#14](https://github.com/w3c/webidl2.js/issues/14) >+- What is lib/writer.js [\#13](https://github.com/w3c/webidl2.js/issues/13) >+- Numerous tests are failing [\#7](https://github.com/w3c/webidl2.js/issues/7) >+- Add support for missing types in ServiceWorker [\#5](https://github.com/w3c/webidl2.js/issues/5) >+- How can I parse just a function? [\#3](https://github.com/w3c/webidl2.js/issues/3) >+- Parser throws on nullable array of nullable array [\#2](https://github.com/w3c/webidl2.js/issues/2) >+- Parser throws on nullable array of any [\#1](https://github.com/w3c/webidl2.js/issues/1) >+ >+**Merged pull requests:** >+ >+- Fix "default": undefined [\#47](https://github.com/w3c/webidl2.js/pull/47) ([mkwtys](https://github.com/mkwtys)) >+- Replace expect.js with expct [\#45](https://github.com/w3c/webidl2.js/pull/45) ([halton](https://github.com/halton)) >+- Correct jsondiffpatch location. [\#44](https://github.com/w3c/webidl2.js/pull/44) ([halton](https://github.com/halton)) >+- Bump microtime to 2.1.1 [\#43](https://github.com/w3c/webidl2.js/pull/43) ([halton](https://github.com/halton)) >+- Expand writer support [\#39](https://github.com/w3c/webidl2.js/pull/39) ([markandrus](https://github.com/markandrus)) >+- Accept wider \(but still incomplete\) set of allowed syntax for extended attributes [\#37](https://github.com/w3c/webidl2.js/pull/37) ([mlogan](https://github.com/mlogan)) >+- Add test for callback with multiple arguments. [\#36](https://github.com/w3c/webidl2.js/pull/36) ([tobie](https://github.com/tobie)) >+- Iterables [\#34](https://github.com/w3c/webidl2.js/pull/34) ([motiz88](https://github.com/motiz88)) >+- Allow trailing comma in enum value lists, per spec [\#33](https://github.com/w3c/webidl2.js/pull/33) ([motiz88](https://github.com/motiz88)) >+- Allow typedefs within interfaces \(behind an opt-in flag\) [\#32](https://github.com/w3c/webidl2.js/pull/32) ([motiz88](https://github.com/motiz88)) >+- In draft [\#31](https://github.com/w3c/webidl2.js/pull/31) ([othree](https://github.com/othree)) >+- Add support for extended attributes identifier lists [\#29](https://github.com/w3c/webidl2.js/pull/29) ([tobie](https://github.com/tobie)) >+- Make `attribute Promise\<T\>\[\] attr;` work. [\#26](https://github.com/w3c/webidl2.js/pull/26) ([jyasskin](https://github.com/jyasskin)) >+- Parse required dictionary fields. [\#25](https://github.com/w3c/webidl2.js/pull/25) ([jyasskin](https://github.com/jyasskin)) >+- Define the WebIDL2 property on self rather than window. [\#23](https://github.com/w3c/webidl2.js/pull/23) ([Ms2ger](https://github.com/Ms2ger)) >+- Teach WebIDL2 to parse \[\] default values. [\#22](https://github.com/w3c/webidl2.js/pull/22) ([jyasskin](https://github.com/jyasskin)) >+- Support ID list in extended attributes [\#20](https://github.com/w3c/webidl2.js/pull/20) ([othree](https://github.com/othree)) >+- Make sure that `sequence` property of idl types is set to false if the type is actually `sequence`. [\#16](https://github.com/w3c/webidl2.js/pull/16) ([tobie](https://github.com/tobie)) >+- Parametrized [\#15](https://github.com/w3c/webidl2.js/pull/15) ([tobie](https://github.com/tobie)) >+- Add promise support [\#12](https://github.com/w3c/webidl2.js/pull/12) ([tobie](https://github.com/tobie)) >+- Remove broken coverage support from travis for now. [\#11](https://github.com/w3c/webidl2.js/pull/11) ([tobie](https://github.com/tobie)) >+- Add support for \[MapClass\(type, type\)\]. [\#10](https://github.com/w3c/webidl2.js/pull/10) ([tobie](https://github.com/tobie)) >+- Incorporate tests from widlproc\[1\] and remove dependency on said project. [\#9](https://github.com/w3c/webidl2.js/pull/9) ([tobie](https://github.com/tobie)) >+- README incorrectly recommended updating the widlproc submodule. [\#8](https://github.com/w3c/webidl2.js/pull/8) ([tobie](https://github.com/tobie)) >+- Fix bug where instrumented version of webidl2 was loaded. [\#6](https://github.com/w3c/webidl2.js/pull/6) ([tobie](https://github.com/tobie)) >+- Use https:// instead of git:// [\#4](https://github.com/w3c/webidl2.js/pull/4) ([Manishearth](https://github.com/Manishearth)) >+ >+ >+ >+\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/README.md b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/README.md >index 5d128ed27ca87cc76f15caeb63c9ceec0d8aa790..9a8f3f8e9c1dfbe897e8a6d8267cf89ec00cb20a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/README.md >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/README.md >@@ -1,7 +1,7 @@ > > # WebIDL 2 > >-[](http://badge.fury.io/js/webidl2) >+[](http://badge.fury.io/js/webidl2) > > ## Purpose > >@@ -10,26 +10,6 @@ you don't know what that is, then you probably don't need it. It is meant to be > both in Node and in the browser (the parser likely works in other JS environments, but > not the test suite). > >-### What of v1? >- >-There was a previous incarnation of this project. I had written it in the most quick >-and dirty manner that was handy because I required it as a dependency in an experiment. >-As these things tend to happen, some people started using that, which then had to be >-maintained. But since it was not built on solid foundations, it was painful to keep >-up to date with the specification, which is a bit of a moving target. >- >-So I started from scratch. Compared to the previous version (which used a parser generator) >-this one is about 6x less code (which translates to 4x smaller minified or 2x smaller >-minizipped) and 4x faster. The test suite is reasonably complete (95% coverage), much more >-than previously. This version is up to date with WebIDL, rather than a couple years' behind. >-It also has *far* better error reporting. >- >-The AST you get from parsing is very similar to the one you got in v1, but some adjustments >-have been made in order to be more systematic, and to map better to what's actually in the spec >-now. If you used v1, you will need to tweak your code but the result ought to be simpler and >-you ought to be able to be a fair bit less defensive against irregularities in the way >-information is represented. >- > ## Installation > > Just the usual. For Node: >@@ -46,7 +26,6 @@ In the browser: > > ## Documentation > >- > The API to WebIDL2 is trivial: you parse a string of WebIDL and it returns a syntax tree. > > ### Parsing >@@ -66,23 +45,6 @@ In the browser: > </script> > ``` > >-### Advanced Parsing >- >-`parse()` can optionally accept a second parameter, an options object, which can be used to >-modify parsing behavior. >- >-The following options are recognized: >-```JS >-{ >- allowNestedTypedefs: false >-} >-``` >- >-And their meanings are as follows: >- >-* `allowNestedTypedefs`: Boolean indicating whether the parser should accept `typedef`s as valid members of `interface`s. >-This is non-standard syntax and therefore the default is `false`. >- > ### Errors > > When there is a syntax error in the WebIDL, it throws an exception object with the following >@@ -103,7 +65,7 @@ The `parse()` method returns a tree object representing the parse tree of the ID > Comment and white space are not represented in the AST. > > The root of this object is always an array of definitions (where definitions are >-any of interfaces, exceptions, callbacks, etc. â anything that can occur at the root >+any of interfaces, dictionaries, callbacks, etc. â anything that can occur at the root > of the IDL). > > ### IDL Type >@@ -114,18 +76,18 @@ attached to a field called `idlType`: > > ```JS > { >- "array": false, >+ "type": "attribute-type", > "generic": null, >- "idlType": "void", >+ "idlType": "unsigned short", > "nullable": false, > "union": false, >+ "extAttrs": [...] > } > ``` > > Where the fields are as follows: > >-* `array`: Either `false` to indicate that it is not an array, or a number for the level of >- array nesting. >+* `type`: String indicating where this type is used. Can be `null` if not applicable. > * `generic`: String indicating the generic type (e.g. "Promise", "sequence"). `null` > otherwise. > * `idlType`: Can be different things depending on context. In most cases, this will just >@@ -135,41 +97,10 @@ Where the fields are as follows: > description for the type in the sequence, the eventual value of the promise, etc. > * `nullable`: Boolean indicating whether this is nullable or not. > * `union`: Boolean indicating whether this is a union type or not. >- >-#### Interactions between `nullable` and `array` >- >-A more complex data model for our AST would likely represent `Foo[][][]` as a series of >-nested types four levels deep with three anonymous array types eventually containing a >-`Foo` type. But experience shows that such structures are cumbersome to use, and so we >-have a simpler model in which the depth of the array is specified with the `array` field. >- >-This is all fine and well, and in the vast majority of cases is actually simpler. But it >-does run afoul of cases in which it is necessary to distinguish between `Foo[][][]?`, >-`Foo?[][][]`, `Foo[][]?[]`, or even `Foo?[]?[]?[]?`. >- >-For this, when a type is an array type an additional `nullableArray` field is made available >-that captures which of the arrays contain nullable elements. It contains booleans that are >-true if the given array depth contains nullable elements, and false otherwise (mapping that to >-the syntax, and item is true if there is a `?` preceding the `[]`). These examples ought to >-clarify the model: >- >- Foo[][][]? >- -> nullable: true >- -> nullableArray: [false, false, false] >- Foo?[][][] >- -> nullable: false >- -> nullableArray: [true, false, false] >- Foo[][]?[] >- -> nullable: false >- -> nullableArray: [false, false, true] >- Foo?[]?[]?[]? >- -> nullable: true >- -> nullableArray: [true, true, true] >- >-Of particular importance, please note that the overall type is only `nullable` if there is >-a `?` at the end. >+* `extAttrs`: A list of [extended attributes](#extended-attributes). > > ### Interface >+ > Interfaces look like this: > > ```JS >@@ -193,7 +124,7 @@ Interfaces look like this: > The fields are as follows: > > * `type`: Always "interface". >-* `name`: The name of the interface >+* `name`: The name of the interface. > * `partial`: A boolean indicating whether it's a partial interface. > * `members`: An array of interface members (attributes, operations, etc.). Empty if there are none. > * `inheritance`: A string giving the name of an interface this one inherits from, `null` otherwise. >@@ -201,6 +132,56 @@ The fields are as follows: > sense. > * `extAttrs`: A list of [extended attributes](#extended-attributes). > >+### Interface mixins >+ >+Interfaces mixins look like this: >+ >+```JS >+{ >+ "type": "interface mixin", >+ "name": "Animal", >+ "partial": false, >+ "members": [...], >+ "extAttrs": [...] >+}, { >+ "type": "interface mixin", >+ "name": "Human", >+ "partial": false, >+ "members": [...], >+ "extAttrs": [...] >+} >+``` >+ >+The fields are as follows: >+ >+* `type`: Always "interface mixin". >+* `name`: The name of the interface mixin. >+* `partial`: A boolean indicating whether it's a partial interface mixin. >+* `members`: An array of interface members (attributes, operations, etc.). Empty if there are none. >+* `extAttrs`: A list of [extended attributes](#extended-attributes). >+ >+### Namespace >+ >+Namespaces look like this: >+ >+```JS >+{ >+ "type": "namespace", >+ "name": "Console", >+ "partial": false, >+ "members": [...], >+ "extAttrs": [...] >+} >+``` >+ >+The fields are as follows: >+ >+* `type`: Always "namespace". >+* `name`: The name of the namespace. >+* `partial`: A boolean indicating whether it's a partial namespace. >+* `members`: An array of namespace members (attributes and operations). Empty if there are none. >+* `extAttrs`: A list of [extended attributes](#extended-attributes). >+ > ### Callback Interfaces > > These are captured by the same structure as [Interfaces](#interface) except that >@@ -215,12 +196,13 @@ A callback looks like this: > "type": "callback", > "name": "AsyncOperationCallback", > "idlType": { >+ "type": "return-type", > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "arguments": [...], > "extAttrs": [] >@@ -249,12 +231,13 @@ A dictionary looks like this: > "name": "fillPattern", > "required": false, > "idlType": { >+ "type": "dictionary-type", > "sequence": false, > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [...] > }, > "extAttrs": [], > "default": { >@@ -285,47 +268,6 @@ All the members are fields as follows: > * `extAttrs`: A list of [extended attributes](#extended-attributes). > * `default`: A [default value](#default-and-const-values), absent if there is none. > >-### Exception >- >-An exception looks like this: >- >-```JS >-{ >- "type": "exception", >- "name": "HierarchyRequestError", >- "members": [{ >- "type": "field", >- "name": "code", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned short" >- }, >- "extAttrs": [] >- }], >- "inheritance": "DOMException", >- "extAttrs": [] >-} >-``` >- >-The fields are as follows: >- >-* `type`: Always "exception". >-* `name`: The exception name. >-* `members`: An array of members (constants or fields, where fields are described below). >-* `inheritance`: A string indicating which exception is being inherited from, `null` otherwise. >-* `extAttrs`: A list of [extended attributes](#extended-attributes). >- >-Members that aren't [constants](#constants) have the following fields: >- >-* `type`: Always "field". >-* `name`: The field's name. >-* `idlType`: An [IDL Type](#idl-type) describing what field's type. >-* `extAttrs`: A list of [extended attributes](#extended-attributes). >- > ### Enum > > An enum looks like this: >@@ -335,9 +277,9 @@ An enum looks like this: > "type": "enum", > "name": "MealType", > "values": [ >- "rice", >- "noodles", >- "other" >+ { "type": "string", "value": "rice" }, >+ { "type": "string", "value": "noodles" }, >+ { "type": "string", "value": "other" } > ], > "extAttrs": [] > } >@@ -347,7 +289,7 @@ The fields are as follows: > > * `type`: Always "enum". > * `name`: The enum's name. >-* `value`: An array of values (strings). >+* `values`: An array of values. > * `extAttrs`: A list of [extended attributes](#extended-attributes). > > ### Typedef >@@ -357,21 +299,22 @@ A typedef looks like this: > ```JS > { > "type": "typedef", >- "typeExtAttrs": [], > "idlType": { >+ "type": "typedef-type", > "sequence": true, > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >+ "type": "typedef-type", > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >- } >+ "idlType": "Point", >+ "extAttrs": [...] >+ }, >+ "extAttrs": [...] > }, > "name": "PointSequence", > "extAttrs": [] >@@ -385,8 +328,6 @@ The fields are as follows: > * `name`: The typedef's name. > * `idlType`: An [IDL Type](#idl-type) describing what typedef's type. > * `extAttrs`: A list of [extended attributes](#extended-attributes). >-* `typeExtAttrs`: A list of [extended attributes](#extended-attributes) that apply to the >-type rather than to the typedef as a whole. > > ### Implements > >@@ -408,6 +349,26 @@ The fields are as follows: > * `implements`: The interface that is being implemented by the target. > * `extAttrs`: A list of [extended attributes](#extended-attributes). > >+### Includes >+ >+An includes definition looks like this: >+ >+```JS >+{ >+ "type": "includes", >+ "target": "Node", >+ "includes": "EventTarget", >+ "extAttrs": [] >+} >+``` >+ >+The fields are as follows: >+ >+* `type`: Always "includes". >+* `target`: The interface that includes an interface mixin. >+* `includes`: The interface mixin that is being included by the target. >+* `extAttrs`: A list of [extended attributes](#extended-attributes). >+ > ### Operation Member > > An operation looks like this: >@@ -416,18 +377,17 @@ An operation looks like this: > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >+ "type": "return-type", > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "intersection", > "arguments": [{ >@@ -435,12 +395,13 @@ An operation looks like this: > "variadic": true, > "extAttrs": [], > "idlType": { >+ "type": "argument-type", > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [...] > }, > "name": "ints" > }], >@@ -453,9 +414,7 @@ The fields are as follows: > * `type`: Always "operation". > * `getter`: True if a getter operation. > * `setter`: True if a setter operation. >-* `creator`: True if a creator operation. > * `deleter`: True if a deleter operation. >-* `legacycaller`: True if a legacycaller operation. > * `static`: True if a static operation. > * `stringifier`: True if a stringifier operation. > * `idlType`: An [IDL Type](#idl-type) of what the operation returns. If a stringifier, may be absent. >@@ -475,12 +434,13 @@ An attribute member looks like this: > "inherit": false, > "readonly": false, > "idlType": { >+ "type": "attribute-type", > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "RegExp" >+ "idlType": "RegExp", >+ "extAttrs": [...] > }, > "name": "regexp", > "extAttrs": [] >@@ -506,7 +466,15 @@ A constant member looks like this: > { > "type": "const", > "nullable": false, >- "idlType": "boolean", >+ "idlType": { >+ "type": "const-type", >+ "sequence": false, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "boolean" >+ "extAttrs": [] >+ }, > "name": "DEBUG", > "value": { > "type": "boolean", >@@ -520,132 +488,11 @@ The fields are as follows: > > * `type`: Always "const". > * `nullable`: Whether its type is nullable. >-* `idlType`: The type of the constant (a simple type, the type name). >+* `idlType`: An [IDL Type](#idl-type) of the constant that represents a simple type, the type name. > * `name`: The name of the constant. > * `value`: The constant value as described by [Const Values](#default-and-const-values) > * `extAttrs`: A list of [extended attributes](#extended-attributes). > >-### Serializer Member >- >-Serializers come in many shapes, which are best understood by looking at the >-examples below that map the IDL to the produced AST. >- >-```JS >-// serializer; >-{ >- "type": "serializer", >- "extAttrs": [] >-} >- >-// serializer DOMString serialize(); >-{ >- "type": "serializer", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "operation": { >- "name": "serialize", >- "arguments": [] >- }, >- "extAttrs": [] >-} >- >-// serializer = { from, to, amount, description }; >-{ >- "type": "serializer", >- "patternMap": true, >- "names": [ >- "from", >- "to", >- "amount", >- "description" >- ], >- "extAttrs": [] >-} >- >-// serializer = number; >-{ >- "type": "serializer", >- "name": "number", >- "extAttrs": [] >-} >- >-// serializer = [ name, number ]; >-{ >- "type": "serializer", >- "patternList": true, >- "names": [ >- "name", >- "number" >- ], >- "extAttrs": [] >-} >- >-``` >- >-The common fields are as follows: >- >-* `type`: Always "serializer". >-* `extAttrs`: A list of [extended attributes](#extended-attributes). >- >-For a simple serializer, that's all there is. If the serializer is an operation, it will >-have: >- >-* `idlType`: An [IDL Type](#idl-type) describing what the serializer returns. >-* `operation`: An object with the following fields: >- * `name`: The name of the operation. >- * `arguments`: An array of [arguments](#arguments) for the operation. >- >-If the serializer is a pattern map: >- >-* `patternMap`: Always true. >-* `names`: An array of names in the pattern map. >- >-If the serializer is a pattern list: >- >-* `patternList`: Always true. >-* `names`: An array of names in the pattern list. >- >-Finally, if the serializer is a named serializer: >- >-* `name`: The serializer's name. >- >-### Iterator Member >- >-Iterator members look like this >- >-```JS >-{ >- "type": "iterator", >- "getter": false, >- "setter": false, >- "creator": false, >- "deleter": false, >- "legacycaller": false, >- "static": false, >- "stringifier": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "Session2" >- }, >- "iteratorObject": "SessionIterator", >- "extAttrs": [] >-} >-``` >- >-* `type`: Always "iterator". >-* `iteratorObject`: The string on the right-hand side; absent if there isn't one. >-* the rest: same as on [operations](#operation-member). >- > ### Arguments > > The arguments (e.g. for an operation) look like this: >@@ -657,12 +504,13 @@ The arguments (e.g. for an operation) look like this: > "variadic": true, > "extAttrs": [], > "idlType": { >+ "type": "argument-type", > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [...] > }, > "name": "ints" > }] >@@ -686,6 +534,7 @@ Extended attributes are arrays of items that look like this: > "extAttrs": [{ > "name": "TreatNullAs", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "EmptyString" >@@ -703,10 +552,9 @@ The fields are as follows: > whereas the lack thereof will yield a `null`. If there is an `rhs` field then > they are the right-hand side's arguments, otherwise they apply to the extended > attribute directly. >+* `type`: Always `"extended-attribute"`. > * `rhs`: If there is a right-hand side, this will capture its `type` (which can be > "identifier" or "identifier-list") and its `value`. >-* `typePair`: If the extended attribute is a `MapClass` this will capture the >- map's key type and value type respectively. > > ### Default and Const Values > >@@ -717,7 +565,7 @@ values, all of which have the following fields: > > For string, number, boolean, and sequence: > >-* `value`: The value of the given type. For sequence, the only possible value is `[]`. >+* `value`: The value of the given type, as a string. For sequence, the only possible value is `[]`. > > For Infinity: > >@@ -739,21 +587,13 @@ These appear as members of interfaces that look like this: > The fields are as follows: > > * `type`: Always one of "iterable", "legacyiterable", "maplike" or "setlike". >-* `idlType`: An [IDL Type](#idl-type) (or an array of two types) representing the declared type arguments. >+* `idlType`: An array with one or more [IDL Types](#idl-type) representing the declared type arguments. > * `readonly`: Whether the maplike or setlike is declared as read only. > * `extAttrs`: A list of [extended attributes](#extended-attributes). > > > ## Testing > >-In order to run the tests you need to ensure that the widlproc submodule inside `test` is >-initialized and up to date: >- >-```Bash >-git submodule init >-git submodule update >-``` >- > ### Running > > The test runs with mocha and expect.js. Normally, running mocha in the root directory >@@ -787,8 +627,3 @@ In order to test in the browser, get inside `test/web` and run `make-web-tests.j > will generate a `browser-tests.html` file that you can open in a browser. As of this > writing tests pass in the latest Firefox, Chrome, Opera, and Safari. Testing on IE > and older versions will happen progressively. >- >-## TODO >- >-* add some tests to address coverage limitations >-* add a push API for processors that need to process things like comments >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/index.html b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/index.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9897d8572f22a0e66ba6c4704606d94fb66bba59 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/index.html >@@ -0,0 +1,55 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title>WebIDL 2 Checker</title> >+ >+<script src='../lib/webidl2.js'></script> >+<script> >+let parserResult = undefined; >+ >+function formatParserOutput() { >+ const outputEl = document.getElementById('webidl-checker-output'); >+ if (parserResult) { >+ const prettyPrintEl = document.getElementById('pretty-print'); >+ outputEl.innerText = JSON.stringify(parserResult, null, prettyPrintEl.checked ? 2 : null); >+ } else { >+ outputEl.innerText = ''; >+ } >+} >+ >+function checkWebIDL(textToCheck) { >+ const validation = document.getElementById('webidl-checker-validation'); >+ parserResult = null; >+ try { >+ parserResult = WebIDL2.parse(textToCheck); >+ validation.innerText = 'WebIDL parsed successfully!'; >+ } catch (e) { >+ validation.innerText = 'Exception while parsing WebIDL. See JavaScript console for more details.\n\n' + e.toString(); >+ // Pass it along to the JavaScript console. >+ throw e; >+ } finally { >+ formatParserOutput(); >+ } >+} >+</script> >+<style> >+textarea { >+ font-family: monospace; >+} >+</style> >+</head> >+<body> >+<h2>WebIDL Checker</h2> >+<p>This is an online checker for WebIDL built on the <a href="https://github.com/w3c/webidl2.js">webidl2.js</a> project.</p> >+<p>Enter your WebIDL to check below:</p> >+<textarea id='webidl-to-check' rows='20' cols='80'></textarea> >+<br> >+<input type='button' value='Check WebIDL' onclick='checkWebIDL(document.getElementById("webidl-to-check").value)'> >+<p>Validation results:</p> >+<textarea id='webidl-checker-validation' rows='20' cols='80'></textarea> >+<p>Parser output:</p> >+<textarea id='webidl-checker-output' rows='20' cols='80'></textarea> >+<br> >+<input type='checkbox' id='pretty-print' checked='true' onchange='formatParserOutput()'>Pretty Print >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/w3c-import.log >new file mode 100644 >index 0000000000000000000000000000000000000000..7affc26d975007dc62b9d331e3fc257c004a9e3c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/w3c-import.log >@@ -0,0 +1,17 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/checker/index.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/w3c-import.log >index 7802428012cb75dd353343c508594c85e3bc1cb3..0bc9abba1930c96d42d023741af1ea5c757c16bd 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/webidl2.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/webidl2.js >index 0c9a1faacf7c7403bc5b0dbe12f524aefc9f3840..ef519c09df6d6da812fcbba57c7ca0f475af1ed5 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/webidl2.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/webidl2.js >@@ -1,33 +1,161 @@ > "use strict"; > > (() => { >+ // These regular expressions use the sticky flag so they will only match at >+ // the current location (ie. the offset of lastIndex). >+ const tokenRe = { >+ // This expression uses a lookahead assertion to catch false matches >+ // against integers early. >+ "float": /-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y, >+ "integer": /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y, >+ "identifier": /_?[A-Za-z][0-9A-Z_a-z-]*/y, >+ "string": /"[^"]*"/y, >+ "whitespace": /[\t\n\r ]+/y, >+ "comment": /((\/(\/.*|\*([^*]|\*[^\/])*\*\/)[\t\n\r ]*)+)/y, >+ "other": /[^\t\n\r 0-9A-Za-z]/y >+ }; >+ >+ const stringTypes = [ >+ "ByteString", >+ "DOMString", >+ "USVString" >+ ]; >+ >+ const argumentNameKeywords = [ >+ "attribute", >+ "callback", >+ "const", >+ "deleter", >+ "dictionary", >+ "enum", >+ "getter", >+ "includes", >+ "inherit", >+ "interface", >+ "iterable", >+ "maplike", >+ "namespace", >+ "partial", >+ "required", >+ "setlike", >+ "setter", >+ "static", >+ "stringifier", >+ "typedef", >+ "unrestricted" >+ ]; >+ >+ const nonRegexTerminals = [ >+ "FrozenArray", >+ "Infinity", >+ "NaN", >+ "Promise", >+ "boolean", >+ "byte", >+ "double", >+ "false", >+ "float", >+ "implements", >+ "legacyiterable", >+ "long", >+ "mixin", >+ "null", >+ "octet", >+ "optional", >+ "or", >+ "readonly", >+ "record", >+ "sequence", >+ "short", >+ "true", >+ "unsigned", >+ "void" >+ ].concat(argumentNameKeywords, stringTypes); >+ >+ const punctuations = [ >+ "(", >+ ")", >+ ",", >+ "-Infinity", >+ "...", >+ ":", >+ ";", >+ "<", >+ "=", >+ ">", >+ "?", >+ "[", >+ "]", >+ "{", >+ "}" >+ ]; >+ > function tokenise(str) { > const tokens = []; >- const re = { >- "float": /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/, >- "integer": /^-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/, >- "identifier": /^[A-Z_a-z][0-9A-Z_a-z-]*/, >- "string": /^"[^"]*"/, >- "whitespace": /^(?:[\t\n\r ]+|[\t\n\r ]*((\/\/.*|\/\*(.|\n|\r)*?\*\/)[\t\n\r ]*))+/, >- "other": /^[^\t\n\r 0-9A-Z_a-z]/ >- }; >- const types = ["float", "integer", "identifier", "string", "whitespace", "other"]; >- while (str.length > 0) { >- let matched = false; >- for (var i in types) { >- const type = types[i]; >- str = str.replace(re[type], tok => { >- tokens.push({ type, value: tok }); >- matched = true; >- return ""; >- }); >- if (matched) break; >+ let lastIndex = 0; >+ let trivia = ""; >+ while (lastIndex < str.length) { >+ const nextChar = str.charAt(lastIndex); >+ let result = -1; >+ >+ if (/[\t\n\r ]/.test(nextChar)) { >+ result = attemptTokenMatch("whitespace", { noFlushTrivia: true }); >+ } else if (nextChar === '/') { >+ result = attemptTokenMatch("comment", { noFlushTrivia: true }); >+ } >+ >+ if (result !== -1) { >+ trivia += tokens.pop().value; >+ } else if (/[-0-9.]/.test(nextChar)) { >+ result = attemptTokenMatch("float"); >+ if (result === -1) { >+ result = attemptTokenMatch("integer"); >+ } >+ } else if (/[A-Z_a-z]/.test(nextChar)) { >+ result = attemptTokenMatch("identifier"); >+ const token = tokens[tokens.length - 1]; >+ if (result !== -1 && nonRegexTerminals.includes(token.value)) { >+ token.type = token.value; >+ } >+ } else if (nextChar === '"') { >+ result = attemptTokenMatch("string"); >+ } >+ >+ for (const punctuation of punctuations) { >+ if (str.startsWith(punctuation, lastIndex)) { >+ tokens.push({ type: punctuation, value: punctuation, trivia }); >+ trivia = ""; >+ lastIndex += punctuation.length; >+ result = lastIndex; >+ break; >+ } >+ } >+ >+ // other as the last try >+ if (result === -1) { >+ result = attemptTokenMatch("other"); >+ } >+ if (result === -1) { >+ throw new Error("Token stream not progressing"); > } >- if (matched) continue; >- throw new Error("Token stream not progressing"); >+ lastIndex = result; > } > return tokens; >- }; >+ >+ function attemptTokenMatch(type, { noFlushTrivia } = {}) { >+ const re = tokenRe[type]; >+ re.lastIndex = lastIndex; >+ const result = re.exec(str); >+ if (result) { >+ tokens.push({ type, value: result[0], trivia }); >+ if (!noFlushTrivia) { >+ trivia = ""; >+ } >+ return re.lastIndex; >+ } >+ return -1; >+ } >+ } > > class WebIDLParseError { > constructor(str, line, input, tokens) { >@@ -38,14 +166,17 @@ > } > > toString() { >- return `${this.message}, line ${this.line} (tokens: '${this.input}')\n${JSON.stringify(this.tokens, null, 4)}`; >+ const escapedInput = JSON.stringify(this.input); >+ const tokens = JSON.stringify(this.tokens, null, 4); >+ return `${this.message}, line ${this.line} (tokens: ${escapedInput})\n${tokens}`; > } > } > >- function parse(tokens, opt) { >+ function parse(tokens) { > let line = 1; > tokens = tokens.slice(); > const names = new Map(); >+ let current = null; > > const FLOAT = "float"; > const INT = "integer"; >@@ -58,20 +189,39 @@ > getter: false, > setter: false, > deleter: false, >- "static": false, >+ static: false, > stringifier: false > }); > >+ const EMPTY_IDLTYPE = Object.freeze({ >+ generic: null, >+ nullable: false, >+ union: false, >+ idlType: null, >+ extAttrs: [] >+ }); >+ > function error(str) { >- let tok = ""; >- let numTokens = 0; > const maxTokens = 5; >- while (numTokens < maxTokens && tokens.length > numTokens) { >- tok += tokens[numTokens].value; >- numTokens++; >+ const tok = tokens >+ .slice(consume_position, consume_position + maxTokens) >+ .map(t => t.trivia + t.value).join(""); >+ // Count newlines preceding the actual erroneous token >+ if (tokens.length) { >+ line += count(tokens[consume_position].trivia, "\n"); > } >- throw new WebIDLParseError(str, line, tok, tokens.slice(0, maxTokens)); >- }; >+ >+ let message; >+ if (current) { >+ message = `Got an error during or right after parsing \`${current.partial ? "partial " : ""}${current.type} ${current.name}\`: ${str}` >+ } >+ else { >+ // throwing before any valid definition >+ message = `Got an error before parsing any named definition: ${str}`; >+ } >+ >+ throw new WebIDLParseError(message, line, tok, tokens.slice(0, maxTokens)); >+ } > > function sanitize_name(name, type) { > if (names.has(name)) { >@@ -81,587 +231,457 @@ > return name; > } > >- let last_token = null; >+ let consume_position = 0; > >- function consume(type, value) { >- if (!tokens.length || tokens[0].type !== type) return; >- if (typeof value === "undefined" || tokens[0].value === value) { >- last_token = tokens.shift(); >- if (type === ID) last_token.value = last_token.value.replace(/^_/, ""); >- return last_token; >- } >- }; >- >- function ws() { >- if (!tokens.length) return; >- if (tokens[0].type === "whitespace") { >- const t = tokens.shift(); >- t.value.replace(/\n/g, m => { >- line++; >- return m; >- }); >- return t; >+ function probe(type) { >+ return tokens.length > consume_position && tokens[consume_position].type === type; >+ } >+ >+ function consume(...candidates) { >+ // TODO: use const when Servo updates its JS engine >+ for (let type of candidates) { >+ if (!probe(type)) continue; >+ const token = tokens[consume_position]; >+ consume_position++; >+ line += count(token.trivia, "\n"); >+ return token; > } >- }; >+ } > >- function all_ws(store, pea) { // pea == post extended attribute, tpea = same for types >- const t = { type: "whitespace", value: "" }; >- while (true) { >- const w = ws(); >- if (!w) break; >- t.value += w.value; >+ function unescape(identifier) { >+ return identifier.startsWith('_') ? identifier.slice(1) : identifier; >+ } >+ >+ function unconsume(position) { >+ while (consume_position > position) { >+ consume_position--; >+ line -= count(tokens[consume_position].trivia, "\n"); > } >- if (t.value.length > 0) { >- if (store) { >- let w = t.value; >- const re = { >- "ws": /^([\t\n\r ]+)/, >- "line-comment": /^\/\/(.*)\r?\n?/, >- "multiline-comment": /^\/\*((?:.|\n|\r)*?)\*\// >- }; >- const wsTypes = []; >- for (var k in re) wsTypes.push(k); >- while (w.length) { >- let matched = false; >- for (var i in wsTypes) { >- const type = wsTypes[i]; >- w = w.replace(re[type], (tok, m1) => { >- store.push({ type: type + (pea ? ("-" + pea) : ""), value: m1 }); >- matched = true; >- return ""; >- }); >- if (matched) break; >- } >- if (matched) continue; >- throw new Error("Surprising white space construct."); // this shouldn't happen >- } >- } >- return t; >+ } >+ >+ function count(str, char) { >+ let total = 0; >+ for (let i = str.indexOf(char); i !== -1; i = str.indexOf(char, i + 1)) { >+ ++total; > } >- }; >+ return total; >+ } > > function integer_type() { > let ret = ""; >- all_ws(); >- if (consume(ID, "unsigned")) ret = "unsigned "; >- all_ws(); >- if (consume(ID, "short")) return ret + "short"; >- if (consume(ID, "long")) { >+ if (consume("unsigned")) ret = "unsigned "; >+ if (consume("short")) return ret + "short"; >+ if (consume("long")) { > ret += "long"; >- all_ws(); >- if (consume(ID, "long")) return ret + " long"; >+ if (consume("long")) return ret + " long"; > return ret; > } > if (ret) error("Failed to parse integer type"); >- }; >+ } > > function float_type() { > let ret = ""; >- all_ws(); >- if (consume(ID, "unrestricted")) ret = "unrestricted "; >- all_ws(); >- if (consume(ID, "float")) return ret + "float"; >- if (consume(ID, "double")) return ret + "double"; >+ if (consume("unrestricted")) ret = "unrestricted "; >+ if (consume("float")) return ret + "float"; >+ if (consume("double")) return ret + "double"; > if (ret) error("Failed to parse float type"); >- }; >+ } > > function primitive_type() { > const num_type = integer_type() || float_type(); > if (num_type) return num_type; >- all_ws(); >- if (consume(ID, "boolean")) return "boolean"; >- if (consume(ID, "byte")) return "byte"; >- if (consume(ID, "octet")) return "octet"; >- }; >+ if (consume("boolean")) return "boolean"; >+ if (consume("byte")) return "byte"; >+ if (consume("octet")) return "octet"; >+ } > > function const_value() { >- if (consume(ID, "true")) return { type: "boolean", value: true }; >- if (consume(ID, "false")) return { type: "boolean", value: false }; >- if (consume(ID, "null")) return { type: "null" }; >- if (consume(ID, "Infinity")) return { type: "Infinity", negative: false }; >- if (consume(ID, "NaN")) return { type: "NaN" }; >- const ret = consume(FLOAT) || consume(INT); >+ if (consume("true")) return { type: "boolean", value: true }; >+ if (consume("false")) return { type: "boolean", value: false }; >+ if (consume("null")) return { type: "null" }; >+ if (consume("Infinity")) return { type: "Infinity", negative: false }; >+ if (consume("-Infinity")) return { type: "Infinity", negative: true }; >+ if (consume("NaN")) return { type: "NaN" }; >+ const ret = consume(FLOAT, INT); > if (ret) return { type: "number", value: ret.value }; >- const tok = consume(OTHER, "-"); >- if (tok) { >- if (consume(ID, "Infinity")) return { type: "Infinity", negative: true }; >- else tokens.unshift(tok); >- } >- }; >+ } > > function type_suffix(obj) { >- while (true) { >- all_ws(); >- if (consume(OTHER, "?")) { >- if (obj.nullable) error("Can't nullable more than once"); >- obj.nullable = true; >- } else return; >+ obj.nullable = !!consume("?"); >+ if (probe("?")) error("Can't nullable more than once"); >+ } >+ >+ function generic_type(typeName) { >+ const name = consume("FrozenArray", "Promise", "sequence", "record"); >+ if (!name) { >+ return; >+ } >+ const ret = { generic: name.type }; >+ consume("<") || error(`No opening bracket after ${name.type}`); >+ switch (name.type) { >+ case "Promise": >+ if (probe("[")) error("Promise type cannot have extended attribute"); >+ ret.idlType = return_type(typeName); >+ break; >+ case "sequence": >+ case "FrozenArray": >+ ret.idlType = type_with_extended_attributes(typeName); >+ break; >+ case "record": >+ if (probe("[")) error("Record key cannot have extended attribute"); >+ ret.idlType = []; >+ const keyType = consume(...stringTypes); >+ if (!keyType) error(`Record key must be a string type`); >+ ret.idlType.push(Object.assign({ type: typeName }, EMPTY_IDLTYPE, { idlType: keyType.value })); >+ consume(",") || error("Missing comma after record key type"); >+ const valueType = type_with_extended_attributes(typeName) || error("Error parsing generic type record"); >+ ret.idlType.push(valueType); >+ break; > } >- }; >+ if (!ret.idlType) error(`Error parsing generic type ${name.type}`); >+ consume(">") || error(`Missing closing bracket after ${name.type}`); >+ if (name.type === "Promise" && probe("?")) { >+ error("Promise type cannot be nullable"); >+ } >+ type_suffix(ret); >+ return ret; >+ } > >- function single_type() { >+ function single_type(typeName) { >+ const ret = Object.assign({ type: typeName || null }, EMPTY_IDLTYPE); >+ const generic = generic_type(typeName); >+ if (generic) { >+ return Object.assign(ret, generic); >+ } > const prim = primitive_type(); >- const ret = { sequence: false, generic: null, nullable: false, union: false }; > let name; >- let value; > if (prim) { > ret.idlType = prim; >- } else if (name = consume(ID)) { >- value = name.value; >- all_ws(); >- // Generic types >- if (consume(OTHER, "<")) { >- // backwards compat >- if (value === "sequence") { >- ret.sequence = true; >- } >- ret.generic = value; >- const types = []; >- do { >- all_ws(); >- types.push(type_with_extended_attributes() || error("Error parsing generic type " + value)); >- all_ws(); >- } >- while (consume(OTHER, ",")); >- if (value === "sequence") { >- if (types.length !== 1) error("A sequence must have exactly one subtype"); >- } else if (value === "record") { >- if (types.length !== 2) error("A record must have exactly two subtypes"); >- if (!/^(DOMString|USVString|ByteString)$/.test(types[0].idlType)) { >- error("Record key must be DOMString, USVString, or ByteString"); >- } >- if (types[0].extAttrs) error("Record key cannot have extended attribute"); >- } else if (value === "Promise") { >- if (types[0].extAttrs) error("Promise type cannot have extended attribute"); >- } >- ret.idlType = types.length === 1 ? types[0] : types; >- all_ws(); >- if (!consume(OTHER, ">")) error("Unterminated generic type " + value); >- type_suffix(ret); >- return ret; >- } else { >- ret.idlType = value; >- } >+ } else if (name = consume(ID, ...stringTypes)) { >+ ret.idlType = name.value; >+ if (probe("<")) error(`Unsupported generic type ${name.value}`); > } else { > return; > } > type_suffix(ret); > if (ret.nullable && ret.idlType === "any") error("Type any cannot be made nullable"); > return ret; >- }; >- >- function union_type() { >- all_ws(); >- if (!consume(OTHER, "(")) return; >- const ret = { sequence: false, generic: null, nullable: false, union: true, idlType: [] }; >- const fst = type_with_extended_attributes() || error("Union type with no content"); >- ret.idlType.push(fst); >- while (true) { >- all_ws(); >- if (!consume(ID, "or")) break; >- const typ = type_with_extended_attributes() || error("No type after 'or' in union type"); >+ } >+ >+ function union_type(typeName) { >+ if (!consume("(")) return; >+ const ret = Object.assign({ type: typeName || null }, EMPTY_IDLTYPE, { union: true, idlType: [] }); >+ do { >+ const typ = type_with_extended_attributes() || error("No type after open parenthesis or 'or' in union type"); > ret.idlType.push(typ); >+ } while (consume("or")); >+ if (ret.idlType.length < 2) { >+ error("At least two types are expected in a union type but found less"); > } >- if (!consume(OTHER, ")")) error("Unterminated union type"); >+ if (!consume(")")) error("Unterminated union type"); > type_suffix(ret); > return ret; >- }; >+ } > >- function type() { >- return single_type() || union_type(); >- }; >+ function type(typeName) { >+ return single_type(typeName) || union_type(typeName); >+ } > >- function type_with_extended_attributes() { >+ function type_with_extended_attributes(typeName) { > const extAttrs = extended_attrs(); >- const ret = single_type() || union_type(); >+ const ret = single_type(typeName) || union_type(typeName); > if (extAttrs.length && ret) ret.extAttrs = extAttrs; > return ret; >- }; >+ } > >- function argument(store) { >- const ret = { optional: false, variadic: false }; >- ret.extAttrs = extended_attrs(store); >- all_ws(store, "pea"); >- const opt_token = consume(ID, "optional"); >+ function argument() { >+ const start_position = consume_position; >+ const ret = { optional: false, variadic: false, default: null }; >+ ret.extAttrs = extended_attrs(); >+ const opt_token = consume("optional"); > if (opt_token) { > ret.optional = true; >- all_ws(); > } >- ret.idlType = type_with_extended_attributes(); >+ ret.idlType = type_with_extended_attributes("argument-type"); > if (!ret.idlType) { >- if (opt_token) tokens.unshift(opt_token); >+ unconsume(start_position); > return; > } >- const type_token = last_token; >- if (!ret.optional) { >- all_ws(); >- if (tokens.length >= 3 && >- tokens[0].type === "other" && tokens[0].value === "." && >- tokens[1].type === "other" && tokens[1].value === "." && >- tokens[2].type === "other" && tokens[2].value === "." >- ) { >- tokens.shift(); >- tokens.shift(); >- tokens.shift(); >- ret.variadic = true; >- } >+ if (!ret.optional && consume("...")) { >+ ret.variadic = true; > } >- all_ws(); >- const name = consume(ID); >+ const name = consume(ID, ...argumentNameKeywords); > if (!name) { >- if (opt_token) tokens.unshift(opt_token); >- tokens.unshift(type_token); >+ unconsume(start_position); > return; > } >- ret.name = name.value; >+ ret.name = unescape(name.value); >+ ret.escapedName = name.value; > if (ret.optional) { >- all_ws(); >- const dflt = default_(); >- if (typeof dflt !== "undefined") { >- ret["default"] = dflt; >- } >+ ret.default = default_() || null; > } > return ret; >- }; >+ } > >- function argument_list(store) { >+ function argument_list() { > const ret = []; >- const arg = argument(store ? ret : null); >- if (!arg) return; >+ const arg = argument(); >+ if (!arg) return ret; > ret.push(arg); > while (true) { >- all_ws(store ? ret : null); >- if (!consume(OTHER, ",")) return ret; >- const nxt = argument(store ? ret : null) || error("Trailing comma in arguments list"); >+ if (!consume(",")) return ret; >+ const nxt = argument() || error("Trailing comma in arguments list"); > ret.push(nxt); > } >- }; >+ } > >- function simple_extended_attr(store) { >- all_ws(); >+ function simple_extended_attr() { > const name = consume(ID); > if (!name) return; > const ret = { > name: name.value, >- "arguments": null, >+ arguments: null, > type: "extended-attribute", > rhs: null > }; >- all_ws(); >- const eq = consume(OTHER, "="); >+ const eq = consume("="); > if (eq) { >- all_ws(); >- ret.rhs = consume(ID) || >- consume(FLOAT) || >- consume(INT) || >- consume(STR); >- if (!ret.rhs && consume(OTHER, "(")) { >+ ret.rhs = consume(ID, FLOAT, INT, STR); >+ if (ret.rhs) { >+ // No trivia exposure yet >+ ret.rhs.trivia = undefined; >+ } >+ } >+ if (consume("(")) { >+ if (eq && !ret.rhs) { > // [Exposed=(Window,Worker)] >- const rhs_list = []; >- const id = consume(ID); >- if (id) { >- rhs_list.push(id.value); >- } >- identifiers(rhs_list); >- consume(OTHER, ")") || error("Unexpected token in extended attribute argument list or type pair"); > ret.rhs = { > type: "identifier-list", >- value: rhs_list >+ value: identifiers() > }; > } >- if (!ret.rhs) return error("No right hand side to extended attribute assignment"); >- } >- all_ws(); >- if (consume(OTHER, "(")) { >- let args, pair; >- // [Constructor(DOMString str)] >- if (args = argument_list(store)) { >- ret["arguments"] = args; >- } >- // [Constructor()] > else { >- ret["arguments"] = []; >+ // [NamedConstructor=Audio(DOMString src)] or [Constructor(DOMString str)] >+ ret.arguments = argument_list(); > } >- all_ws(); >- consume(OTHER, ")") || error("Unexpected token in extended attribute argument list"); >+ consume(")") || error("Unexpected token in extended attribute argument list"); > } >+ if (eq && !ret.rhs) error("No right hand side to extended attribute assignment"); > return ret; >- }; >+ } > > // Note: we parse something simpler than the official syntax. It's all that ever > // seems to be used >- function extended_attrs(store) { >+ function extended_attrs() { > const eas = []; >- all_ws(store); >- if (!consume(OTHER, "[")) return eas; >- eas[0] = simple_extended_attr(store) || error("Extended attribute with not content"); >- all_ws(); >- while (consume(OTHER, ",")) { >- if (eas.length) { >- eas.push(simple_extended_attr(store)); >- } else { >- eas.push(simple_extended_attr(store) || error("Trailing comma in extended attribute")); >- } >+ if (!consume("[")) return eas; >+ eas[0] = simple_extended_attr() || error("Extended attribute with not content"); >+ while (consume(",")) { >+ eas.push(simple_extended_attr() || error("Trailing comma in extended attribute")); > } >- all_ws(); >- consume(OTHER, "]") || error("No end of extended attribute"); >+ consume("]") || error("No end of extended attribute"); > return eas; >- }; >+ } > > function default_() { >- all_ws(); >- if (consume(OTHER, "=")) { >- all_ws(); >+ if (consume("=")) { > const def = const_value(); > if (def) { > return def; >- } else if (consume(OTHER, "[")) { >- if (!consume(OTHER, "]")) error("Default sequence value must be empty"); >+ } else if (consume("[")) { >+ if (!consume("]")) error("Default sequence value must be empty"); > return { type: "sequence", value: [] }; > } else { > const str = consume(STR) || error("No value for default"); >- str.value = str.value.replace(/^"/, "").replace(/"$/, ""); >+ str.value = str.value.slice(1, -1); >+ // No trivia exposure yet >+ str.trivia = undefined; > return str; > } > } >- }; >+ } > >- function const_(store) { >- all_ws(store, "pea"); >- if (!consume(ID, "const")) return; >+ function const_() { >+ if (!consume("const")) return; > const ret = { type: "const", nullable: false }; >- all_ws(); > let typ = primitive_type(); > if (!typ) { > typ = consume(ID) || error("No type for const"); > typ = typ.value; > } >- ret.idlType = typ; >- all_ws(); >- if (consume(OTHER, "?")) { >- ret.nullable = true; >- all_ws(); >- } >+ ret.idlType = Object.assign({ type: "const-type" }, EMPTY_IDLTYPE, { idlType: typ }); >+ type_suffix(ret); > const name = consume(ID) || error("No name for const"); > ret.name = name.value; >- all_ws(); >- consume(OTHER, "=") || error("No value assignment for const"); >- all_ws(); >+ consume("=") || error("No value assignment for const"); > const cnt = const_value(); > if (cnt) ret.value = cnt; > else error("No value for const"); >- all_ws(); >- consume(OTHER, ";") || error("Unterminated const"); >+ consume(";") || error("Unterminated const"); > return ret; >- }; >+ } > > function inheritance() { >- all_ws(); >- if (consume(OTHER, ":")) { >- all_ws(); >+ if (consume(":")) { > const inh = consume(ID) || error("No type in inheritance"); > return inh.value; > } >- }; >+ } > >- function operation_rest(ret, store) { >- all_ws(); >+ function operation_rest(ret) { > if (!ret) ret = {}; > const name = consume(ID); >- ret.name = name ? name.value : null; >- all_ws(); >- consume(OTHER, "(") || error("Invalid operation"); >- ret["arguments"] = argument_list(store) || []; >- all_ws(); >- consume(OTHER, ")") || error("Unterminated operation"); >- all_ws(); >- consume(OTHER, ";") || error("Unterminated operation"); >+ ret.name = name ? unescape(name.value) : null; >+ ret.escapedName = name ? name.value : null; >+ consume("(") || error("Invalid operation"); >+ ret.arguments = argument_list(); >+ consume(")") || error("Unterminated operation"); >+ consume(";") || error("Unterminated operation"); > return ret; >- }; >+ } > >- function callback(store) { >- all_ws(store, "pea"); >+ function callback() { > let ret; >- if (!consume(ID, "callback")) return; >- all_ws(); >- const tok = consume(ID, "interface"); >+ if (!consume("callback")) return; >+ const tok = consume("interface"); > if (tok) { >- ret = interface_rest(); >- ret.type = "callback interface"; >+ ret = interface_rest(false, "callback interface"); > return ret; > } > const name = consume(ID) || error("No name for callback"); >- ret = { type: "callback", name: sanitize_name(name.value, "callback") }; >- all_ws(); >- consume(OTHER, "=") || error("No assignment in callback"); >- all_ws(); >- ret.idlType = return_type(); >- all_ws(); >- consume(OTHER, "(") || error("No arguments in callback"); >- ret["arguments"] = argument_list(store) || []; >- all_ws(); >- consume(OTHER, ")") || error("Unterminated callback"); >- all_ws(); >- consume(OTHER, ";") || error("Unterminated callback"); >+ ret = current = { type: "callback", name: sanitize_name(name.value, "callback") }; >+ consume("=") || error("No assignment in callback"); >+ ret.idlType = return_type() || error("Missing return type"); >+ consume("(") || error("No arguments in callback"); >+ ret.arguments = argument_list(); >+ consume(")") || error("Unterminated callback"); >+ consume(";") || error("Unterminated callback"); > return ret; >- }; >+ } > >- function attribute(store) { >- all_ws(store, "pea"); >- const grabbed = []; >+ function attribute({ noInherit = false, readonly = false } = {}) { >+ const start_position = consume_position; > const ret = { > type: "attribute", >- "static": false, >+ static: false, > stringifier: false, > inherit: false, > readonly: false > }; >- const w = all_ws(); >- if (w) grabbed.push(w); >- if (consume(ID, "inherit")) { >- if (ret["static"] || ret.stringifier) error("Cannot have a static or stringifier inherit"); >+ if (!noInherit && consume("inherit")) { > ret.inherit = true; >- grabbed.push(last_token); >- const w = all_ws(); >- if (w) grabbed.push(w); > } >- if (consume(ID, "readonly")) { >+ if (consume("readonly")) { > ret.readonly = true; >- grabbed.push(last_token); >- const w = all_ws(); >- if (w) grabbed.push(w); >+ } else if (readonly && probe("attribute")) { >+ error("Attributes must be readonly in this context"); > } > const rest = attribute_rest(ret); > if (!rest) { >- tokens = grabbed.concat(tokens); >+ unconsume(start_position); > } > return rest; >- }; >+ } > > function attribute_rest(ret) { >- if (!consume(ID, "attribute")) { >+ if (!consume("attribute")) { > return; > } >- all_ws(); >- ret.idlType = type_with_extended_attributes() || error("No type in attribute"); >- if (ret.idlType.sequence) error("Attributes cannot accept sequence types"); >+ ret.idlType = type_with_extended_attributes("attribute-type") || error("No type in attribute"); >+ if (ret.idlType.generic === "sequence") error("Attributes cannot accept sequence types"); > if (ret.idlType.generic === "record") error("Attributes cannot accept record types"); >- all_ws(); >- const name = consume(ID) || error("No name in attribute"); >- ret.name = name.value; >- all_ws(); >- consume(OTHER, ";") || error("Unterminated attribute"); >+ const name = consume(ID, "required") || error("No name in attribute"); >+ ret.name = unescape(name.value); >+ ret.escapedName = name.value; >+ consume(";") || error("Unterminated attribute"); > return ret; >- }; >+ } > >- function return_type() { >- const typ = type(); >- if (!typ) { >- if (consume(ID, "void")) { >- return "void"; >- } else error("No return type"); >+ function return_type(typeName) { >+ const typ = type(typeName || "return-type"); >+ if (typ) { >+ return typ; >+ } >+ if (consume("void")) { >+ return Object.assign({ type: "return-type" }, EMPTY_IDLTYPE, { idlType: "void" }); > } >- return typ; >- }; >+ } > >- function operation(store) { >- all_ws(store, "pea"); >+ function operation({ regular = false } = {}) { > const ret = Object.assign({}, EMPTY_OPERATION); >- while (true) { >- all_ws(); >- if (consume(ID, "getter")) ret.getter = true; >- else if (consume(ID, "setter")) ret.setter = true; >- else if (consume(ID, "deleter")) ret.deleter = true; >+ while (!regular) { >+ if (consume("getter")) ret.getter = true; >+ else if (consume("setter")) ret.setter = true; >+ else if (consume("deleter")) ret.deleter = true; > else break; > } >- if (ret.getter || ret.setter || ret.deleter) { >- all_ws(); >- ret.idlType = return_type(); >- operation_rest(ret, store); >- return ret; >- } >- ret.idlType = return_type(); >- all_ws(); >- if (consume(ID, "iterator")) { >- all_ws(); >- ret.type = "iterator"; >- if (consume(ID, "object")) { >- ret.iteratorObject = "object"; >- } else if (consume(OTHER, "=")) { >- all_ws(); >- var name = consume(ID) || error("No right hand side in iterator"); >- ret.iteratorObject = name.value; >- } >- all_ws(); >- consume(OTHER, ";") || error("Unterminated iterator"); >- return ret; >- } else { >- operation_rest(ret, store); >- return ret; >- } >- }; >- >- function static_member(store) { >- all_ws(store, "pea"); >- if (!consume(ID, "static")) return; >- all_ws(); >- return noninherited_attribute(store, "static") || >- regular_operation(store, "static") || >+ ret.idlType = return_type() || error("Missing return type"); >+ operation_rest(ret); >+ return ret; >+ } >+ >+ function static_member() { >+ if (!consume("static")) return; >+ const member = attribute({ noInherit: true }) || >+ operation({ regular: true }) || > error("No body in static member"); >+ member.static = true; >+ return member; > } > >- function stringifier(store) { >- all_ws(store, "pea"); >- if (!consume(ID, "stringifier")) return; >- all_ws(); >- if (consume(OTHER, ";")) { >+ function stringifier() { >+ if (!consume("stringifier")) return; >+ if (consume(";")) { > return Object.assign({}, EMPTY_OPERATION, { stringifier: true }); > } >- return noninherited_attribute(store, "stringifier") || >- regular_operation(store, "stringifier") || >+ const member = attribute({ noInherit: true }) || >+ operation({ regular: true }) || > error("Unterminated stringifier"); >+ member.stringifier = true; >+ return member; > } > >- function identifiers(arr) { >+ function identifiers() { >+ const arr = []; >+ const id = consume(ID); >+ if (id) { >+ arr.push(id.value); >+ } >+ else error("Expected identifiers but not found"); > while (true) { >- all_ws(); >- if (consume(OTHER, ",")) { >- all_ws(); >+ if (consume(",")) { > const name = consume(ID) || error("Trailing comma in identifiers list"); > arr.push(name.value); > } else break; > } >- }; >+ return arr; >+ } > > function iterable_type() { >- if (consume(ID, "iterable")) return "iterable"; >- else if (consume(ID, "legacyiterable")) return "legacyiterable"; >- else if (consume(ID, "maplike")) return "maplike"; >- else if (consume(ID, "setlike")) return "setlike"; >+ if (consume("iterable")) return "iterable"; >+ else if (consume("legacyiterable")) return "legacyiterable"; >+ else if (consume("maplike")) return "maplike"; >+ else if (consume("setlike")) return "setlike"; > else return; >- }; >+ } > > function readonly_iterable_type() { >- if (consume(ID, "maplike")) return "maplike"; >- else if (consume(ID, "setlike")) return "setlike"; >+ if (consume("maplike")) return "maplike"; >+ else if (consume("setlike")) return "setlike"; > else return; >- }; >+ } > >- function iterable(store) { >- all_ws(store, "pea"); >- const grabbed = []; >+ function iterable() { >+ const start_position = consume_position; > const ret = { type: null, idlType: null, readonly: false }; >- if (consume(ID, "readonly")) { >+ if (consume("readonly")) { > ret.readonly = true; >- grabbed.push(last_token); >- var w = all_ws(); >- if (w) grabbed.push(w); > } > const consumeItType = ret.readonly ? readonly_iterable_type : iterable_type; > > const ittype = consumeItType(); > if (!ittype) { >- tokens = grabbed.concat(tokens); >+ unconsume(start_position); > return; > } > >@@ -670,357 +690,255 @@ > ret.type = ittype; > if (ret.type !== 'maplike' && ret.type !== 'setlike') > delete ret.readonly; >- all_ws(); >- if (consume(OTHER, "<")) { >- ret.idlType = type_with_extended_attributes() || error(`Error parsing ${ittype} declaration`); >- all_ws(); >+ if (consume("<")) { >+ ret.idlType = [type_with_extended_attributes()] || error(`Error parsing ${ittype} declaration`); > if (secondTypeAllowed) { >- let type2 = null; >- if (consume(OTHER, ",")) { >- all_ws(); >- type2 = type_with_extended_attributes(); >- all_ws(); >+ if (consume(",")) { >+ ret.idlType.push(type_with_extended_attributes()); > } >- if (type2) >- ret.idlType = [ret.idlType, type2]; > else if (secondTypeRequired) > error(`Missing second type argument in ${ittype} declaration`); > } >- if (!consume(OTHER, ">")) error(`Unterminated ${ittype} declaration`); >- all_ws(); >- if (!consume(OTHER, ";")) error(`Missing semicolon after ${ittype} declaration`); >+ if (!consume(">")) error(`Unterminated ${ittype} declaration`); >+ if (!consume(";")) error(`Missing semicolon after ${ittype} declaration`); > } else > error(`Error parsing ${ittype} declaration`); > > return ret; >- }; >+ } > >- function interface_rest(isPartial, store) { >- all_ws(); >+ function interface_rest(isPartial, typeName = "interface") { > const name = consume(ID) || error("No name for interface"); > const mems = []; >- const ret = { >- type: "interface", >+ const ret = current = { >+ type: typeName, > name: isPartial ? name.value : sanitize_name(name.value, "interface"), >- partial: false, >+ partial: isPartial, > members: mems > }; > if (!isPartial) ret.inheritance = inheritance() || null; >- all_ws(); >- consume(OTHER, "{") || error("Bodyless interface"); >+ consume("{") || error("Bodyless interface"); > while (true) { >- all_ws(store ? mems : null); >- if (consume(OTHER, "}")) { >- all_ws(); >- consume(OTHER, ";") || error("Missing semicolon after interface"); >+ if (consume("}")) { >+ consume(";") || error("Missing semicolon after interface"); > return ret; > } >- const ea = extended_attrs(store ? mems : null); >- all_ws(); >- const cnt = const_(store ? mems : null); >- if (cnt) { >- cnt.extAttrs = ea; >- ret.members.push(cnt); >- continue; >- } >- const mem = (opt.allowNestedTypedefs && typedef(store ? mems : null)) || >- static_member(store ? mems : null) || >- stringifier(store ? mems : null) || >- iterable(store ? mems : null) || >- attribute(store ? mems : null) || >- operation(store ? mems : null) || >+ const ea = extended_attrs(); >+ const mem = const_() || >+ static_member() || >+ stringifier() || >+ iterable() || >+ attribute() || >+ operation() || > error("Unknown member"); > mem.extAttrs = ea; > ret.members.push(mem); > } >- }; >+ } > >- function mixin_rest(isPartial, store) { >- all_ws(); >- if (!consume(ID, "mixin")) return; >- all_ws(); >+ function mixin_rest(isPartial) { >+ if (!consume("mixin")) return; > const name = consume(ID) || error("No name for interface mixin"); > const mems = []; >- const ret = { >+ const ret = current = { > type: "interface mixin", > name: isPartial ? name.value : sanitize_name(name.value, "interface mixin"), >- partial: false, >+ partial: isPartial, > members: mems > }; >- all_ws(); >- consume(OTHER, "{") || error("Bodyless interface mixin"); >+ consume("{") || error("Bodyless interface mixin"); > while (true) { >- all_ws(store ? mems : null); >- if (consume(OTHER, "}")) { >- all_ws(); >- consume(OTHER, ";") || error("Missing semicolon after interface mixin"); >+ if (consume("}")) { >+ consume(";") || error("Missing semicolon after interface mixin"); > return ret; > } >- const ea = extended_attrs(store ? mems : null); >- all_ws(); >- const cnt = const_(store ? mems : null); >- if (cnt) { >- cnt.extAttrs = ea; >- ret.members.push(cnt); >- continue; >- } >- const mem = stringifier(store ? mems : null) || >- noninherited_attribute(store ? mems : null) || >- regular_operation(store ? mems : null) || >+ const ea = extended_attrs(); >+ const mem = const_() || >+ stringifier() || >+ attribute({ noInherit: true }) || >+ operation({ regular: true }) || > error("Unknown member"); > mem.extAttrs = ea; > ret.members.push(mem); > } > } > >- function interface_(isPartial, store) { >- all_ws(isPartial ? null : store, "pea"); >- if (!consume(ID, "interface")) return; >- return mixin_rest(isPartial, store) || >- interface_rest(isPartial, store) || >+ function interface_(isPartial) { >+ if (!consume("interface")) return; >+ return mixin_rest(isPartial) || >+ interface_rest(isPartial) || > error("Interface has no proper body"); > } > >- function namespace(isPartial, store) { >- all_ws(isPartial ? null : store, "pea"); >- if (!consume(ID, "namespace")) return; >- all_ws(); >+ function namespace(isPartial) { >+ if (!consume("namespace")) return; > const name = consume(ID) || error("No name for namespace"); > const mems = []; >- const ret = { >+ const ret = current = { > type: "namespace", > name: isPartial ? name.value : sanitize_name(name.value, "namespace"), > partial: isPartial, > members: mems > }; >- all_ws(); >- consume(OTHER, "{") || error("Bodyless namespace"); >+ consume("{") || error("Bodyless namespace"); > while (true) { >- all_ws(store ? mems : null); >- if (consume(OTHER, "}")) { >- all_ws(); >- consume(OTHER, ";") || error("Missing semicolon after namespace"); >+ if (consume("}")) { >+ consume(";") || error("Missing semicolon after namespace"); > return ret; > } >- const ea = extended_attrs(store ? mems : null); >- all_ws(); >- const mem = noninherited_attribute(store ? mems : null) || >- regular_operation(store ? mems : null) || >+ const ea = extended_attrs(); >+ const mem = attribute({ noInherit: true, readonly: true }) || >+ operation({ regular: true }) || > error("Unknown member"); > mem.extAttrs = ea; > ret.members.push(mem); > } > } > >- function noninherited_attribute(store, prefix) { >- const w = all_ws(store, "pea"); >- const grabbed = []; >- const ret = { >- type: "attribute", >- "static": false, >- stringifier: false, >- inherit: false, >- readonly: false >- }; >- if (prefix) { >- ret[prefix] = true; >- } >- if (w) grabbed.push(w); >- if (consume(ID, "readonly")) { >- ret.readonly = true; >- grabbed.push(last_token); >- const w = all_ws(); >- if (w) grabbed.push(w); >- } >- const rest = attribute_rest(ret); >- if (!rest) { >- tokens = grabbed.concat(tokens); >- } >- return rest; >- } >- >- function regular_operation(store, prefix) { >- all_ws(store, "pea"); >- const ret = Object.assign({}, EMPTY_OPERATION); >- if (prefix) { >- ret[prefix] = true; >- } >- ret.idlType = return_type(); >- return operation_rest(ret, store); >- } >- >- function partial(store) { >- all_ws(store, "pea"); >- if (!consume(ID, "partial")) return; >- const thing = dictionary(true, store) || >- interface_(true, store) || >- namespace(true, store) || >+ function partial() { >+ if (!consume("partial")) return; >+ const thing = dictionary(true) || >+ interface_(true) || >+ namespace(true) || > error("Partial doesn't apply to anything"); >- thing.partial = true; > return thing; >- }; >+ } > >- function dictionary(isPartial, store) { >- all_ws(isPartial ? null : store, "pea"); >- if (!consume(ID, "dictionary")) return; >- all_ws(); >+ function dictionary(isPartial) { >+ if (!consume("dictionary")) return; > const name = consume(ID) || error("No name for dictionary"); > const mems = []; >- const ret = { >+ const ret = current = { > type: "dictionary", > name: isPartial ? name.value : sanitize_name(name.value, "dictionary"), >- partial: false, >+ partial: isPartial, > members: mems > }; > if (!isPartial) ret.inheritance = inheritance() || null; >- all_ws(); >- consume(OTHER, "{") || error("Bodyless dictionary"); >+ consume("{") || error("Bodyless dictionary"); > while (true) { >- all_ws(store ? mems : null); >- if (consume(OTHER, "}")) { >- all_ws(); >- consume(OTHER, ";") || error("Missing semicolon after dictionary"); >+ if (consume("}")) { >+ consume(";") || error("Missing semicolon after dictionary"); > return ret; > } >- const ea = extended_attrs(store ? mems : null); >- all_ws(store ? mems : null, "pea"); >- const required = consume(ID, "required"); >- const typ = type_with_extended_attributes() || error("No type for dictionary member"); >- all_ws(); >+ const ea = extended_attrs(); >+ const required = consume("required"); >+ const typ = type_with_extended_attributes("dictionary-type") || error("No type for dictionary member"); > const name = consume(ID) || error("No name for dictionary member"); >- const dflt = default_(); >+ const dflt = default_() || null; > if (required && dflt) error("Required member must not have a default"); > const member = { > type: "field", >- name: name.value, >+ name: unescape(name.value), >+ escapedName: name.value, > required: !!required, > idlType: typ, >- extAttrs: ea >+ extAttrs: ea, >+ default: dflt > }; >- if (typeof dflt !== "undefined") { >- member["default"] = dflt; >- } > ret.members.push(member); >- all_ws(); >- consume(OTHER, ";") || error("Unterminated dictionary member"); >+ consume(";") || error("Unterminated dictionary member"); > } >- }; >+ } > >- function enum_(store) { >- all_ws(store, "pea"); >- if (!consume(ID, "enum")) return; >- all_ws(); >+ function enum_() { >+ if (!consume("enum")) return; > const name = consume(ID) || error("No name for enum"); > const vals = []; >- const ret = { >+ const ret = current = { > type: "enum", > name: sanitize_name(name.value, "enum"), > values: vals > }; >- all_ws(); >- consume(OTHER, "{") || error("No curly for enum"); >- let saw_comma = false; >+ consume("{") || error("No curly for enum"); >+ let value_expected = true; > while (true) { >- all_ws(store ? vals : null); >- if (consume(OTHER, "}")) { >- all_ws(); >- consume(OTHER, ";") || error("No semicolon after enum"); >+ if (consume("}")) { >+ if (!ret.values.length) error("No value in enum"); >+ consume(";") || error("No semicolon after enum"); > return ret; > } >+ else if (!value_expected) { >+ error("No comma between enum values"); >+ } > const val = consume(STR) || error("Unexpected value in enum"); >- val.value = val.value.replace(/"/g, ""); >+ val.value = val.value.slice(1, -1); >+ // No trivia exposure yet >+ val.trivia = undefined; > ret.values.push(val); >- all_ws(store ? vals : null); >- if (consume(OTHER, ",")) { >- if (store) vals.push({ type: "," }); >- all_ws(store ? vals : null); >- saw_comma = true; >- } else { >- saw_comma = false; >- } >+ value_expected = !!consume(","); > } >- }; >+ } > >- function typedef(store) { >- all_ws(store, "pea"); >- if (!consume(ID, "typedef")) return; >+ function typedef() { >+ if (!consume("typedef")) return; > const ret = { > type: "typedef" > }; >- all_ws(); >- ret.idlType = type_with_extended_attributes() || error("No type in typedef"); >- all_ws(); >+ ret.idlType = type_with_extended_attributes("typedef-type") || error("No type in typedef"); > const name = consume(ID) || error("No name in typedef"); > ret.name = sanitize_name(name.value, "typedef"); >- all_ws(); >- consume(OTHER, ";") || error("Unterminated typedef"); >+ current = ret; >+ consume(";") || error("Unterminated typedef"); > return ret; >- }; >+ } > >- function implements_(store) { >- all_ws(store, "pea"); >+ function implements_() { >+ const start_position = consume_position; > const target = consume(ID); > if (!target) return; >- const w = all_ws(); >- if (consume(ID, "implements")) { >+ if (consume("implements")) { > const ret = { > type: "implements", > target: target.value > }; >- all_ws(); > const imp = consume(ID) || error("Incomplete implements statement"); >- ret["implements"] = imp.value; >- all_ws(); >- consume(OTHER, ";") || error("No terminating ; for implements statement"); >+ ret.implements = imp.value; >+ consume(";") || error("No terminating ; for implements statement"); > return ret; > } else { > // rollback >- tokens.unshift(w); >- tokens.unshift(target); >+ unconsume(start_position); > } >- }; >+ } > >- function includes(store) { >- all_ws(store, "pea"); >+ function includes() { >+ const start_position = consume_position; > const target = consume(ID); > if (!target) return; >- const w = all_ws(); >- if (consume(ID, "includes")) { >+ if (consume("includes")) { > const ret = { > type: "includes", > target: target.value > }; >- all_ws(); > const imp = consume(ID) || error("Incomplete includes statement"); >- ret["includes"] = imp.value; >- all_ws(); >- consume(OTHER, ";") || error("No terminating ; for includes statement"); >+ ret.includes = imp.value; >+ consume(";") || error("No terminating ; for includes statement"); > return ret; > } else { > // rollback >- tokens.unshift(w); >- tokens.unshift(target); >+ unconsume(start_position); > } >- }; >- >- function definition(store) { >- return callback(store) || >- interface_(false, store) || >- partial(store) || >- dictionary(false, store) || >- enum_(store) || >- typedef(store) || >- implements_(store) || >- includes(store) || >- namespace(false, store); >- }; >- >- function definitions(store) { >+ } >+ >+ function definition() { >+ return callback() || >+ interface_(false) || >+ partial() || >+ dictionary(false) || >+ enum_() || >+ typedef() || >+ implements_() || >+ includes() || >+ namespace(false); >+ } >+ >+ function definitions() { > if (!tokens.length) return []; > const defs = []; > while (true) { >- const ea = extended_attrs(store ? defs : null); >- const def = definition(store ? defs : null); >+ const ea = extended_attrs(); >+ const def = definition(); > if (!def) { > if (ea.length) error("Stray extended attributes"); > break; >@@ -1029,17 +947,16 @@ > defs.push(def); > } > return defs; >- }; >- const res = definitions(opt.ws); >- if (tokens.length) error("Unrecognised tokens"); >+ } >+ const res = definitions(); >+ if (consume_position < tokens.length) error("Unrecognised tokens"); > return res; >- }; >+ } > > const obj = { >- parse(str, opt) { >- if (!opt) opt = {}; >+ parse(str) { > const tokens = tokenise(str); >- return parse(tokens, opt); >+ return parse(tokens); > } > }; > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/writer.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/writer.js >index f7c79f8289358a5ba57911246440fb192f099e08..b3097a6f8a74e4cdeaf71f688ece20423c238a0d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/writer.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/lib/writer.js >@@ -1,280 +1,221 @@ >-(function() { >+"use strict"; > >- var write = function(ast, opt) { >- var curPea = "", >- curTPea = "", >- opt = opt || {}, >- noop = function(str) { >- return str; }, >- optNames = "type".split(" "), >- context = []; >- for (var i = 0, n = optNames.length; i < n; i++) { >- var o = optNames[i]; >+(() => { >+ function write(ast, opt = {}) { >+ const noop = str => str; >+ const optNames = "type".split(" "); >+ const context = []; >+ for (const o of optNames) { > if (!opt[o]) opt[o] = noop; > } > >- var literal = function(it) { >+ function literal(it) { > return it.value; > }; >- var wsPea = function(it) { >- curPea += it.value; >- return ""; >- }; >- var wsTPea = function(it) { >- curTPea += it.value; >- return ""; >- }; >- var lineComment = function(it) { >- return "//" + it.value + "\n"; >- }; >- var multilineComment = function(it) { >- return "/*" + it.value + "*/"; >- }; >- var type = function(it) { >+ function type(it) { > if (typeof it === "string") return opt.type(it); // XXX should maintain some context >- if (it.union) return "(" + it.idlType.map(type).join(" or ") + ")"; >- var ret = ""; >- if (it.generic) ret += it.generic + "<"; >- else if (it.sequence) ret += "sequence<"; >- if (Array.isArray(it.idlType)) ret += it.idlType.map(type).join(", "); >- else ret += type(it.idlType); >- if (it.array || it.generic === 'Array') { >- for (var i = 0, n = it.nullableArray.length; i < n; i++) { >- var val = it.nullableArray[i]; >- if (val) ret += "?"; >- ret += "[]"; >- } >+ let ret = extended_attributes(it.extAttrs); >+ if (it.union) ret += `(${it.idlType.map(type).join(" or ")})`; >+ else { >+ if (it.generic) ret += `${it.generic}<`; >+ if (Array.isArray(it.idlType)) ret += it.idlType.map(type).join(", "); >+ else ret += type(it.idlType); >+ if (it.generic) ret += ">"; > } >- if (it.generic || it.sequence) ret += ">"; > if (it.nullable) ret += "?"; > > return ret; > }; >- var const_value = function(it) { >- var tp = it.type; >+ function const_value(it) { >+ const tp = it.type; > if (tp === "boolean") return it.value ? "true" : "false"; > else if (tp === "null") return "null"; > else if (tp === "Infinity") return (it.negative ? "-" : "") + "Infinity"; > else if (tp === "NaN") return "NaN"; > else if (tp === "number") return it.value; >- else return '"' + it.value + '"'; >+ else if (tp === "sequence") return "[]"; >+ else return `"${it.value}"`; > }; >- var argument = function(arg, pea) { >- var ret = extended_attributes(arg.extAttrs, pea); >+ function argument(arg) { >+ let ret = extended_attributes(arg.extAttrs); > if (arg.optional) ret += "optional "; > ret += type(arg.idlType); > if (arg.variadic) ret += "..."; >- ret += " " + arg.name; >- if (arg["default"]) ret += " = " + const_value(arg["default"]); >+ ret += ` ${arg.escapedName}`; >+ if (arg.default) ret += ` = ${const_value(arg.default)}`; > return ret; > }; >- var args = function(its) { >- var res = "", >- pea = ""; >- for (var i = 0, n = its.length; i < n; i++) { >- var arg = its[i]; >- if (arg.type === "ws") res += arg.value; >- else if (arg.type === "ws-pea") pea += arg.value; >- else { >- res += argument(arg, pea); >- if (i < n - 1) res += ","; >- pea = ""; >- } >- } >- return res; >- }; >- var make_ext_at = function(it) { >- if (it["arguments"] === null) return it.name; >+ function make_ext_at(it) { > context.unshift(it); >- var ret = it.name + "(" + (it["arguments"].length ? args(it["arguments"]) : "") + ")"; >+ let ret = it.name; >+ if (it.rhs) { >+ if (it.rhs.type === "identifier-list") ret += `=(${it.rhs.value.join(",")})`; >+ else ret += `=${it.rhs.value}`; >+ } >+ if (it.arguments) ret += `(${it.arguments.length ? it.arguments.map(argument).join(",") : ""})`; > context.shift(); // XXX need to add more contexts, but not more than needed for ReSpec > return ret; > }; >- var extended_attributes = function(eats, pea) { >+ function extended_attributes(eats) { > if (!eats || !eats.length) return ""; >- return "[" + eats.map(make_ext_at).join(", ") + "]" + pea; >+ return `[${eats.map(make_ext_at).join(", ")}]`; > }; > >- var modifiers = "getter setter creator deleter legacycaller stringifier static".split(" "); >- var operation = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >+ const modifiers = "getter setter deleter stringifier static".split(" "); >+ function operation(it) { >+ let ret = extended_attributes(it.extAttrs); > if (it.stringifier && !it.idlType) return "stringifier;"; >- for (var i = 0, n = modifiers.length; i < n; i++) { >- var mod = modifiers[i]; >+ for (const mod of modifiers) { > if (it[mod]) ret += mod + " "; > } > ret += type(it.idlType) + " "; >- if (it.name) ret += it.name; >- ret += "(" + args(it["arguments"]) + ");"; >+ if (it.name) ret += it.escapedName; >+ ret += `(${it.arguments.map(argument).join(",")});`; > return ret; > }; > >- var attribute = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- if (it["static"]) ret += "static "; >+ function attribute(it) { >+ let ret = extended_attributes(it.extAttrs); >+ if (it.static) ret += "static "; > if (it.stringifier) ret += "stringifier "; >- if (it.readonly) ret += "readonly "; > if (it.inherit) ret += "inherit "; >- ret += "attribute " + type(it.idlType) + " " + it.name + ";"; >+ if (it.readonly) ret += "readonly "; >+ ret += `attribute ${type(it.idlType)} ${it.escapedName};`; > return ret; > }; > >- var interface_ = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >+ function interface_(it) { >+ let ret = extended_attributes(it.extAttrs); > if (it.partial) ret += "partial "; >- ret += "interface " + it.name + " "; >- if (it.inheritance) ret += ": " + it.inheritance + " "; >- ret += "{" + iterate(it.members) + "};"; >+ ret += `interface ${it.name} `; >+ if (it.inheritance) ret += `: ${it.inheritance} `; >+ ret += `{${iterate(it.members)}};`; > return ret; > }; > >- var dictionary = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >+ function interface_mixin(it) { >+ let ret = extended_attributes(it.extAttrs); > if (it.partial) ret += "partial "; >- ret += "dictionary " + it.name + " "; >- ret += "{" + iterate(it.members) + "};"; >+ ret += `interface mixin ${it.name} `; >+ ret += `{${iterate(it.members)}};`; >+ return ret; >+ } >+ >+ function namespace(it) { >+ let ret = extended_attributes(it.extAttrs); >+ if (it.partial) ret += "partial "; >+ ret += `namespace ${it.name} `; >+ ret += `{${iterate(it.members)}};`; >+ return ret; >+ } >+ >+ function dictionary(it) { >+ let ret = extended_attributes(it.extAttrs); >+ if (it.partial) ret += "partial "; >+ ret += `dictionary ${it.name} `; >+ if (it.inheritance) ret += `: ${it.inheritance} `; >+ ret += `{${iterate(it.members)}};`; > return ret; > }; >- var field = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >+ function field(it) { >+ let ret = extended_attributes(it.extAttrs); > if (it.required) ret += "required "; >- ret += type(it.idlType) + " " + it.name; >- if (it["default"]) ret += " = " + const_value(it["default"]); >+ ret += `${type(it.idlType)} ${it.escapedName}`; >+ if (it.default) ret += ` = ${const_value(it.default)}`; > ret += ";"; > return ret; > }; >- var exception = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- ret += "exception " + it.name + " "; >- if (it.inheritance) ret += ": " + it.inheritance + " "; >- ret += "{" + iterate(it.members) + "};"; >- return ret; >+ function const_(it) { >+ const ret = extended_attributes(it.extAttrs); >+ return `${ret}const ${type(it.idlType)}${it.nullable ? "?" : ""} ${it.name} = ${const_value(it.value)};`; > }; >- var const_ = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- return ret + "const " + type(it.idlType) + " " + it.name + " = " + const_value(it.value) + ";"; >+ function typedef(it) { >+ let ret = extended_attributes(it.extAttrs); >+ ret += `typedef ${extended_attributes(it.typeExtAttrs)}`; >+ return `${ret}${type(it.idlType)} ${it.name};`; > }; >- var typedef = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- ret += "typedef " + extended_attributes(it.typeExtAttrs, curTPea); >- curTPea = ""; >- return ret + type(it.idlType) + " " + it.name + ";"; >+ function implements_(it) { >+ const ret = extended_attributes(it.extAttrs); >+ return `${ret}${it.target} implements ${it.implements};`; > }; >- var implements_ = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- return ret + it.target + " implements " + it["implements"] + ";"; >+ function includes(it) { >+ const ret = extended_attributes(it.extAttrs); >+ return `${ret}${it.target} includes ${it.includes};`; > }; >- var callback = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- return ret + "callback " + it.name + " = " + type(it.idlType) + >- "(" + args(it["arguments"]) + ");"; >+ function callback(it) { >+ const ret = extended_attributes(it.extAttrs); >+ return `${ret}callback ${it.name} = ${type(it.idlType)}(${it.arguments.map(argument).join(",")});`; > }; >- var enum_ = function(it) { >- var ret = extended_attributes(it.extAttrs, curPea); >- curPea = ""; >- ret += "enum " + it.name + " {"; >- for (var i = 0, n = it.values.length; i < n; i++) { >- var v = it.values[i]; >- if (typeof v === "string") ret += '"' + v + '"'; >- else if (v.type === "ws") ret += v.value; >- else if (v.type === ",") ret += ","; >+ function enum_(it) { >+ let ret = extended_attributes(it.extAttrs); >+ ret += `enum ${it.name} {`; >+ for (const v of it.values) { >+ ret += `"${v.value}",`; > } > return ret + "};"; > }; >- var serializer = function(it) { >- var ret = "serializer"; >- if (it.name) { >- ret += " = " + it.name + ";"; >- } else if (it.patternList) { >- ret += " = [ " + it.names.join(", ") + " ];"; >- } else if (it.patternMap) { >- ret += " = { " + it.names.join(", ") + " };"; >- } else if (it.operation) { >- ret += " " + operation(it); >- } else { >- ret += ";"; >- } >- return ret; >- }; >- var iterable = function(it) { >- return "iterable<" + (it.idlType instanceof Array ? it.idlType.map(type).join(", ") : type(it.idlType)) + ">;"; >+ function iterable(it) { >+ return `iterable<${Array.isArray(it.idlType) ? it.idlType.map(type).join(", ") : type(it.idlType)}>;`; > }; >- var legacyiterable = function(it) { >- return "legacyiterable<" + (it.idlType instanceof Array ? it.idlType.map(type).join(", ") : type(it.idlType)) + ">;"; >+ function legacyiterable(it) { >+ return `legacyiterable<${Array.isArray(it.idlType) ? it.idlType.map(type).join(", ") : type(it.idlType)}>;`; > }; >- var maplike = function(it) { >- return (it.readonly ? "readonly " : "") + "maplike<" + >- it.idlType.map(type).join(", ") + ">;"; >+ function maplike(it) { >+ return `${it.readonly ? "readonly " : ""}maplike<${it.idlType.map(type).join(", ")}>;`; > }; >- var setlike = function(it) { >- return (it.readonly ? "readonly " : "") + "setlike<" + >- type(it.idlType) + ">;"; >+ function setlike(it) { >+ return `${it.readonly ? "readonly " : ""}setlike<${type(it.idlType[0])}>;`; > }; >- var callbackInterface = function(it) { >- return 'callback ' + interface_(it); >+ function callbackInterface(it) { >+ return `callback ${interface_(it)}`; > }; > >- var table = { >- ws: literal, >- "ws-pea": wsPea, >- "ws-tpea": wsTPea, >- "line-comment": lineComment, >- "multiline-comment": multilineComment, >- "interface": interface_, >- operation: operation, >- attribute: attribute, >- dictionary: dictionary, >- field: field, >- exception: exception, >- "const": const_, >- typedef: typedef, >- "implements": implements_, >- callback: callback, >- "enum": enum_, >- serializer: serializer, >- iterable: iterable, >- legacyiterable: legacyiterable, >- maplike: maplike, >- setlike: setlike, >+ const table = { >+ interface: interface_, >+ "interface mixin": interface_mixin, >+ namespace, >+ operation, >+ attribute, >+ dictionary, >+ field, >+ const: const_, >+ typedef, >+ implements: implements_, >+ includes, >+ callback, >+ enum: enum_, >+ iterable, >+ legacyiterable, >+ maplike, >+ setlike, > "callback interface": callbackInterface > }; >- var dispatch = function(it) { >+ function dispatch(it) { >+ const dispatcher = table[it.type]; >+ if (!dispatcher) { >+ throw new Error(`Type "${it.type}" is unsupported`) >+ } > return table[it.type](it); > }; >- var iterate = function(things) { >+ function iterate(things) { > if (!things) return; >- var ret = ""; >- for (var i = 0, n = things.length; i < n; i++) ret += dispatch(things[i]); >+ let ret = ""; >+ for (const thing of things) ret += dispatch(thing); > return ret; > }; > return iterate(ast); > }; > > >- var obj = { >- write: function(ast, opt) { >- if (!opt) opt = {}; >- return write(ast, opt); >- } >+ const obj = { >+ write > }; > > if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { > module.exports = obj; > } else if (typeof define === 'function' && define.amd) { >- define([], function() { >- return obj; >- }); >+ define([], () => obj); > } else { > (self || window).WebIDL2Writer = obj; > } >-}()); >+})(); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package-lock.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package-lock.json >new file mode 100644 >index 0000000000000000000000000000000000000000..b0581037fe943423f4f09bceabbef0f8828d6fc3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package-lock.json >@@ -0,0 +1,700 @@ >+{ >+ "name": "webidl2", >+ "version": "13.0.3", >+ "lockfileVersion": 1, >+ "requires": true, >+ "dependencies": { >+ "@babel/code-frame": { >+ "version": "7.0.0-beta.40", >+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz", >+ "integrity": "sha512-eVXQSbu/RimU6OKcK2/gDJVTFcxXJI4sHbIqw2mhwMZeQ2as/8AhS9DGkEDoHMBBNJZ5B0US63lF56x+KDcxiA==", >+ "dev": true, >+ "requires": { >+ "@babel/highlight": "7.0.0-beta.40" >+ } >+ }, >+ "@babel/highlight": { >+ "version": "7.0.0-beta.40", >+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.40.tgz", >+ "integrity": "sha512-mOhhTrzieV6VO7odgzFGFapiwRK0ei8RZRhfzHhb6cpX3QM8XXuCLXWjN8qBB7JReDdUR80V3LFfFrGUYevhNg==", >+ "dev": true, >+ "requires": { >+ "chalk": "^2.0.0", >+ "esutils": "^2.0.2", >+ "js-tokens": "^3.0.0" >+ } >+ }, >+ "ansi-regex": { >+ "version": "3.0.0", >+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", >+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", >+ "dev": true >+ }, >+ "ansi-styles": { >+ "version": "3.2.1", >+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", >+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", >+ "dev": true, >+ "requires": { >+ "color-convert": "^1.9.0" >+ } >+ }, >+ "arr-diff": { >+ "version": "2.0.0", >+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", >+ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", >+ "dev": true, >+ "requires": { >+ "arr-flatten": "^1.0.1" >+ } >+ }, >+ "arr-flatten": { >+ "version": "1.1.0", >+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", >+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", >+ "dev": true >+ }, >+ "array-unique": { >+ "version": "0.2.1", >+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", >+ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", >+ "dev": true >+ }, >+ "balanced-match": { >+ "version": "1.0.0", >+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", >+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", >+ "dev": true >+ }, >+ "brace-expansion": { >+ "version": "1.1.11", >+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", >+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", >+ "dev": true, >+ "requires": { >+ "balanced-match": "^1.0.0", >+ "concat-map": "0.0.1" >+ } >+ }, >+ "braces": { >+ "version": "1.8.5", >+ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", >+ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", >+ "dev": true, >+ "requires": { >+ "expand-range": "^1.8.1", >+ "preserve": "^0.2.0", >+ "repeat-element": "^1.1.2" >+ } >+ }, >+ "browser-stdout": { >+ "version": "1.3.1", >+ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", >+ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", >+ "dev": true >+ }, >+ "chalk": { >+ "version": "2.3.2", >+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", >+ "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", >+ "dev": true, >+ "requires": { >+ "ansi-styles": "^3.2.1", >+ "escape-string-regexp": "^1.0.5", >+ "supports-color": "^5.3.0" >+ } >+ }, >+ "color-convert": { >+ "version": "1.9.1", >+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", >+ "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", >+ "dev": true, >+ "requires": { >+ "color-name": "^1.1.1" >+ } >+ }, >+ "color-name": { >+ "version": "1.1.3", >+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", >+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", >+ "dev": true >+ }, >+ "commander": { >+ "version": "2.11.0", >+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", >+ "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", >+ "dev": true >+ }, >+ "concat-map": { >+ "version": "0.0.1", >+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", >+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", >+ "dev": true >+ }, >+ "debug": { >+ "version": "3.1.0", >+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", >+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", >+ "dev": true, >+ "requires": { >+ "ms": "2.0.0" >+ } >+ }, >+ "diff": { >+ "version": "3.5.0", >+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", >+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", >+ "dev": true >+ }, >+ "diff-match-patch": { >+ "version": "1.0.0", >+ "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz", >+ "integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=", >+ "dev": true >+ }, >+ "escape-string-regexp": { >+ "version": "1.0.5", >+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", >+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", >+ "dev": true >+ }, >+ "esutils": { >+ "version": "2.0.2", >+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", >+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", >+ "dev": true >+ }, >+ "expand-brackets": { >+ "version": "0.1.5", >+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", >+ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", >+ "dev": true, >+ "requires": { >+ "is-posix-bracket": "^0.1.0" >+ } >+ }, >+ "expand-range": { >+ "version": "1.8.2", >+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", >+ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", >+ "dev": true, >+ "requires": { >+ "fill-range": "^2.1.0" >+ } >+ }, >+ "expect": { >+ "version": "22.4.0", >+ "resolved": "https://registry.npmjs.org/expect/-/expect-22.4.0.tgz", >+ "integrity": "sha512-Fiy862jT3qc70hwIHwwCBNISmaqBrfWKKrtqyMJ6iwZr+6KXtcnHojZFtd63TPRvRl8EQTJ+YXYy2lK6/6u+Hw==", >+ "dev": true, >+ "requires": { >+ "ansi-styles": "^3.2.0", >+ "jest-diff": "^22.4.0", >+ "jest-get-type": "^22.1.0", >+ "jest-matcher-utils": "^22.4.0", >+ "jest-message-util": "^22.4.0", >+ "jest-regex-util": "^22.1.0" >+ } >+ }, >+ "extglob": { >+ "version": "0.3.2", >+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", >+ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", >+ "dev": true, >+ "requires": { >+ "is-extglob": "^1.0.0" >+ } >+ }, >+ "filename-regex": { >+ "version": "2.0.1", >+ "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", >+ "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", >+ "dev": true >+ }, >+ "fill-range": { >+ "version": "2.2.4", >+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", >+ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", >+ "dev": true, >+ "requires": { >+ "is-number": "^2.1.0", >+ "isobject": "^2.0.0", >+ "randomatic": "^3.0.0", >+ "repeat-element": "^1.1.2", >+ "repeat-string": "^1.5.2" >+ } >+ }, >+ "for-in": { >+ "version": "1.0.2", >+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", >+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", >+ "dev": true >+ }, >+ "for-own": { >+ "version": "0.1.5", >+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", >+ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", >+ "dev": true, >+ "requires": { >+ "for-in": "^1.0.1" >+ } >+ }, >+ "fs.realpath": { >+ "version": "1.0.0", >+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", >+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", >+ "dev": true >+ }, >+ "glob": { >+ "version": "7.1.2", >+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", >+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", >+ "dev": true, >+ "requires": { >+ "fs.realpath": "^1.0.0", >+ "inflight": "^1.0.4", >+ "inherits": "2", >+ "minimatch": "^3.0.4", >+ "once": "^1.3.0", >+ "path-is-absolute": "^1.0.0" >+ } >+ }, >+ "glob-base": { >+ "version": "0.3.0", >+ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", >+ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", >+ "dev": true, >+ "requires": { >+ "glob-parent": "^2.0.0", >+ "is-glob": "^2.0.0" >+ } >+ }, >+ "glob-parent": { >+ "version": "2.0.0", >+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", >+ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", >+ "dev": true, >+ "requires": { >+ "is-glob": "^2.0.0" >+ } >+ }, >+ "growl": { >+ "version": "1.10.3", >+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", >+ "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", >+ "dev": true >+ }, >+ "has-flag": { >+ "version": "3.0.0", >+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", >+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", >+ "dev": true >+ }, >+ "he": { >+ "version": "1.1.1", >+ "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", >+ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", >+ "dev": true >+ }, >+ "inflight": { >+ "version": "1.0.6", >+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", >+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", >+ "dev": true, >+ "requires": { >+ "once": "^1.3.0", >+ "wrappy": "1" >+ } >+ }, >+ "inherits": { >+ "version": "2.0.3", >+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", >+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", >+ "dev": true >+ }, >+ "is-buffer": { >+ "version": "1.1.6", >+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", >+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", >+ "dev": true >+ }, >+ "is-dotfile": { >+ "version": "1.0.3", >+ "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", >+ "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", >+ "dev": true >+ }, >+ "is-equal-shallow": { >+ "version": "0.1.3", >+ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", >+ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", >+ "dev": true, >+ "requires": { >+ "is-primitive": "^2.0.0" >+ } >+ }, >+ "is-extendable": { >+ "version": "0.1.1", >+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", >+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", >+ "dev": true >+ }, >+ "is-extglob": { >+ "version": "1.0.0", >+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", >+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", >+ "dev": true >+ }, >+ "is-glob": { >+ "version": "2.0.1", >+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", >+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", >+ "dev": true, >+ "requires": { >+ "is-extglob": "^1.0.0" >+ } >+ }, >+ "is-number": { >+ "version": "2.1.0", >+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", >+ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", >+ "dev": true, >+ "requires": { >+ "kind-of": "^3.0.2" >+ } >+ }, >+ "is-posix-bracket": { >+ "version": "0.1.1", >+ "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", >+ "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", >+ "dev": true >+ }, >+ "is-primitive": { >+ "version": "2.0.0", >+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", >+ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", >+ "dev": true >+ }, >+ "isarray": { >+ "version": "1.0.0", >+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", >+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", >+ "dev": true >+ }, >+ "isobject": { >+ "version": "2.1.0", >+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", >+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", >+ "dev": true, >+ "requires": { >+ "isarray": "1.0.0" >+ } >+ }, >+ "jest-diff": { >+ "version": "22.4.0", >+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-22.4.0.tgz", >+ "integrity": "sha512-+/t20WmnkOkB8MOaGaPziI8zWKxquMvYw4Ub+wOzi7AUhmpFXz43buWSxVoZo4J5RnCozpGbX3/FssjJ5KV9Nw==", >+ "dev": true, >+ "requires": { >+ "chalk": "^2.0.1", >+ "diff": "^3.2.0", >+ "jest-get-type": "^22.1.0", >+ "pretty-format": "^22.4.0" >+ } >+ }, >+ "jest-get-type": { >+ "version": "22.1.0", >+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.1.0.tgz", >+ "integrity": "sha512-nD97IVOlNP6fjIN5i7j5XRH+hFsHL7VlauBbzRvueaaUe70uohrkz7pL/N8lx/IAwZRTJ//wOdVgh85OgM7g3w==", >+ "dev": true >+ }, >+ "jest-matcher-utils": { >+ "version": "22.4.0", >+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz", >+ "integrity": "sha512-03m3issxUXpWMwDYTfmL8hRNewUB0yCRTeXPm+eq058rZxLHD9f5NtSSO98CWHqe4UyISIxd9Ao9iDVjHWd2qg==", >+ "dev": true, >+ "requires": { >+ "chalk": "^2.0.1", >+ "jest-get-type": "^22.1.0", >+ "pretty-format": "^22.4.0" >+ } >+ }, >+ "jest-message-util": { >+ "version": "22.4.0", >+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.0.tgz", >+ "integrity": "sha512-eyCJB0T3hrlpFF2FqQoIB093OulP+1qvATQmD3IOgJgMGqPL6eYw8TbC5P/VCWPqKhGL51xvjIIhow5eZ2wHFw==", >+ "dev": true, >+ "requires": { >+ "@babel/code-frame": "^7.0.0-beta.35", >+ "chalk": "^2.0.1", >+ "micromatch": "^2.3.11", >+ "slash": "^1.0.0", >+ "stack-utils": "^1.0.1" >+ } >+ }, >+ "jest-regex-util": { >+ "version": "22.1.0", >+ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.1.0.tgz", >+ "integrity": "sha512-on0LqVS6Xeh69sw3d1RukVnur+lVOl3zkmb0Q54FHj9wHoq6dbtWqb3TSlnVUyx36hqjJhjgs/QLqs07Bzu72Q==", >+ "dev": true >+ }, >+ "js-tokens": { >+ "version": "3.0.2", >+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", >+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", >+ "dev": true >+ }, >+ "jsondiffpatch": { >+ "version": "0.3.5", >+ "resolved": "https://registry.npmjs.org/jsondiffpatch/-/jsondiffpatch-0.3.5.tgz", >+ "integrity": "sha512-v7eaGLDMCHXH+fsIaZhptEUJmS8EJpunq7IM4cc4vIT/kSRAkaZ6ZF4ebiNcyUelL0znbvj6o2B5Gh9v7Og0BQ==", >+ "dev": true, >+ "requires": { >+ "chalk": "^2.3.0", >+ "diff-match-patch": "^1.0.0" >+ } >+ }, >+ "kind-of": { >+ "version": "3.2.2", >+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", >+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", >+ "dev": true, >+ "requires": { >+ "is-buffer": "^1.1.5" >+ } >+ }, >+ "math-random": { >+ "version": "1.0.1", >+ "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", >+ "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", >+ "dev": true >+ }, >+ "micromatch": { >+ "version": "2.3.11", >+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", >+ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", >+ "dev": true, >+ "requires": { >+ "arr-diff": "^2.0.0", >+ "array-unique": "^0.2.1", >+ "braces": "^1.8.2", >+ "expand-brackets": "^0.1.4", >+ "extglob": "^0.3.1", >+ "filename-regex": "^2.0.0", >+ "is-extglob": "^1.0.0", >+ "is-glob": "^2.0.1", >+ "kind-of": "^3.0.2", >+ "normalize-path": "^2.0.1", >+ "object.omit": "^2.0.0", >+ "parse-glob": "^3.0.4", >+ "regex-cache": "^0.4.2" >+ } >+ }, >+ "minimatch": { >+ "version": "3.0.4", >+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", >+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", >+ "dev": true, >+ "requires": { >+ "brace-expansion": "^1.1.7" >+ } >+ }, >+ "minimist": { >+ "version": "0.0.8", >+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", >+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", >+ "dev": true >+ }, >+ "mkdirp": { >+ "version": "0.5.1", >+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", >+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", >+ "dev": true, >+ "requires": { >+ "minimist": "0.0.8" >+ } >+ }, >+ "mocha": { >+ "version": "5.0.4", >+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", >+ "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", >+ "dev": true, >+ "requires": { >+ "browser-stdout": "1.3.1", >+ "commander": "2.11.0", >+ "debug": "3.1.0", >+ "diff": "3.5.0", >+ "escape-string-regexp": "1.0.5", >+ "glob": "7.1.2", >+ "growl": "1.10.3", >+ "he": "1.1.1", >+ "mkdirp": "0.5.1", >+ "supports-color": "4.4.0" >+ }, >+ "dependencies": { >+ "has-flag": { >+ "version": "2.0.0", >+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", >+ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", >+ "dev": true >+ }, >+ "supports-color": { >+ "version": "4.4.0", >+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", >+ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", >+ "dev": true, >+ "requires": { >+ "has-flag": "^2.0.0" >+ } >+ } >+ } >+ }, >+ "ms": { >+ "version": "2.0.0", >+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", >+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", >+ "dev": true >+ }, >+ "normalize-path": { >+ "version": "2.1.1", >+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", >+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", >+ "dev": true, >+ "requires": { >+ "remove-trailing-separator": "^1.0.1" >+ } >+ }, >+ "object.omit": { >+ "version": "2.0.1", >+ "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", >+ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", >+ "dev": true, >+ "requires": { >+ "for-own": "^0.1.4", >+ "is-extendable": "^0.1.1" >+ } >+ }, >+ "once": { >+ "version": "1.4.0", >+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", >+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", >+ "dev": true, >+ "requires": { >+ "wrappy": "1" >+ } >+ }, >+ "parse-glob": { >+ "version": "3.0.4", >+ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", >+ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", >+ "dev": true, >+ "requires": { >+ "glob-base": "^0.3.0", >+ "is-dotfile": "^1.0.0", >+ "is-extglob": "^1.0.0", >+ "is-glob": "^2.0.0" >+ } >+ }, >+ "path-is-absolute": { >+ "version": "1.0.1", >+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", >+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", >+ "dev": true >+ }, >+ "preserve": { >+ "version": "0.2.0", >+ "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", >+ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", >+ "dev": true >+ }, >+ "pretty-format": { >+ "version": "22.4.0", >+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.0.tgz", >+ "integrity": "sha512-pvCxP2iODIIk9adXlo4S3GRj0BrJiil68kByAa1PrgG97c1tClh9dLMgp3Z6cHFZrclaABt0UH8PIhwHuFLqYA==", >+ "dev": true, >+ "requires": { >+ "ansi-regex": "^3.0.0", >+ "ansi-styles": "^3.2.0" >+ } >+ }, >+ "randomatic": { >+ "version": "3.0.0", >+ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", >+ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", >+ "dev": true, >+ "requires": { >+ "is-number": "^4.0.0", >+ "kind-of": "^6.0.0", >+ "math-random": "^1.0.1" >+ }, >+ "dependencies": { >+ "is-number": { >+ "version": "4.0.0", >+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", >+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", >+ "dev": true >+ }, >+ "kind-of": { >+ "version": "6.0.2", >+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", >+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", >+ "dev": true >+ } >+ } >+ }, >+ "regex-cache": { >+ "version": "0.4.4", >+ "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", >+ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", >+ "dev": true, >+ "requires": { >+ "is-equal-shallow": "^0.1.3" >+ } >+ }, >+ "remove-trailing-separator": { >+ "version": "1.1.0", >+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", >+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", >+ "dev": true >+ }, >+ "repeat-element": { >+ "version": "1.1.2", >+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", >+ "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", >+ "dev": true >+ }, >+ "repeat-string": { >+ "version": "1.6.1", >+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", >+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", >+ "dev": true >+ }, >+ "slash": { >+ "version": "1.0.0", >+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", >+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", >+ "dev": true >+ }, >+ "stack-utils": { >+ "version": "1.0.1", >+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", >+ "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", >+ "dev": true >+ }, >+ "supports-color": { >+ "version": "5.3.0", >+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", >+ "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", >+ "dev": true, >+ "requires": { >+ "has-flag": "^3.0.0" >+ } >+ }, >+ "wrappy": { >+ "version": "1.0.2", >+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", >+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", >+ "dev": true >+ } >+ } >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package.json >index 02b2a9d9b1644eb6e614fa7394ad6c0dde1fed86..92faccafa813fb607f5be73a07cda7f7079d63d5 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package.json >@@ -1,21 +1,27 @@ > { > "name": "webidl2", > "description": "A WebIDL Parser", >- "version": "2.4.0", >- "author": "Robin Berjon <robin@berjon.com>", >- "license": "MIT", >+ "version": "13.0.3", >+ "contributors": [ >+ "Robin Berjon <robin@berjon.com> (https://berjon.com)", >+ "Marcos Caceres <marcos@marcosc.com> (https://marcosc.com)", >+ "Kagami Sascha Rosylight <saschaplas@outlook.com>", >+ "Timothy Gu <timothygu99@gmail.com>" >+ ], >+ "license": "W3C", > "dependencies": {}, > "devDependencies": { >- "mocha": "3.2.0", >- "expect": "1.20.2", >- "underscore": "1.8.3", >- "jsondiffpatch": "0.2.4", >- "benchmark": "*", >- "microtime": "2.1.3" >+ "expect": "22.4.0", >+ "jsondiffpatch": "0.3.5", >+ "mocha": "5.0.4" > }, > "scripts": { >- "test": "mocha" >+ "test": "mocha", >+ "acquire": "node test/util/acquire.js" > }, >- "repository": "git://github.com/darobin/webidl2.js", >- "main": "index" >+ "repository": "git://github.com/w3c/webidl2.js", >+ "main": "index.js", >+ "files": [ >+ "lib/*" >+ ] > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid.js >index b8ab3a1866de0f05d23b2999f97a216e8b789c7e..19bbf006e579ef5997ae23c01decf28c0b0acb68 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid.js >@@ -1,42 +1,20 @@ >- > // NOTES: > // - the errors actually still need to be reviewed to check that they > // are fully correct interpretations of the IDLs > >-var wp = process.env.JSCOV ? require("../lib-cov/webidl2") : require("../lib/webidl2") >-, expect = require("expect") >-, pth = require("path") >-, fs = require("fs") >-; >-describe("Parses all of the invalid IDLs to check that they blow up correctly", function () { >- var dir = pth.join(__dirname, "invalid/idl") >- , skip = {} >- , idls = fs.readdirSync(dir) >- .filter(function (it) { return (/\.w?idl$/).test(it) && !skip[it]; }) >- .map(function (it) { return pth.join(dir, it); }) >- , errors = idls.map(function (it) { return pth.join(__dirname, "invalid", "json", pth.basename(it).replace(/\.w?idl/, ".json")); }) >- ; >+"use strict"; > >- for (var i = 0, n = idls.length; i < n; i++) { >- var idl = idls[i], error = JSON.parse(fs.readFileSync(errors[i], "utf8")); >- var func = (function (idl, err) { >- return function () { >- var error; >- try { >- var ast = wp.parse(fs.readFileSync(idl, "utf8")); >- console.log(JSON.stringify(ast, null, 4)); >- } >- catch (e) { >- error = e; >- } >- finally { >- expect(error).toExist(); >- expect(error.message).toEqual(err.message); >- expect(error.line).toEqual(err.line); >- } >+const { collect } = require("./util/collect"); >+const fs = require("fs"); >+const expect = require("expect"); > >- }; >- }(idl, error)); >- it("should produce the right error for " + idl, func); >- } >+describe("Parses all of the invalid IDLs to check that they blow up correctly", () => { >+ for (const test of collect("invalid", { expectError: true })) { >+ it(`should produce the right error for ${test.path}`, () => { >+ const err = test.readJSON(); >+ expect(test.error).toBeTruthy(); >+ expect(test.error.message).toEqual(err.message); >+ expect(test.error.line).toEqual(err.line); >+ }); >+ } > }); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/array.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/array.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..58a8618ab648579247a8cd00ac9dc4a585faf6b8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/array.widl >@@ -0,0 +1,6 @@ >+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >+// T[] is removed by https://github.com/heycam/webidl/commit/079cbb861a99e9e857a3f2a169c0beeb49cd020a >+[Constructor] >+interface LotteryResults { >+ readonly attribute unsigned short[][] numbers; >+}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/caller.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/caller.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..26fedc33f9402c651ebd15629a8fcb7212102120 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/caller.widl >@@ -0,0 +1,7 @@ >+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >+// legacycallers are removed by https://github.com/heycam/webidl/pull/412 >+ >+interface NumberQuadrupler { >+ // This operation simply returns four times the given number x. >+ legacycaller float compute(float x); >+}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/duplicate.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/duplicate.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..4916af34273d30dd7579a9be362c5f8deb65df36 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/duplicate.widl >@@ -0,0 +1,5 @@ >+typedef int Test; >+ >+interface Test { >+ void foo(); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..7f189eb62c1bd2b6d710532b8042a459d7ba1b1f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl >@@ -0,0 +1 @@ >+enum Empty {}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..ebc53065ededed62d27c87ae3b1b661874d3c715 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl >@@ -0,0 +1 @@ >+enum NoComma { "value1" "value2" }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/exception.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/exception.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..a0ea2e47e20833641440b095a9b2d2d02f4504b7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/exception.widl >@@ -0,0 +1,6 @@ >+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >+// IDL exceptions are removed by https://github.com/heycam/webidl/commit/50e172ec079db073c3724c9beac1b576fb5dbc47 >+ >+exception SomeException { >+}; >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..93c48c3ade5fa448cddd3399f0d41de56268f2af >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl >@@ -0,0 +1,2 @@ >+[Exposed=()] >+interface Unexposed {}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..d00121fd54f2f31903fb7592f5d6e438b697a4fb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl >@@ -0,0 +1 @@ >+interface _0 {}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..6666daed00c3e7d9b7f64970030a2d46a38e4967 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl >@@ -0,0 +1,4 @@ >+// This hits the unshifting of whitespace in the "implements" and >+// "includes" productions. If there is a bug in that whitespace >+// rollback, the wrong exception will be produced. >+foobar; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/iterator.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/iterator.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..3bf1b36dec675656cbfd7ea4603617b3db91bfc6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/iterator.widl >@@ -0,0 +1,35 @@ >+interface SessionManager { >+ Session getSessionForUser(DOMString username); >+ readonly attribute unsigned long sessionCount; >+ >+ Session iterator; >+}; >+ >+interface Session { >+ readonly attribute DOMString username; >+ // ... >+}; >+ >+interface SessionManager2 { >+ Session2 getSessionForUser(DOMString username); >+ readonly attribute unsigned long sessionCount; >+ >+ Session2 iterator = SessionIterator; >+}; >+ >+interface Session2 { >+ readonly attribute DOMString username; >+ // ... >+}; >+ >+interface SessionIterator { >+ readonly attribute unsigned long remainingSessions; >+}; >+ >+ interface NodeList { >+ Node iterator = NodeIterator; >+ }; >+ >+ interface NodeIterator { >+ Node iterator object; >+ }; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl >index 33c274b8b9a88605ed538b270ff6f5c7d0762016..efb5c14ffd626f7719277ee3892fce5fb664ec45 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl >@@ -1,3 +1,3 @@ > interface MapLikeOneType { >- maplike<long>; >+ maplike<long>; > } >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..e184133228458e91cff2cc88fcf3ee87fff92e3f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl >@@ -0,0 +1,3 @@ >+namespace CSS { >+ attribute object readwrite; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon-callback.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon-callback.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..cb2055718e5f044a671424532eee6afe577bebc2 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon-callback.widl >@@ -0,0 +1,7 @@ >+callback interface NoSemicolon { >+ attribute boolean noSemiColon; >+} >+ >+enum YouNeedOne { >+ "really" >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..10bc716249b3e1fa40faacb7298ee3b1f7b673bf >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon.widl >@@ -0,0 +1,7 @@ >+partial interface NoSemicolon { >+ attribute boolean noSemiColon; >+} >+ >+enum YouNeedOne { >+ "really" >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl >index 1deac5aeec90815102bf41fc437da2c962eaefac..6c875ff04b52312bc55f737347e9924c26847cd8 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl >@@ -1,5 +1,6 @@ > interface Foo {}; > > interface NonNullable { >- attribute Foo?? foo; >-}; >\ No newline at end of file >+ attribute Foo?? >+ foo; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..894d7c044b2a5b4e9d30427cd913df7b709bdfa5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl >@@ -0,0 +1,4 @@ >+interface X { >+ attribute Promise<void>? >+ promise; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-with-extended-attribute.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-with-extended-attribute.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..0ce171fec33e72d36168ad0d731c5199adb8b08e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-with-extended-attribute.widl >@@ -0,0 +1,3 @@ >+interface Foo { >+ Promise<[XAttr] DOMString> foo(any param); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl >index fc4ae2be908446e336cadd84c475cb7462b0b355..6057aa1feba64ebce61c9ec067f6250f036efa0e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl >@@ -1,3 +1,3 @@ > interface ReadonlyIterable { >- readonly iterable<long>; >+ readonly iterable<long>; > } >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-key-with-extended-attribute.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-key-with-extended-attribute.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..c11eb7414b0b8fcd9f2f6a1833bc764185b051fe >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-key-with-extended-attribute.widl >@@ -0,0 +1,3 @@ >+interface Foo { >+ void foo(record<[XAttr] DOMString, any> param); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..84db40282433b85f6a29cd236fdd51afe42c53a8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl >@@ -0,0 +1,3 @@ >+interface Foo { >+ void foo(record<DOMString> param); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl >index 1ecae22c0106cc9b8e5b30d6af3dfeeefb3dc22b..c2681bc75f1e8b38a2b83ce9ee5a262fbdcda762 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl >@@ -1,3 +1,3 @@ > interface SetLikeTwoTypes { >- setlike<long, long>; >+ setlike<long, long>; > } >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setter-creator.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setter-creator.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..a70b26774d722f99119b8e7ce975b11627338145 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setter-creator.widl >@@ -0,0 +1,4 @@ >+// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >+interface OrderedMap { >+ setter creator void set(DOMString name, any value); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..3d71222e54b5929062fc7b2080b99107e9f119c2 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl >@@ -0,0 +1,3 @@ >+interface X { >+ const float infinity = - Infinity; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..6d77e186d6670fd0351934db12be01f7d4aff01a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl >@@ -0,0 +1,3 @@ >+interface X { >+ void operation(object . . . args); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl >index bdfbfa709733f9faa6672ac3953b4673f283092f..dd0c1b18589979c4baba301a6e792bb1d1eca4e1 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl >@@ -1,5 +1,5 @@ > // Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >-// omittable is no longer a recognized keywoard as of 20110905 >+// omittable is no longer a recognized keyword as of 20110905 > interface Dictionary { > readonly attribute unsigned long propertyCount; > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stray-slash.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stray-slash.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..b673aa94b01d65a0b666879f8c899c86111c7ab4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stray-slash.widl >@@ -0,0 +1,2 @@ >+// This is a comment. >+/ This is not. >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.idl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.idl >deleted file mode 100644 >index 44fd3ff136ee5671637d02cb80964ddba092a658..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.idl >+++ /dev/null >@@ -1,3 +0,0 @@ >-interface Util { >- const DOMString hello = "world"; >-}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..44fd3ff136ee5671637d02cb80964ddba092a658 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.widl >@@ -0,0 +1,3 @@ >+interface Util { >+ const DOMString hello = "world"; >+}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl >index 106f30b8f72ec7df496302b4a03ddddb55bf7f19..dfd377bf932b98cceeeb69755e8eacfa38417ae0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl >@@ -19,4 +19,4 @@ > boolean allPointsWithinBounds(PointSequence ps); > }; > >- typedef [Clamp] octet value; >\ No newline at end of file >+ typedef [Clamp] octet value; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..0aa043e9aca9587dfb5c44ef96477b98d5215ed4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl >@@ -0,0 +1 @@ >+typedef (One or Two or) UnionOr; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..86ee96f516d63536a17bf1ef5cb8d178dc0ca326 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl >@@ -0,0 +1 @@ >+typedef (OnlyOne) UnionOne; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..177fc4c708f901c089983317b5dbce23941329b1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl >@@ -0,0 +1 @@ >+typedef () UnionZero; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..ee4a2db74a63bdef11d2920e6b698b7b4dc0f155 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl >@@ -0,0 +1,3 @@ >+interface FetchEvent : Event { >+ ResponsePromise<any> default(); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/w3c-import.log >index 6a3f4930a4eb7f3dbf3a4e17fd2aea3dc26d3550..f2ceb4df6ec7d56de91e80d85d8e3a429db03d5c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,18 +14,43 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/array.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/caller.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/dict-required-default.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/duplicate.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/enum.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/exception.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/iterator.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/maplike-1type.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/module.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon-callback.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/no-semicolon.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableany.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/promise-with-extended-attribute.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/raises.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/readonly-iterable.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-key-with-extended-attribute.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-key.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/scopedname.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/sequenceAsAttribute.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setlike-2types.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/setter-creator.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/special-omittable.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.idl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stray-slash.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/stringconstants.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/typedef-nested.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/array.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/array.json >new file mode 100644 >index 0000000000000000000000000000000000000000..898b2d836bff81330d734e0ba10372e9772fd523 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/array.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface LotteryResults`: No name in attribute", >+ "line": 5 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/caller.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/caller.json >new file mode 100644 >index 0000000000000000000000000000000000000000..567fa3368129f9b6d54bb3bb4c0f9d4d50186525 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/caller.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface NumberQuadrupler`: Invalid operation", >+ "line": 6 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json >index c5afeca85c05debc159481b3e8344aa87fd96da2..82b6b2ae42a6f61a20a32bcb67f44461ba7adae1 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json >@@ -1,4 +1,4 @@ > { >- "message": "Required member must not have a default" >+ "message": "Got an error during or right after parsing `dictionary Dict`: Required member must not have a default" > , "line": 4 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/duplicate.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/duplicate.json >new file mode 100644 >index 0000000000000000000000000000000000000000..e88a7156fe8c1c602ebe1ae8d66cbeebe69ff060 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/duplicate.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `typedef Test`: The name \"Test\" of type \"typedef\" is already seen", >+ "line": 3 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json >new file mode 100644 >index 0000000000000000000000000000000000000000..734bc67de1fd67e98c8c8d78bde45c62fb3201ed >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `enum Empty`: No value in enum", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json >new file mode 100644 >index 0000000000000000000000000000000000000000..bfd0b0951fce8d25739d2e18a027e7fc600d9b14 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `enum NoComma`: No comma between enum values", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum.json >index 166115801c3411b8faf7d3e9bccbe4a022a02b0e..073ff6c290cafdf614909b8f6ef27ba0a4c5829d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum.json >@@ -1,4 +1,4 @@ > { >- "message": "Unexpected value in enum" >+ "message": "Got an error during or right after parsing `enum foo`: Unexpected value in enum" > , "line": 1 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/exception.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/exception.json >new file mode 100644 >index 0000000000000000000000000000000000000000..ad9fac6ca2f64e7083421516a9ceb9e6397555ec >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/exception.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: Unrecognised tokens", >+ "line": 4 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json >new file mode 100644 >index 0000000000000000000000000000000000000000..4337f1e180c28881514845d54557819674a76418 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: Expected identifiers but not found", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json >new file mode 100644 >index 0000000000000000000000000000000000000000..419ed946fca05c2097ff3c2c48b91cb11e5a1b2a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: No name for interface", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json >new file mode 100644 >index 0000000000000000000000000000000000000000..ad9fac6ca2f64e7083421516a9ceb9e6397555ec >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: Unrecognised tokens", >+ "line": 4 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/iterator.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/iterator.json >new file mode 100644 >index 0000000000000000000000000000000000000000..e46d653ae3c51293d584045cdadd6c0a301206fe >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/iterator.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface SessionManager`: Invalid operation", >+ "line": 5 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json >index 859a820a4910cd1592dd52b31adebb013409f917..75e7a35ee256e91357994ff8a85b1828cb48112e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json >@@ -1,4 +1,4 @@ > { >- "message": "Missing second type argument in maplike declaration", >+ "message": "Got an error during or right after parsing `interface MapLikeOneType`: Missing second type argument in maplike declaration", > "line": 2 >-} >\ No newline at end of file >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/module.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/module.json >index 3b0984d973f45e32c56dd76d6d8b7fd6d8beb220..9c071cdd07a7a39ed18592e82100d8d50065a030 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/module.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/module.json >@@ -1,4 +1,4 @@ > { >- "message": "Unrecognised tokens" >+ "message": "Got an error before parsing any named definition: Unrecognised tokens" > , "line": 2 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json >new file mode 100644 >index 0000000000000000000000000000000000000000..d21215111f1ee27ae73df035349c576c64362a43 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `namespace CSS`: Attributes must be readonly in this context", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon-callback.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon-callback.json >new file mode 100644 >index 0000000000000000000000000000000000000000..1db9d14c8e2c51204a1e2a2d7d1e98c3066106ef >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon-callback.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `callback interface NoSemicolon`: Missing semicolon after interface", >+ "line": 5 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon.json >new file mode 100644 >index 0000000000000000000000000000000000000000..087532a012f59276976b70b1709e927c2ddd0797 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `partial interface NoSemicolon`: Missing semicolon after interface", >+ "line": 5 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json >index cf5229e8e44ab096ae16c22e0b0b04c392fcb28b..8a1f90046ae4d9df8c58bf17e0c2ed6bdc7c4fd0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json >@@ -1,4 +1,4 @@ > { >- "message": "Type any cannot be made nullable" >+ "message": "Got an error during or right after parsing `interface NonNullable`: Type any cannot be made nullable" > , "line": 2 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json >index 23cbb3e5d180f15a898743edbd7ec400a74b32f4..d470ec94a606c6caa01901d9724128d31111d216 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json >@@ -1,4 +1,4 @@ > { >- "message": "Can't nullable more than once" >-, "line": 4 >+ "message": "Got an error during or right after parsing `interface NonNullable`: Can't nullable more than once", >+ "line": 4 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json >new file mode 100644 >index 0000000000000000000000000000000000000000..ced51faf1be4df756b4bc987356ad88ada0f0038 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface X`: Promise type cannot be nullable", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-with-extended-attribute.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-with-extended-attribute.json >new file mode 100644 >index 0000000000000000000000000000000000000000..71212d46e3c011aed64cb6b6008a4a1b427d14bf >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-with-extended-attribute.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface Foo`: Promise type cannot have extended attribute", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/raises.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/raises.json >index 8b67afe4fc9702d3577aef8cf9f430662cd60119..3165b874f0c1891186b479b6460c0ae90a8533db 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/raises.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/raises.json >@@ -1,4 +1,4 @@ > { >- "message": "Unterminated attribute" >+ "message": "Got an error during or right after parsing `interface Person`: Unterminated attribute" > , "line": 5 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json >index c6f52a24615883eddf581aa15d215b426859c4cb..a571b22271b80e1f863fdba263603518a71899b3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json >@@ -1,4 +1,4 @@ > { >- "message": "Invalid operation", >+ "message": "Got an error during or right after parsing `interface ReadonlyIterable`: Missing return type", > "line": 2 >-} >\ No newline at end of file >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key-with-extended-attribute.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key-with-extended-attribute.json >new file mode 100644 >index 0000000000000000000000000000000000000000..4002e7fe0155d5bc2d615d55a4e4e976e13e38a8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key-with-extended-attribute.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface Foo`: Record key cannot have extended attribute", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json >index 3b929b926a30a7d0b776961ee5135fae3ae57265..6f1bb99be9080873adc0c7c685dca0d55c2b67ec 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json >@@ -1,4 +1,4 @@ > { >- "message": "Record key must be DOMString, USVString, or ByteString", >+ "message": "Got an error during or right after parsing `interface Foo`: Record key must be a string type", > "line": 2 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json >new file mode 100644 >index 0000000000000000000000000000000000000000..ece4fb2fee3c07c3aa6241e3c0cb6ed5477257db >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface Foo`: Missing comma after record key type", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json >index 8e2cd803287ef4fce3812c5ea55cfdc87c01e31f..4620d2df5fa0cc254a6d6cd3c6b75147c658b40a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json >@@ -1,4 +1,4 @@ > { >- "message": "No name in typedef" >+ "message": "Got an error before parsing any named definition: No name in typedef" > , "line": 2 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json >index b714f5d92434a2cc45630336b33d7645556c329c..5b4314a6de128dc602ae1dec4601a00f86c111bf 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json >@@ -1,4 +1,4 @@ > { >- "message": "Attributes cannot accept sequence types" >+ "message": "Got an error during or right after parsing `interface sequenceAsAttribute`: Attributes cannot accept sequence types" > , "line": 2 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json >index c9e49b6756d5d900a0c1b18a440e62b4811a1d3b..2900e1bac300742cec71ee8f66977bde9b9c60ac 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json >@@ -1,4 +1,4 @@ > { >- "message": "Unterminated setlike declaration", >+ "message": "Got an error during or right after parsing `interface SetLikeTwoTypes`: Unterminated setlike declaration", > "line": 2 >-} >\ No newline at end of file >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setter-creator.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setter-creator.json >new file mode 100644 >index 0000000000000000000000000000000000000000..25decb374e12fe27f05979e40d7f30647395be16 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setter-creator.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface OrderedMap`: Invalid operation", >+ "line": 3 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json >new file mode 100644 >index 0000000000000000000000000000000000000000..9e5d61804990bb8a99e1c863b2c73bb8eb5ee142 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface X`: No value for const", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json >new file mode 100644 >index 0000000000000000000000000000000000000000..0090abeeb71b23148a5d9ccd2a3bff927774ed5d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface X`: Unterminated operation", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json >index 7acb08834b0e6eaf0ece877b63466eadb42a5299..c20b28e03c17d6df29e2ca1b7ee948f579ff3f27 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json >@@ -1,4 +1,4 @@ > { >- "message": "Invalid operation" >+ "message": "Got an error during or right after parsing `interface Dictionary`: Invalid operation" > , "line": 6 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stray-slash.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stray-slash.json >new file mode 100644 >index 0000000000000000000000000000000000000000..9c071cdd07a7a39ed18592e82100d8d50065a030 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stray-slash.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: Unrecognised tokens" >+, "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json >index d5bf1a8832c664a02c488f70df005311d30b926a..745d6e6e08ba2238002d27bb5bc4a7e0c6c01bfa 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json >@@ -1,4 +1,4 @@ > { >- "message": "No value for const" >+ "message": "Got an error during or right after parsing `interface Util`: No type for const" > , "line": 2 > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json >index d7fb9182f86e9d3db758763f472e2ab056fcaf09..e1843cec7d93e4f7df588724a4fe3985ec53c48b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json >@@ -1,4 +1,4 @@ > { >- "message": "Invalid operation" >+ "message": "Got an error during or right after parsing `interface Widget`: Missing return type" > , "line": 14 >-} >\ No newline at end of file >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json >new file mode 100644 >index 0000000000000000000000000000000000000000..68dfd8b2ae60986b15ab06b4bd90c3a9a1f64d5b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json >new file mode 100644 >index 0000000000000000000000000000000000000000..476403d6889be7754ff7d2fa65edbe31b4bb4ea1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: At least two types are expected in a union type but found less", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json >new file mode 100644 >index 0000000000000000000000000000000000000000..68dfd8b2ae60986b15ab06b4bd90c3a9a1f64d5b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type", >+ "line": 1 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json >new file mode 100644 >index 0000000000000000000000000000000000000000..3703db3b2ab332bb1754e01f0e8dbe012a3f99d7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json >@@ -0,0 +1,4 @@ >+{ >+ "message": "Got an error during or right after parsing `interface FetchEvent`: Unsupported generic type ResponsePromise", >+ "line": 2 >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/w3c-import.log >index 7bc368eafaa544d2ea457f2748b2eeb4a509cec8..30181bf61575c8c9259cdd17111f5f7c597d992a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,18 +14,43 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/array.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/caller.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/dict-required-default.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/duplicate.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/enum.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/exception.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/iterator.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/maplike-1type.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/module.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon-callback.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/no-semicolon.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableany.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/promise-with-extended-attribute.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/raises.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key-with-extended-attribute.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/scopedname.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/sequenceAsAttribute.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setlike-2types.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/setter-creator.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/special-omittable.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stray-slash.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax.js >index 3b343e4229d5027d9fe081418d2d5fb47d49a8f5..05d647eda103945b0633bef0b53ee789268165d3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax.js >@@ -1,41 +1,19 @@ >+"use strict"; > >-var wp = process.env.JSCOV ? require("../lib-cov/webidl2") : require("../lib/webidl2") >-, expect = require("expect") >-, pth = require("path") >-, fs = require("fs") >-, jdp = require("jsondiffpatch") >-, debug = true >-; >-describe("Parses all of the IDLs to produce the correct ASTs", function () { >- var dir = pth.join(__dirname, "syntax/idl") >- , skip = {} // use if we have a broken test >- , idls = fs.readdirSync(dir) >- .filter(function (it) { return (/\.widl$/).test(it) && !skip[it]; }) >- .map(function (it) { return pth.join(dir, it); }) >- , jsons = idls.map(function (it) { return pth.join(__dirname, "syntax/json", pth.basename(it).replace(".widl", ".json")); }) >- ; >+const { collect } = require("./util/collect"); >+const expect = require("expect"); >+const debug = true; > >- for (var i = 0, n = idls.length; i < n; i++) { >- var idl = idls[i], json = jsons[i]; >- >- var func = (function (idl, json) { >- return function () { >- try { >- var optFile = pth.join(__dirname, "syntax/opt", pth.basename(json)); >- var opt = undefined; >- if (fs.existsSync(optFile)) >- opt = JSON.parse(fs.readFileSync(optFile, "utf8")); >- var diff = jdp.diff(JSON.parse(fs.readFileSync(json, "utf8")), >- wp.parse(fs.readFileSync(idl, "utf8"), opt)); >- if (diff && debug) console.log(JSON.stringify(diff, null, 4)); >- expect(diff).toBe(undefined); >- } >- catch (e) { >- console.log(e.toString()); >- throw e; >- } >- }; >- }(idl, json)); >- it("should produce the same AST for " + idl, func); >- } >+describe("Parses all of the IDLs to produce the correct ASTs", () => { >+ for (const test of collect("syntax")) { >+ it(`should produce the same AST for ${test.path}`, () => { >+ try { >+ expect(test.diff()).toBeFalsy(); >+ } >+ catch (e) { >+ console.log(e.toString()); >+ throw e; >+ } >+ }); >+ } > }); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/array.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/array.widl >deleted file mode 100644 >index 22e21fb6564738bd56830ce0300da389ce0574bf..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/array.widl >+++ /dev/null >@@ -1,5 +0,0 @@ >-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >-[Constructor] >-interface LotteryResults { >- readonly attribute unsigned short[][] numbers; >-}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl >index 7e1d691cbe28afdc58082a7fd81cbdb4f37cf456..f665c1fc47276f700dabab71f869c0b0ead28163 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl >@@ -1,9 +1,4 @@ > // Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >-exception InvalidName { >- DOMString reason; >-}; >- >-exception NoSuchPet { }; > > interface Person { > >@@ -11,4 +6,6 @@ interface Person { > // short can take. > attribute unsigned short age; > >-}; >\ No newline at end of file >+ // required is an allowed attribute name >+ attribute any required; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/caller.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/caller.widl >deleted file mode 100644 >index 92acb1c017631f04762f8d68e0462e10d3739dad..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/caller.widl >+++ /dev/null >@@ -1,5 +0,0 @@ >-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >-interface NumberQuadrupler { >- // This operation simply returns four times the given number x. >- legacycaller float compute(float x); >-}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl >index 5e28ae9c116a9d9262ea9e59e5b95350a1ce613f..043b022b6462eed600c8a9ceab87d1ebaef5ea18 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl >@@ -8,11 +8,4 @@ interface Util { > const unrestricted float sobig = Infinity; > const unrestricted double minusonedividedbyzero = -Infinity; > const short notanumber = NaN; >-}; >- >-exception Error { >- const short ERR_UNKNOWN = 0; >- const short ERR_OUT_OF_MEMORY = 1; >- >- short errorCode; > }; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl >index 6b3e0eda284ad71f7b3ad6221a15214d4fc0fc23..6ffeb3c20a1a47209ceb2ec2441f62be3f553158 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl >@@ -7,7 +7,7 @@ interface Dictionary { > }; > > >-interface Dictionary { >+interface Dictionary2 { > readonly attribute unsigned long propertyCount; > > float getProperty(DOMString propertyName); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception-inheritance.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception-inheritance.widl >deleted file mode 100644 >index 258fdeba6f43d36a2a8d7927b695d53a5cc5d2e3..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception-inheritance.widl >+++ /dev/null >@@ -1,7 +0,0 @@ >-// from http://lists.w3.org/Archives/Public/public-script-coord/2010OctDec/0112.html >- exception DOMException { >- unsigned short code; >- }; >- >- exception HierarchyRequestError : DOMException { }; >- exception NoModificationAllowedError : DOMException { }; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception.widl >deleted file mode 100644 >index f4b6ae29e10ddb18ffa5fc2b6201f923cb1ad50d..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception.widl >+++ /dev/null >@@ -1,8 +0,0 @@ >-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 >-interface Dahut { >- attribute DOMString type; >-}; >- >-exception SomeException { >-}; >- >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl >index c1df79e142d54dbf9bd4c3c298b0c270e679ffc2..57d4f97de7c3176b65e3da2aa7ed53d3db789fd9 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl >@@ -2,10 +2,28 @@ > > [Global=(Worker,ServiceWorker), Exposed=ServiceWorker] > interface ServiceWorkerGlobalScope : WorkerGlobalScope { >- >+ > }; > > // Conformance with ExtendedAttributeList grammar in http://www.w3.org/TR/WebIDL/#idl-extended-attributes > // Section 3.11 > [IntAttr=0, FloatAttr=3.14, StringAttr="abc"] > interface IdInterface {}; >+ >+// Extracted from http://www.w3.org/TR/2016/REC-WebIDL-1-20161215/#Constructor on 2017-5-18 with whitespace differences >+[ >+ Constructor, >+ Constructor(double radius) >+] >+interface Circle { >+ attribute double r; >+ attribute double cx; >+ attribute double cy; >+ readonly attribute double circumference; >+}; >+ >+// Extracted from https://heycam.github.io/webidl/#idl-annotated-types on 2017-12-15 >+[Exposed=Window] >+interface I { >+ attribute [XAttr] (long or Node) attrib; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl >index 02b64572a426abc69e4247563eb1d4797aec321e..693cd324e96b85dbb4ff25d2c9d8dd1edbf495b3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl >@@ -1,17 +1,17 @@ > interface Foo { >- Promise<ResponsePromise<sequence<DOMString?>>> bar(); >- readonly attribute Promise<DOMString>[] baz; >+ Promise<Promise<sequence<DOMString?>>> bar(); >+ readonly attribute Promise<DOMString> baz; > }; > > // Extracted from https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ on 2014-05-08 > > interface ServiceWorkerClients { >- Promise<Client[]?> getServiced(); >+ Promise<Client?> getServiced(); > Promise<any> reloadAll(); > }; > > // Extracted from https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ on 2014-05-13 > > interface FetchEvent : Event { >- ResponsePromise<any> default(); >+ Promise<any> default(); > }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl >index 33893d4c64498240b5cb84f19081dbd6f90e0d2a..c39f84b45a36cccd360a861b118c3723aeb3ef2d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl >@@ -3,18 +3,6 @@ > // Qualified name: "::framework::number" > typedef float number; > >- // Exception identifier: "FrameworkException" >- // Qualified name: "::framework::FrameworkException" >- exception FrameworkException { >- >- // Constant identifier: "ERR_NOT_FOUND" >- // Qualified name: "::framework::FrameworkException::ERR_NOT_FOUND" >- const long ERR_NOT_FOUND = 1; >- >- // Exception field identifier: "code" >- long code; >- }; >- > // Interface identifier: "System" > // Qualified name: "::framework::System" > interface System { >@@ -27,7 +15,7 @@ > getter DOMString (DOMString keyName); > }; > >- >+ > // Interface identifier: "TextField" > // Qualified name: "::framework::gui::TextField" > interface TextField { >@@ -39,6 +27,7 @@ > attribute DOMString? _value; > }; > >-interface Foo { >- void op(object interface); >-}; >\ No newline at end of file >+interface FooEventTarget { >+ // Argument names allow some selected keywords >+ void addEventListener(EventListener? callback); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/indexed-properties.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/indexed-properties.widl >index acf0ed3bf849f06b2fc1d375cb3a82488b3bd050..4b8aa9e353fac89c05ad21fe065b455e049268e3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/indexed-properties.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/indexed-properties.widl >@@ -7,6 +7,6 @@ interface OrderedMap { > deleter void removeByIndex(unsigned long index); > > getter any get(DOMString name); >- setter creator void set(DOMString name, any value); >+ setter void set(DOMString name, any value); > deleter void remove(DOMString name); >-}; >\ No newline at end of file >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl >index 558e8116494b2b3b5cf0ab5bc4f3c9f384aa906b..435b3ab3c8cd5877a1c096504f953dd287a8acfc 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl >@@ -13,4 +13,10 @@ interface Person : Animal { > // Its getter behavior is inherited from Animal, and need not be specified > // the description of Person. > inherit attribute DOMString name; >-}; >\ No newline at end of file >+}; >+ >+interface Ghost : Person { >+ >+ // An attribute that only inherits the getter behavior >+ inherit readonly attribute DOMString name; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl >index c7dfafa4daa808a225a1678ba52f350555de93c6..7f726f926fdecd72600c43e328f1e0bfb36f9be1 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl >@@ -1,7 +1,11 @@ > interface IterableOne { >- iterable<long>; >+ iterable<long>; > }; > > interface IterableTwo { >- iterable<short, double?>; >+ iterable<short, double?>; >+}; >+ >+interface IterableThree { >+ iterable<[XAttr] long>; > }; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterator.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterator.widl >deleted file mode 100644 >index 3bf1b36dec675656cbfd7ea4603617b3db91bfc6..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterator.widl >+++ /dev/null >@@ -1,35 +0,0 @@ >-interface SessionManager { >- Session getSessionForUser(DOMString username); >- readonly attribute unsigned long sessionCount; >- >- Session iterator; >-}; >- >-interface Session { >- readonly attribute DOMString username; >- // ... >-}; >- >-interface SessionManager2 { >- Session2 getSessionForUser(DOMString username); >- readonly attribute unsigned long sessionCount; >- >- Session2 iterator = SessionIterator; >-}; >- >-interface Session2 { >- readonly attribute DOMString username; >- // ... >-}; >- >-interface SessionIterator { >- readonly attribute unsigned long remainingSessions; >-}; >- >- interface NodeList { >- Node iterator = NodeIterator; >- }; >- >- interface NodeIterator { >- Node iterator object; >- }; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl >index eafa7cf0445947efee5d58bc1ff77376d166d8f0..9e1e9c527447a2bb2013baf28c31d3faddcac6ff 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl >@@ -1,3 +1,3 @@ > interface LegacyIterable { >- legacyiterable<long>; >+ legacyiterable<long>; > }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl >index 7b79b3888026a7693be7e46e10187290ebe2b1b4..437e381fef7673ecacc52362b5a30910c68156cd 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl >@@ -1,7 +1,13 @@ > interface MapLike { >- maplike<long, float>; >+ maplike<long, float>; > }; > > interface ReadOnlyMapLike { >- readonly maplike<long, float>; >+ readonly maplike<long, float>; >+}; >+ >+// Extracted from https://heycam.github.io/webidl/#idl-type-extended-attribute-associated-with on 2017-07-01 >+ >+interface I { >+ maplike<[XAttr2] DOMString, [XAttr3] long>; > }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/mixin.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/mixin.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..7c37a6ee4207b31ddd2c48f9e1725721679e79e2 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/mixin.widl >@@ -0,0 +1,12 @@ >+// Extracted from https://heycam.github.io/webidl/#using-mixins-and-partials on 2017-11-02 >+ >+interface mixin GlobalCrypto { >+ readonly attribute Crypto crypto; >+}; >+ >+Window includes GlobalCrypto; >+WorkerGlobalScope includes GlobalCrypto; >+ >+partial interface mixin WindowOrWorkerGlobalScope { >+ readonly attribute Crypto crypto; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/overloading.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/overloading.widl >index ef1288a887763dd78947de6b8786c00539474e97..52d8d15c1a13c81397bff5981d5745d9e42ea92d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/overloading.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/overloading.widl >@@ -12,9 +12,9 @@ interface C { > void f(B x); > }; > >-interface A { >+interface D { > /* f1 */ void f(DOMString a); > /* f2 */ void f([AllowAny] DOMString a, DOMString b, float... c); > /* f3 */ void f(); > /* f4 */ void f(long a, DOMString b, optional DOMString c, float... d); >-}; >\ No newline at end of file >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl >index 92939601a1a839cf7c48c3ed748eeb93bfa3febc..a91455ee192f192187e23728c78eaa6fda8d733f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl >@@ -9,11 +9,11 @@ interface Primitives { > attribute long long bigbig; > attribute unsigned long long bigbigpositive; > attribute float real; >- attribute double bigreal; >+ attribute double bigreal; > attribute unrestricted float realwithinfinity; >- attribute unrestricted double bigrealwithinfinity; >- attribute DOMString string; >- attribute ByteString bytes; >+ attribute unrestricted double bigrealwithinfinity; >+ attribute DOMString string; >+ attribute ByteString bytes; > attribute Date date; > attribute RegExp regexp; >-}; >\ No newline at end of file >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..c4eac3b75c46ac02a22c7682056cb32b5ecb4d89 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl >@@ -0,0 +1,3 @@ >+interface Cat { >+ attribute Promise<void> meow; >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl >index 6cdedb219bece6da8fdc98c739d341b599f71c99..dbfad3afbfeb6875725c977be301476292e48f41 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl >@@ -2,7 +2,8 @@ > interface Foo { > void foo(sequence<record<ByteString, any>> param); > record<DOMString, (float or DOMString)?> bar(); >+}; > >- // Make sure record can still be registered as a type. >- record baz(); >+interface Bar { >+ record<DOMString, [XAttr] float> bar(); > }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl >index 13997cb1d121ce106f49cfdcdeb9789074704842..338c8d427636fb340a00db9ec9b1ac51cfe15388 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl >@@ -4,8 +4,6 @@ interface Dimensions { > attribute unsigned long height; > }; > >-exception NoPointerDevice { }; >- > interface Button { > > // An operation that takes no arguments, returns a boolean >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl >index 6ba0d390d251a7df21c785d3c4b100ef23717cbe..b47c98225c71568e933139a902517bcf860a20e9 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl >@@ -6,7 +6,8 @@ interface Canvas { > // ... > }; > >-// Make sure sequence can still be registered as a type. >-interface Foo { >- sequence bar(); >-}; >\ No newline at end of file >+// Extracted from https://heycam.github.io/webidl/#idl-type-extended-attribute-associated-with on 2017-07-01 >+ >+interface I { >+ void f1(sequence<[XAttr] long> arg); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/serializer.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/serializer.widl >deleted file mode 100644 >index 6f6ccd0e8d59e3e057f5ad0d2f65530b16a39359..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/serializer.widl >+++ /dev/null >@@ -1,64 +0,0 @@ >-interface Transaction { >- readonly attribute Account from; >- readonly attribute Account to; >- readonly attribute float amount; >- readonly attribute DOMString description; >- readonly attribute unsigned long number; >- >- serializer; >-}; >- >-interface Account { >- attribute DOMString name; >- attribute unsigned long number; >- serializer DOMString serialize(); >-}; >- >-interface Transaction2 { >- readonly attribute Account2 from; >- readonly attribute Account2 to; >- readonly attribute float amount; >- readonly attribute DOMString description; >- readonly attribute unsigned long number; >- >- serializer = { from, to, amount, description }; >-}; >- >-interface Account2 { >- attribute DOMString name; >- attribute unsigned long number; >- serializer = number; >-}; >- >-interface Account3 { >- attribute DOMString name; >- attribute unsigned long number; >- >- serializer = { attribute }; >-}; >- >-interface Account4 { >- getter object getItem(unsigned long index); >- serializer = { getter }; >-}; >- >-interface Account5 : Account { >- attribute DOMString secondname; >- serializer = { inherit, secondname }; >-}; >- >-interface Account6 : Account { >- attribute DOMString secondname; >- serializer = { inherit, attribute }; >-}; >- >-interface Account7 { >- attribute DOMString name; >- attribute unsigned long number; >- serializer = [ name, number ]; >-}; >- >-interface Account8 { >- getter object getItem(unsigned long index); >- serializer = [ getter ]; >-}; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl >index 890e8e5a7597dde08c2fa7cb95461baddde69bba..4512f286b59a506fcbb957befe24a081b097d73e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl >@@ -1,7 +1,11 @@ > interface SetLike { >- setlike<long>; >+ setlike<long>; > }; > > interface ReadOnlySetLike { >- readonly setlike<long>; >+ readonly setlike<long>; >+}; >+ >+interface SetLikeExt { >+ setlike<[XAttr] long>; > }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl >index 4eb483d9b53861a104f712d942af3b10566023c5..c45277ea8db3377952b4bfa8a040aadb1d1c340e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl >@@ -3,6 +3,6 @@ interface A { > stringifier DOMString (); > }; > >-interface A { >+interface B { > stringifier; > }; >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.idl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.idl >deleted file mode 100644 >index 3048703e0c5541d5ca69f51870f219abf3745b44..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.idl >+++ /dev/null >@@ -1,4 +0,0 @@ >- typedef (ImageData or >- HTMLImageElement or >- HTMLCanvasElement or >- HTMLVideoElement) TexImageSource; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.widl >new file mode 100644 >index 0000000000000000000000000000000000000000..3048703e0c5541d5ca69f51870f219abf3745b44 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.widl >@@ -0,0 +1,4 @@ >+ typedef (ImageData or >+ HTMLImageElement or >+ HTMLCanvasElement or >+ HTMLVideoElement) TexImageSource; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl >index 95e31c1690236ce77703c9a3ca03e88e5ba1fc06..beaaa8726009e6b1a3ffe3aafd5f89bf7cafe4bb 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl >@@ -1,3 +1,3 @@ > interface Suffixes { >- void test(sequence<DOMString[]?>? foo); >+ void test(sequence<DOMString?>? foo); > }; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/w3c-import.log >index e800709d6a2170f8246bf8c84930b90e5d582eb4..42d1d760df0f5fe2c90ecbf9f298d98982a05a9e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -15,10 +15,8 @@ None > ------------------------------------------------------------------------ > List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/allowany.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/array.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/callback.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/caller.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/constants.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/constructor.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/dictionary-inherits.widl >@@ -27,8 +25,6 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/documentation.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/enum.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/equivalent-decl.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception-inheritance.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/exception.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/extended-attributes.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/getter-setter.widl >@@ -38,9 +34,9 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/interface-inherits.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterable.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/iterator.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/legacyiterable.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/maplike.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/mixin.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/namedconstructor.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/namespace.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/nointerfaceobject.widl >@@ -51,13 +47,13 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/overridebuiltins.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/partial-interface.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/primitives.widl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/prototyperoot.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/putforwards.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/reg-operations.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/replaceable.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/serializer.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/setlike.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/static.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/stringifier-attribute.widl >@@ -65,7 +61,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/stringifier.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/treatasnull.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/treatasundefined.widl >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.idl >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef-union.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typedef.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/typesuffixes.widl > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/idl/uniontype.widl >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json >index 8abc7f9e09248acbe909c32eb007b10e75987339..2a93518ed9463776d3e7397074655a2aa9526af7 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json >@@ -8,20 +8,19 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "g", >+ "escapedName": "g", > "arguments": [], > "extAttrs": [] > }, >@@ -29,34 +28,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "g", >+ "escapedName": "g", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "B" >+ "idlType": "B", >+ "extAttrs": [] > }, >- "name": "b" >+ "name": "b", >+ "escapedName": "b" > } > ], > "extAttrs": [] >@@ -65,39 +65,42 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "g", >+ "escapedName": "g", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [ > { > "name": "AllowAny", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "s" >+ "name": "s", >+ "escapedName": "s" > } > ], > "extAttrs": [] >@@ -106,4 +109,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/array.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/array.json >deleted file mode 100644 >index 39afaf6c8eb20192e60be96b962d2d641cf3998e..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/array.json >+++ /dev/null >@@ -1,34 +0,0 @@ >-[ >- { >- "type": "interface", >- "name": "LotteryResults", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": 2, >- "nullableArray": [false, false], >- "union": false, >- "idlType": "unsigned short" >- }, >- "name": "numbers", >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [ >- { >- "name": "Constructor", >- "arguments": null >- } >- ] >- } >-] >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json >index cdf46b0ecc20f4d4326e7fb9ad8e0384ac9dcb0e..f02cb2187a2af2d95d92135893ecdb97f91ba611 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json >@@ -1,37 +1,27 @@ > [ > { >- "type": "exception", >- "name": "InvalidName", >+ "type": "interface", >+ "name": "Person", >+ "partial": false, > "members": [ > { >- "type": "field", >- "name": "reason", >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "unsigned short", >+ "extAttrs": [] > }, >+ "name": "age", >+ "escapedName": "age", > "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "exception", >- "name": "NoSuchPet", >- "members": [], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Person", >- "partial": false, >- "members": [ >+ }, > { > "type": "attribute", > "static": false, >@@ -39,18 +29,19 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned short" >+ "idlType": "any", >+ "extAttrs": [] > }, >- "name": "age", >+ "name": "required", >+ "escapedName": "required", > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/callback.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/callback.json >index 43a517510467c6666e69356b1f540b5da0f89f4c..89d63aae53d02a5f51dfcae4137fd3b9b1fe2c1d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/callback.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/callback.json >@@ -3,27 +3,29 @@ > "type": "callback", > "name": "AsyncOperationCallback", > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "status" >+ "name": "status", >+ "escapedName": "status" > } > ], > "extAttrs": [] >@@ -37,34 +39,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "eventOccurred", >+ "escapedName": "eventOccurred", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "details" >+ "name": "details", >+ "escapedName": "details" > } > ], > "extAttrs": [] >@@ -77,43 +80,47 @@ > "type": "callback", > "name": "SortCallback", > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, >- "name": "a" >+ "name": "a", >+ "escapedName": "a" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, >- "name": "b" >+ "name": "b", >+ "escapedName": "b" > } > ], > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/caller.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/caller.json >deleted file mode 100644 >index a0fb5e396a5a0e87721609c16e0e98eeaf362001..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/caller.json >+++ /dev/null >@@ -1,47 +0,0 @@ >-[ >- { >- "type": "interface", >- "name": "NumberQuadrupler", >- "partial": false, >- "members": [ >- { >- "type": "operation", >- "getter": false, >- "setter": false, >- "creator": false, >- "deleter": false, >- "legacycaller": true, >- "static": false, >- "stringifier": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "float" >- }, >- "name": "compute", >- "arguments": [ >- { >- "optional": false, >- "variadic": false, >- "extAttrs": [], >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "float" >- }, >- "name": "x" >- } >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- } >-] >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constants.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constants.json >index 0fe6e92afc3a23571522d5a526c9f81ba538a74b..ef2b8c44ca167cf6eb866febb850062f2f456a75 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constants.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constants.json >@@ -7,7 +7,14 @@ > { > "type": "const", > "nullable": false, >- "idlType": "boolean", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "boolean", >+ "extAttrs": [] >+ }, > "name": "DEBUG", > "value": { > "type": "boolean", >@@ -18,51 +25,86 @@ > { > "type": "const", > "nullable": false, >- "idlType": "short", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "short", >+ "extAttrs": [] >+ }, > "name": "negative", > "value": { > "type": "number", >- "value": -1 >+ "value": "-1" > }, > "extAttrs": [] > }, > { > "type": "const", > "nullable": false, >- "idlType": "octet", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "octet", >+ "extAttrs": [] >+ }, > "name": "LF", > "value": { > "type": "number", >- "value": 10 >+ "value": "10" > }, > "extAttrs": [] > }, > { > "type": "const", > "nullable": false, >- "idlType": "unsigned long", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "unsigned long", >+ "extAttrs": [] >+ }, > "name": "BIT_MASK", > "value": { > "type": "number", >- "value": 64512 >+ "value": "0x0000fc00" > }, > "extAttrs": [] > }, > { > "type": "const", > "nullable": false, >- "idlType": "float", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "float", >+ "extAttrs": [] >+ }, > "name": "AVOGADRO", > "value": { > "type": "number", >- "value": 6.022e+23 >+ "value": "6.022e23" > }, > "extAttrs": [] > }, > { > "type": "const", > "nullable": false, >- "idlType": "unrestricted float", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "unrestricted float", >+ "extAttrs": [] >+ }, > "name": "sobig", > "value": { > "type": "Infinity", >@@ -73,7 +115,14 @@ > { > "type": "const", > "nullable": false, >- "idlType": "unrestricted double", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "unrestricted double", >+ "extAttrs": [] >+ }, > "name": "minusonedividedbyzero", > "value": { > "type": "Infinity", >@@ -84,53 +133,17 @@ > { > "type": "const", > "nullable": false, >- "idlType": "short", >- "name": "notanumber", >- "value": { >- "type": "NaN" >- }, >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "exception", >- "name": "Error", >- "members": [ >- { >- "type": "const", >- "nullable": false, >- "idlType": "short", >- "name": "ERR_UNKNOWN", >- "value": { >- "type": "number", >- "value": 0 >- }, >- "extAttrs": [] >- }, >- { >- "type": "const", >- "nullable": false, >- "idlType": "short", >- "name": "ERR_OUT_OF_MEMORY", >- "value": { >- "type": "number", >- "value": 1 >- }, >- "extAttrs": [] >- }, >- { >- "type": "field", >- "name": "errorCode", > "idlType": { >- "sequence": false, >+ "type": "const-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "short" >+ "idlType": "short", >+ "extAttrs": [] >+ }, >+ "name": "notanumber", >+ "value": { >+ "type": "NaN" > }, > "extAttrs": [] > } >@@ -138,4 +151,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json >index e5944f32ee8671b13f86bed7b76a2a4d6c28bae8..efdd1b5a6bedc626b483a06d92260e57e37aceee 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "r", >+ "escapedName": "r", > "extAttrs": [] > }, > { >@@ -28,14 +29,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "cx", >+ "escapedName": "cx", > "extAttrs": [] > }, > { >@@ -45,14 +47,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "cy", >+ "escapedName": "cy", > "extAttrs": [] > }, > { >@@ -62,14 +65,15 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "circumference", >+ "escapedName": "circumference", > "extAttrs": [] > } > ], >@@ -77,7 +81,9 @@ > "extAttrs": [ > { > "name": "Constructor", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > }, > { > "name": "Constructor", >@@ -85,19 +91,23 @@ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "radius" >+ "name": "radius", >+ "escapedName": "radius" > } >- ] >+ ], >+ "type": "extended-attribute", >+ "rhs": null > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json >index fbb2338a8df82cfa5beac24ab29e5fab73673525..595c35cf79748ac535a04d564bc8fe6377b5d728 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json >@@ -7,14 +7,15 @@ > { > "type": "field", > "name": "fillPattern", >+ "escapedName": "fillPattern", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "extAttrs": [], > "default": { >@@ -25,14 +26,15 @@ > { > "type": "field", > "name": "strokePattern", >+ "escapedName": "strokePattern", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "extAttrs": [], > "default": { >@@ -42,16 +44,18 @@ > { > "type": "field", > "name": "position", >+ "escapedName": "position", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >+ "idlType": "Point", >+ "extAttrs": [] > }, >- "extAttrs": [] >+ "extAttrs": [], >+ "default": null > } > ], > "inheritance": null, >@@ -65,19 +69,21 @@ > { > "type": "field", > "name": "hydrometry", >+ "escapedName": "hydrometry", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "extAttrs": [] >+ "extAttrs": [], >+ "default": null > } > ], > "inheritance": "PaintOptions", > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json >index a7c89caab23a3f88d748cbd91f497e788ad9c6bc..8bbc6b9dfabb4e55c309ff2ee31042823dcf963c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json >@@ -7,14 +7,15 @@ > { > "type": "field", > "name": "fillPattern", >+ "escapedName": "fillPattern", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "extAttrs": [], > "default": { >@@ -25,14 +26,15 @@ > { > "type": "field", > "name": "strokePattern", >+ "escapedName": "strokePattern", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "extAttrs": [], > "default": { >@@ -42,35 +44,38 @@ > { > "type": "field", > "name": "position", >+ "escapedName": "position", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >+ "idlType": "Point", >+ "extAttrs": [] > }, >- "extAttrs": [] >+ "extAttrs": [], >+ "default": null > }, > { > "type": "field", > "name": "seq", >+ "escapedName": "seq", > "required": false, > "idlType": { >- "sequence": true, >+ "type": "dictionary-type", > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >- } >+ "idlType": "long", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "extAttrs": [], > "default": { >@@ -81,16 +86,18 @@ > { > "type": "field", > "name": "reqSeq", >+ "escapedName": "reqSeq", > "required": true, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, >- "extAttrs": [] >+ "extAttrs": [], >+ "default": null > } > ], > "inheritance": null, >@@ -104,32 +111,36 @@ > { > "type": "field", > "name": "h", >+ "escapedName": "h", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, >- "extAttrs": [] >+ "extAttrs": [], >+ "default": null > }, > { > "type": "field", > "name": "d", >+ "escapedName": "d", > "required": false, > "idlType": { >- "sequence": false, >+ "type": "dictionary-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, >- "extAttrs": [] >+ "extAttrs": [], >+ "default": null > } > ], > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation-dos.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation-dos.json >index 340e039b4495d7c93522046a4408ce5fad3e1da7..baa0b5a09b5ee17b95bcdd42dba4faba25cd3733 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation-dos.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation-dos.json >@@ -7,4 +7,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation.json >index 340e039b4495d7c93522046a4408ce5fad3e1da7..baa0b5a09b5ee17b95bcdd42dba4faba25cd3733 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/documentation.json >@@ -7,4 +7,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/enum.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/enum.json >index 196ee4e6405f27e19afeaca160c5c90afa78e54d..11f5d09f54b62b9eb14b5adae15822263d0ce738 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/enum.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/enum.json >@@ -3,9 +3,18 @@ > "type": "enum", > "name": "MealType", > "values": [ >- "rice", >- "noodles", >- "other" >+ { >+ "type": "string", >+ "value": "rice" >+ }, >+ { >+ "type": "string", >+ "value": "noodles" >+ }, >+ { >+ "type": "string", >+ "value": "other" >+ } > ], > "extAttrs": [] > }, >@@ -21,14 +30,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "MealType" >+ "idlType": "MealType", >+ "extAttrs": [] > }, > "name": "type", >+ "escapedName": "type", > "extAttrs": [] > }, > { >@@ -38,62 +48,66 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "size", >+ "escapedName": "size", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "initialize", >+ "escapedName": "initialize", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "MealType" >+ "idlType": "MealType", >+ "extAttrs": [] > }, >- "name": "type" >+ "name": "type", >+ "escapedName": "type" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "size" >+ "name": "size", >+ "escapedName": "size" > } > ], > "extAttrs": [] >@@ -106,10 +120,19 @@ > "type": "enum", > "name": "AltMealType", > "values": [ >- "rice", >- "noodles", >- "other" >+ { >+ "type": "string", >+ "value": "rice" >+ }, >+ { >+ "type": "string", >+ "value": "noodles" >+ }, >+ { >+ "type": "string", >+ "value": "other" >+ } > ], > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json >index 55a787fdcf08aa928188790abec2d236863dd53b..ee079a77790531666d214b67b58ea0d9f89e2f28 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json >@@ -11,48 +11,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "propertyCount", >+ "escapedName": "propertyCount", > "extAttrs": [] > }, > { > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "getProperty", >+ "escapedName": "getProperty", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > } > ], > "extAttrs": [] >@@ -61,48 +63,51 @@ > "type": "operation", > "getter": false, > "setter": true, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "setProperty", >+ "escapedName": "setProperty", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "propertyValue" >+ "name": "propertyValue", >+ "escapedName": "propertyValue" > } > ], > "extAttrs": [] >@@ -113,7 +118,7 @@ > }, > { > "type": "interface", >- "name": "Dictionary", >+ "name": "Dictionary2", > "partial": false, > "members": [ > { >@@ -123,48 +128,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "propertyCount", >+ "escapedName": "propertyCount", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "getProperty", >+ "escapedName": "getProperty", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > } > ], > "extAttrs": [] >@@ -173,48 +180,51 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "setProperty", >+ "escapedName": "setProperty", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "propertyValue" >+ "name": "propertyValue", >+ "escapedName": "propertyValue" > } > ], > "extAttrs": [] >@@ -223,34 +233,35 @@ > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > } > ], > "extAttrs": [] >@@ -259,48 +270,51 @@ > "type": "operation", > "getter": false, > "setter": true, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "propertyValue" >+ "name": "propertyValue", >+ "escapedName": "propertyValue" > } > ], > "extAttrs": [] >@@ -309,4 +323,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json >index f4dc68699a6d5d3d0fe83364764c92563d2d1a43..4a76b98285697e39b3b7a284bb20e8fa0a72c1ab 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json >@@ -10,7 +10,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "unsigned short" > }, >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception.json >deleted file mode 100644 >index 3f16de828ac8927be5a8d8dd5218c436c57bd266..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception.json >+++ /dev/null >@@ -1,35 +0,0 @@ >-[ >- { >- "type": "interface", >- "name": "Dahut", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "type", >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "exception", >- "name": "SomeException", >- "members": [], >- "inheritance": null, >- "extAttrs": [] >- } >-] >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json >index 3b5a3b2e22b31a9ddb322c07cfbd389df360a66b..25f56f0340ac8736b048fc2c48de87c2b37c6bd4 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json >@@ -9,6 +9,7 @@ > { > "name": "Global", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier-list", > "value": [ >@@ -20,6 +21,7 @@ > { > "name": "Exposed", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "ServiceWorker" >@@ -28,36 +30,211 @@ > ] > }, > { >- "type": "interface", >- "name": "IdInterface", >- "partial": false, >- "members": [], >- "inheritance": null, >- "extAttrs": [ >- { >- "name": "IntAttr", >- "arguments": null, >- "rhs": { >- "type": "integer", >- "value": "0" >- } >- }, >- { >- "name": "FloatAttr", >- "arguments": null, >- "rhs": { >- "type": "float", >- "value": "3.14" >- } >- }, >- { >- "name": "StringAttr", >- "arguments": null, >- "rhs": { >- "type": "string", >- "value": "\"abc\"" >- } >- } >- ] >+ "type": "interface", >+ "name": "IdInterface", >+ "partial": false, >+ "members": [], >+ "inheritance": null, >+ "extAttrs": [ >+ { >+ "name": "IntAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": { >+ "type": "integer", >+ "value": "0" >+ } >+ }, >+ { >+ "name": "FloatAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": { >+ "type": "float", >+ "value": "3.14" >+ } >+ }, >+ { >+ "name": "StringAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": { >+ "type": "string", >+ "value": "\"abc\"" >+ } >+ } >+ ] >+ }, >+ { >+ "type": "interface", >+ "name": "Circle", >+ "partial": false, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "double", >+ "extAttrs": [] >+ }, >+ "name": "r", >+ "escapedName": "r", >+ "extAttrs": [] >+ }, >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "double", >+ "extAttrs": [] >+ }, >+ "name": "cx", >+ "escapedName": "cx", >+ "extAttrs": [] >+ }, >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "double", >+ "extAttrs": [] >+ }, >+ "name": "cy", >+ "escapedName": "cy", >+ "extAttrs": [] >+ }, >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": true, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "double", >+ "extAttrs": [] >+ }, >+ "name": "circumference", >+ "escapedName": "circumference", >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [ >+ { >+ "name": "Constructor", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ }, >+ { >+ "name": "Constructor", >+ "arguments": [ >+ { >+ "optional": false, >+ "variadic": false, >+ "default": null, >+ "extAttrs": [], >+ "idlType": { >+ "type": "argument-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "double", >+ "extAttrs": [] >+ }, >+ "name": "radius", >+ "escapedName": "radius" >+ } >+ ], >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ }, >+ { >+ "type": "interface", >+ "name": "I", >+ "partial": false, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": true, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Node", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [ >+ { >+ "name": "XAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ }, >+ "name": "attrib", >+ "escapedName": "attrib", >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [ >+ { >+ "name": "Exposed", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": { >+ "type": "identifier", >+ "value": "Window" >+ } >+ } >+ ] > } > ] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/generic.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/generic.json >index e39654ffdb2131fd0260e1a6264dbf48f74945b9..d3c26ac7cd0ddd9eb167d7a5ea9891f82fb06d5b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/generic.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/generic.json >@@ -8,41 +8,40 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": "Promise", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >- "generic": "ResponsePromise", >+ "type": "return-type", >+ "generic": "Promise", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": true, >+ "type": "return-type", > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >- } >- } >- } >+ "idlType": "DOMString", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] >+ }, >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "bar", >+ "escapedName": "bar", > "arguments": [], > "extAttrs": [] > }, >@@ -53,22 +52,22 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": "Promise", > "nullable": false, >- "array": 1, >- "nullableArray": [false], > "union": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >- } >+ "idlType": "DOMString", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "baz", >+ "escapedName": "baz", > "extAttrs": [] > } > ], >@@ -84,28 +83,26 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": "Promise", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": true, >- "nullableArray": [false], >- "array": 1, > "union": false, >- "idlType": "Client" >- } >+ "idlType": "Client", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "getServiced", >+ "escapedName": "getServiced", > "arguments": [], > "extAttrs": [] > }, >@@ -113,27 +110,26 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": "Promise", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >- } >+ "idlType": "any", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "reloadAll", >+ "escapedName": "reloadAll", > "arguments": [], > "extAttrs": [] > } >@@ -150,27 +146,26 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >- "generic": "ResponsePromise", >+ "type": "return-type", >+ "generic": "Promise", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >- } >+ "idlType": "any", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "default", >+ "escapedName": "default", > "arguments": [], > "extAttrs": [] > } >@@ -178,4 +173,4 @@ > "inheritance": "Event", > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json >index 94d20d594db15e5e2e15403930c2bd1e32a28b33..6f8196fe56dd3d04e9f64f719c82c552193320d8 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json >@@ -11,48 +11,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "propertyCount", >+ "escapedName": "propertyCount", > "extAttrs": [] > }, > { > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > } > ], > "extAttrs": [] >@@ -61,48 +63,51 @@ > "type": "operation", > "getter": false, > "setter": true, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "propertyName" >+ "name": "propertyName", >+ "escapedName": "propertyName" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "propertyValue" >+ "name": "propertyValue", >+ "escapedName": "propertyValue" > } > ], > "extAttrs": [] >@@ -111,4 +116,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json >index d87ea3b5f369db698e93072a1b76562a16d50fec..098cdcb1fbbc4f140f6aadaa7ee2977b2fccd4b9 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json >@@ -2,48 +2,16 @@ > { > "type": "typedef", > "idlType": { >- "sequence": false, >+ "type": "typedef-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "number", > "extAttrs": [] > }, >- { >- "type": "exception", >- "name": "FrameworkException", >- "members": [ >- { >- "type": "const", >- "nullable": false, >- "idlType": "long", >- "name": "ERR_NOT_FOUND", >- "value": { >- "type": "number", >- "value": 1 >- }, >- "extAttrs": [] >- }, >- { >- "type": "field", >- "name": "code", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "long" >- }, >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, > { > "type": "interface", > "name": "System", >@@ -53,34 +21,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "object" >+ "idlType": "object", >+ "extAttrs": [] > }, > "name": "createObject", >+ "escapedName": "createObject", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "interface" >+ "name": "interface", >+ "escapedName": "_interface" > } > ], > "extAttrs": [] >@@ -89,34 +58,35 @@ > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "keyName" >+ "name": "keyName", >+ "escapedName": "keyName" > } > ], > "extAttrs": [] >@@ -137,14 +107,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "const", >+ "escapedName": "_const", > "extAttrs": [] > }, > { >@@ -154,14 +125,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "value", >+ "escapedName": "_value", > "extAttrs": [] > } > ], >@@ -170,41 +142,42 @@ > }, > { > "type": "interface", >- "name": "Foo", >+ "name": "FooEventTarget", > "partial": false, > "members": [ > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, >- "name": "op", >+ "name": "addEventListener", >+ "escapedName": "addEventListener", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, >- "nullable": false, >- "array": false, >+ "nullable": true, > "union": false, >- "idlType": "object" >+ "idlType": "EventListener", >+ "extAttrs": [] > }, >- "name": "interface" >+ "name": "callback", >+ "escapedName": "callback" > } > ], > "extAttrs": [] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/implements.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/implements.json >index fa00e3374267b93b9d56b2ddc8b0b35e7302f481..1736118cd902fb6af5ebca4eba656ffb51bff28b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/implements.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/implements.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned short" >+ "idlType": "unsigned short", >+ "extAttrs": [] > }, > "name": "nodeType", >+ "escapedName": "nodeType", > "extAttrs": [] > } > ], >@@ -34,62 +35,67 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "addEventListener", >+ "escapedName": "addEventListener", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "type" >+ "name": "type", >+ "escapedName": "type" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "EventListener" >+ "idlType": "EventListener", >+ "extAttrs": [] > }, >- "name": "listener" >+ "name": "listener", >+ "escapedName": "listener" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, >- "name": "useCapture" >+ "name": "useCapture", >+ "escapedName": "useCapture" > } > ], > "extAttrs": [] >@@ -104,4 +110,4 @@ > "implements": "EventTarget", > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json >index 23cc4ab1023c2fedd4dab6c640a2b1307bc800af..dccd511af96bfd6e90d2b6829d823fabbf8c6d94 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json >@@ -11,48 +11,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "size", >+ "escapedName": "size", > "extAttrs": [] > }, > { > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, > "name": "getByIndex", >+ "escapedName": "getByIndex", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, >- "name": "index" >+ "name": "index", >+ "escapedName": "index" > } > ], > "extAttrs": [] >@@ -61,48 +63,51 @@ > "type": "operation", > "getter": false, > "setter": true, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "setByIndex", >+ "escapedName": "setByIndex", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, >- "name": "index" >+ "name": "index", >+ "escapedName": "index" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, >- "name": "value" >+ "name": "value", >+ "escapedName": "value" > } > ], > "extAttrs": [] >@@ -111,34 +116,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": true, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "removeByIndex", >+ "escapedName": "removeByIndex", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, >- "name": "index" >+ "name": "index", >+ "escapedName": "index" > } > ], > "extAttrs": [] >@@ -147,34 +153,35 @@ > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, > "name": "get", >+ "escapedName": "get", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "name" >+ "name": "name", >+ "escapedName": "name" > } > ], > "extAttrs": [] >@@ -183,48 +190,51 @@ > "type": "operation", > "getter": false, > "setter": true, >- "creator": true, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "set", >+ "escapedName": "set", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "name" >+ "name": "name", >+ "escapedName": "name" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, >- "name": "value" >+ "name": "value", >+ "escapedName": "value" > } > ], > "extAttrs": [] >@@ -233,34 +243,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": true, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "remove", >+ "escapedName": "remove", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "name" >+ "name": "name", >+ "escapedName": "name" > } > ], > "extAttrs": [] >@@ -269,4 +280,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json >index 468e3caef711f3afab68a785805dd75f74f96ab9..86eb68e270e46a9c5ab56456c3610d523bcdaeb9 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [] > } > ], >@@ -37,14 +38,15 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned short" >+ "idlType": "unsigned short", >+ "extAttrs": [] > }, > "name": "age", >+ "escapedName": "age", > "extAttrs": [] > }, > { >@@ -54,18 +56,46 @@ > "inherit": true, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [] > } > ], > "inheritance": "Animal", > "extAttrs": [] >+ }, >+ { >+ "type": "interface", >+ "name": "Ghost", >+ "partial": false, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": true, >+ "readonly": true, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "DOMString", >+ "extAttrs": [] >+ }, >+ "name": "name", >+ "escapedName": "name", >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": "Person", >+ "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json >index eee07cd1dec7bb6e3691fb207a0ca45ead4a310d..02caf35f605ab376cee42c8b5e981d1ca18772c1 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [] > } > ], >@@ -37,14 +38,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Dog" >+ "idlType": "Dog", >+ "extAttrs": [] > }, > "name": "pet", >+ "escapedName": "pet", > "extAttrs": [] > } > ], >@@ -63,18 +65,19 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Human" >+ "idlType": "Human", >+ "extAttrs": [] > }, > "name": "owner", >+ "escapedName": "owner", > "extAttrs": [] > } > ], > "inheritance": "Animal", > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json >index 3e38991dd9db21c92bc2b50769ff8b87247dacef..ee906f75ea2eb5f7a3aef33c53a7e03443b6f450 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json >@@ -6,14 +6,16 @@ > "members": [ > { > "type": "iterable", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "long" >- }, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [] >+ } >+ ], > "extAttrs": [] > } > ], >@@ -29,20 +31,50 @@ > "type": "iterable", > "idlType": [ > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "short" >+ "idlType": "short", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "double" >+ "idlType": "double", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [] >+ }, >+ { >+ "type": "interface", >+ "name": "IterableThree", >+ "partial": false, >+ "members": [ >+ { >+ "type": "iterable", >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [ >+ { >+ "name": "XAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] > } > ], > "extAttrs": [] >@@ -52,4 +84,3 @@ > "extAttrs": [] > } > ] >- >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterator.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterator.json >index cc3c9ec505d8e39b249121a3acdb33ea555f08d6..f9605b83450cb5dcd21ec338b82796a2a2304b08 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterator.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterator.json >@@ -8,16 +8,13 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "Session" > }, >@@ -31,7 +28,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "DOMString" > }, >@@ -50,7 +46,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "unsigned long" > }, >@@ -61,16 +56,13 @@ > "type": "iterator", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "Session" > }, >@@ -95,7 +87,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "DOMString" > }, >@@ -115,16 +106,13 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "Session2" > }, >@@ -138,7 +126,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "DOMString" > }, >@@ -157,7 +144,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "unsigned long" > }, >@@ -168,16 +154,13 @@ > "type": "iterator", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "Session2" > }, >@@ -203,7 +186,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "DOMString" > }, >@@ -229,7 +211,6 @@ > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "unsigned long" > }, >@@ -249,16 +230,13 @@ > "type": "iterator", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "Node" > }, >@@ -278,16 +256,13 @@ > "type": "iterator", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { > "sequence": false, > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "Node" > }, >@@ -298,4 +273,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json >index e63f99de43f43d2170867185971bd49e2b5f5587..80fd000a84937162deb765f585e4bdd24dc83ebe 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json >@@ -6,14 +6,16 @@ > "members": [ > { > "type": "legacyiterable", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "long" >- }, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [] >+ } >+ ], > "extAttrs": [] > } > ], >@@ -21,4 +23,3 @@ > "extAttrs": [] > } > ] >- >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json >index 017d8b3f3ec2c406b25ebf904737458f8f6d1174..2cb8c360ee3e2f03fe400307bbf757b4458af887 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json >@@ -8,20 +8,20 @@ > "type": "maplike", > "idlType": [ > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > } > ], > "readonly": false, >@@ -40,20 +40,20 @@ > "type": "maplike", > "idlType": [ > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > } > ], > "readonly": true, >@@ -62,6 +62,51 @@ > ], > "inheritance": null, > "extAttrs": [] >+ }, >+ { >+ "type": "interface", >+ "name": "I", >+ "partial": false, >+ "members": [ >+ { >+ "type": "maplike", >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "DOMString", >+ "extAttrs": [ >+ { >+ "name": "XAttr2", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [ >+ { >+ "name": "XAttr3", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ } >+ ], >+ "readonly": false, >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [] > } > ] >- >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json >new file mode 100644 >index 0000000000000000000000000000000000000000..b037cb3577941adf5c591b2d2e9312ebd6d77f02 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json >@@ -0,0 +1,66 @@ >+[ >+ { >+ "type": "interface mixin", >+ "name": "GlobalCrypto", >+ "partial": false, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": true, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Crypto", >+ "extAttrs": [] >+ }, >+ "name": "crypto", >+ "escapedName": "crypto", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [] >+ }, >+ { >+ "type": "includes", >+ "target": "Window", >+ "includes": "GlobalCrypto", >+ "extAttrs": [] >+ }, >+ { >+ "type": "includes", >+ "target": "WorkerGlobalScope", >+ "includes": "GlobalCrypto", >+ "extAttrs": [] >+ }, >+ { >+ "type": "interface mixin", >+ "name": "WindowOrWorkerGlobalScope", >+ "partial": true, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": true, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Crypto", >+ "extAttrs": [] >+ }, >+ "name": "crypto", >+ "escapedName": "crypto", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [] >+ } >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json >index a947a64a4e2e3c050a4ad154826282f3b4a5fb33..deb429e986eb106e958e799048f6b4ce2da1df51 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json >@@ -9,6 +9,7 @@ > { > "name": "NamedConstructor", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "Audio" >@@ -20,18 +21,21 @@ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "src" >+ "name": "src", >+ "escapedName": "src" > } > ], >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "Audio" >@@ -39,4 +43,4 @@ > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json >index 7c7ba771e1bf3ade1dc128e38a8d8bdbf02702b6..9e37b26fa6504f9862877c25c97e94893dc8d833 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json >@@ -11,62 +11,66 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Vector" >+ "idlType": "Vector", >+ "extAttrs": [] > }, > "name": "unit", >+ "escapedName": "unit", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "double" >+ "idlType": "double", >+ "extAttrs": [] > }, > "name": "dotProduct", >+ "escapedName": "dotProduct", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Vector" >+ "idlType": "Vector", >+ "extAttrs": [] > }, >- "name": "x" >+ "name": "x", >+ "escapedName": "x" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Vector" >+ "idlType": "Vector", >+ "extAttrs": [] > }, >- "name": "y" >+ "name": "y", >+ "escapedName": "y" > } > ], > "extAttrs": [] >@@ -75,48 +79,51 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Vector" >+ "idlType": "Vector", >+ "extAttrs": [] > }, > "name": "crossProduct", >+ "escapedName": "crossProduct", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Vector" >+ "idlType": "Vector", >+ "extAttrs": [] > }, >- "name": "x" >+ "name": "x", >+ "escapedName": "x" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Vector" >+ "idlType": "Vector", >+ "extAttrs": [] > }, >- "name": "y" >+ "name": "y", >+ "escapedName": "y" > } > ], > "extAttrs": [] >@@ -131,4 +138,4 @@ > "members": [], > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json >index 90f0d63c82e3f25d7f097b2f0f4cd1b0899fb1dc..cafb5e0e156bd0b6e90f37f94bc551a9937f5e40 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json >@@ -8,34 +8,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > }, > "name": "lookupEntry", >+ "escapedName": "lookupEntry", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, >- "name": "key" >+ "name": "key", >+ "escapedName": "key" > } > ], > "extAttrs": [] >@@ -45,8 +46,10 @@ > "extAttrs": [ > { > "name": "NoInterfaceObject", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json >index 300442f0d4661722e18af8f1e7b97940e92afe64..f325e2eab7b8af6c102c941d686f14411915c5c1 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json >@@ -7,7 +7,14 @@ > { > "type": "const", > "nullable": true, >- "idlType": "boolean", >+ "idlType": { >+ "type": "const-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "boolean", >+ "extAttrs": [] >+ }, > "name": "ARE_WE_THERE_YET", > "value": { > "type": "boolean", >@@ -31,18 +38,19 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "namespaceURI", >+ "escapedName": "namespaceURI", > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json >index 40f7db0c1c9c8c435eb216205b239959995548a2..27ecd25d363bfb39524327d09e0f8ca6c0a56788 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json >@@ -24,34 +24,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "A" >+ "idlType": "A", >+ "extAttrs": [] > }, >- "name": "x" >+ "name": "x", >+ "escapedName": "x" > } > ], > "extAttrs": [] >@@ -60,34 +61,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "B" >+ "idlType": "B", >+ "extAttrs": [] > }, >- "name": "x" >+ "name": "x", >+ "escapedName": "x" > } > ], > "extAttrs": [] >@@ -96,4 +98,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json >index 6ca32576b7a41f81dcddfb7eb462508eae5d91a5..4b7436ba5baf7601936b34050e71191a47812c6b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json >@@ -8,80 +8,86 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "object" >+ "idlType": "object", >+ "extAttrs": [] > }, > "name": "createColor", >+ "escapedName": "createColor", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "v1" >+ "name": "v1", >+ "escapedName": "v1" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "v2" >+ "name": "v2", >+ "escapedName": "v2" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "v3" >+ "name": "v3", >+ "escapedName": "v3" > }, > { > "optional": true, > "variadic": false, >+ "default": { >+ "type": "number", >+ "value": "3.5" >+ }, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "alpha", >- "default": { >- "type": "number", >- "value": 3.5 >- } >+ "escapedName": "alpha" > } > ], > "extAttrs": [] >@@ -90,4 +96,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json >index c3baa439623b09bfdb6a71b571a621a12a2e6dc5..bf7aca6cde3808e7ed3616407f7dc49fa631b769 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json >@@ -24,34 +24,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "A" >+ "idlType": "A", >+ "extAttrs": [] > }, >- "name": "x" >+ "name": "x", >+ "escapedName": "x" > } > ], > "extAttrs": [] >@@ -60,34 +61,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "B" >+ "idlType": "B", >+ "extAttrs": [] > }, >- "name": "x" >+ "name": "x", >+ "escapedName": "x" > } > ], > "extAttrs": [] >@@ -98,41 +100,42 @@ > }, > { > "type": "interface", >- "name": "A", >+ "name": "D", > "partial": false, > "members": [ > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "a" >+ "name": "a", >+ "escapedName": "a" > } > ], > "extAttrs": [] >@@ -141,67 +144,74 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [ > { > "name": "AllowAny", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "a" >+ "name": "a", >+ "escapedName": "a" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "b" >+ "name": "b", >+ "escapedName": "b" > }, > { > "optional": false, > "variadic": true, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "c" >+ "name": "c", >+ "escapedName": "c" > } > ], > "extAttrs": [] >@@ -210,20 +220,19 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [], > "extAttrs": [] > }, >@@ -231,76 +240,83 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "f", >+ "escapedName": "f", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, >- "name": "a" >+ "name": "a", >+ "escapedName": "a" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "b" >+ "name": "b", >+ "escapedName": "b" > }, > { > "optional": true, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "c" >+ "name": "c", >+ "escapedName": "c" > }, > { > "optional": false, > "variadic": true, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, >- "name": "d" >+ "name": "d", >+ "escapedName": "d" > } > ], > "extAttrs": [] >@@ -309,4 +325,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json >index 9e2f795e2ae175fd31eb891bd07df595cc4e7cd9..e54a468eb98e867ed8b0d68a9c75dcfbd763e98f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json >@@ -11,48 +11,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "length", >+ "escapedName": "length", > "extAttrs": [] > }, > { > "type": "operation", > "getter": true, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "lookup", >+ "escapedName": "lookup", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "key" >+ "name": "key", >+ "escapedName": "key" > } > ], > "extAttrs": [] >@@ -62,8 +64,10 @@ > "extAttrs": [ > { > "name": "OverrideBuiltins", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json >index 53c65a453bd7301863ed0fae935a10eb2aa7360f..d791262f465691ebd7aeab9118d48475c3230a0c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "bar", >+ "escapedName": "bar", > "extAttrs": [] > } > ], >@@ -37,17 +38,18 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "quux", >+ "escapedName": "quux", > "extAttrs": [] > } > ], > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json >index 7160c2a4ce066df3284c50eaf4f4af80ef01ab90..a216221140c65aec9d7878ef0a96a8f02fe0ea60 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "truth", >+ "escapedName": "truth", > "extAttrs": [] > }, > { >@@ -28,14 +29,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "byte" >+ "idlType": "byte", >+ "extAttrs": [] > }, > "name": "character", >+ "escapedName": "character", > "extAttrs": [] > }, > { >@@ -45,14 +47,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "octet" >+ "idlType": "octet", >+ "extAttrs": [] > }, > "name": "value", >+ "escapedName": "value", > "extAttrs": [] > }, > { >@@ -62,14 +65,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "short" >+ "idlType": "short", >+ "extAttrs": [] > }, > "name": "number", >+ "escapedName": "number", > "extAttrs": [] > }, > { >@@ -79,14 +83,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned short" >+ "idlType": "unsigned short", >+ "extAttrs": [] > }, > "name": "positive", >+ "escapedName": "positive", > "extAttrs": [] > }, > { >@@ -96,14 +101,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, > "name": "big", >+ "escapedName": "big", > "extAttrs": [] > }, > { >@@ -113,14 +119,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "bigpositive", >+ "escapedName": "bigpositive", > "extAttrs": [] > }, > { >@@ -130,14 +137,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long long" >+ "idlType": "long long", >+ "extAttrs": [] > }, > "name": "bigbig", >+ "escapedName": "bigbig", > "extAttrs": [] > }, > { >@@ -147,14 +155,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long long" >+ "idlType": "unsigned long long", >+ "extAttrs": [] > }, > "name": "bigbigpositive", >+ "escapedName": "bigbigpositive", > "extAttrs": [] > }, > { >@@ -164,14 +173,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "real", >+ "escapedName": "real", > "extAttrs": [] > }, > { >@@ -181,14 +191,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "double" >+ "idlType": "double", >+ "extAttrs": [] > }, > "name": "bigreal", >+ "escapedName": "bigreal", > "extAttrs": [] > }, > { >@@ -198,14 +209,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unrestricted float" >+ "idlType": "unrestricted float", >+ "extAttrs": [] > }, > "name": "realwithinfinity", >+ "escapedName": "realwithinfinity", > "extAttrs": [] > }, > { >@@ -215,14 +227,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unrestricted double" >+ "idlType": "unrestricted double", >+ "extAttrs": [] > }, > "name": "bigrealwithinfinity", >+ "escapedName": "bigrealwithinfinity", > "extAttrs": [] > }, > { >@@ -232,14 +245,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "string", >+ "escapedName": "string", > "extAttrs": [] > }, > { >@@ -249,14 +263,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "ByteString" >+ "idlType": "ByteString", >+ "extAttrs": [] > }, > "name": "bytes", >+ "escapedName": "bytes", > "extAttrs": [] > }, > { >@@ -266,14 +281,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Date" >+ "idlType": "Date", >+ "extAttrs": [] > }, > "name": "date", >+ "escapedName": "date", > "extAttrs": [] > }, > { >@@ -283,18 +299,19 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "RegExp" >+ "idlType": "RegExp", >+ "extAttrs": [] > }, > "name": "regexp", >+ "escapedName": "regexp", > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json >new file mode 100644 >index 0000000000000000000000000000000000000000..7676838b8179d9e736a8f36b97628bece12a84d8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json >@@ -0,0 +1,36 @@ >+[ >+ { >+ "type": "interface", >+ "name": "Cat", >+ "partial": false, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": "Promise", >+ "nullable": false, >+ "union": false, >+ "idlType": { >+ "type": "return-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "void", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] >+ }, >+ "name": "meow", >+ "escapedName": "meow", >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [] >+ } >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json >index 666798d94cfd272ca349d7ba549512025d4aa4f0..cec79ff66b6a49dc39def76c4252d87e96a2ce28 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned short" >+ "idlType": "unsigned short", >+ "extAttrs": [] > }, > "name": "nodeType", >+ "escapedName": "nodeType", > "extAttrs": [] > } > ], >@@ -26,8 +27,10 @@ > "extAttrs": [ > { > "name": "PrototypeRoot", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json >index bd5e619cac553463e125d2489b4b282e46563ae8..951b3ef718ccc90c7cee3ff035aca61e61396898 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json >@@ -11,18 +11,20 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Name" >+ "idlType": "Name", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [ > { > "name": "PutForwards", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "full" >@@ -37,18 +39,19 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned short" >+ "idlType": "unsigned short", >+ "extAttrs": [] > }, > "name": "age", >+ "escapedName": "age", > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/record.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/record.json >index d2a21a4acd99936119cd7d8a6757e361c83141cc..1be5427c74d6c83b429273443fefb03263d0f98f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/record.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/record.json >@@ -8,58 +8,59 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "foo", >+ "escapedName": "foo", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": true, >+ "type": "argument-type", > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": "record", > "nullable": false, >- "array": false, > "union": false, > "idlType": [ > { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "ByteString" >+ "idlType": "ByteString", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "any" >+ "idlType": "any", >+ "extAttrs": [] > } >- ] >- } >+ ], >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, >- "name": "param" >+ "name": "param", >+ "escapedName": "param" > } > ], > "extAttrs": [] >@@ -68,75 +69,53 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": "record", > "nullable": false, >- "array": false, > "union": false, > "idlType": [ > { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": true, >- "array": false, > "union": true, > "idlType": [ > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": null, > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > } >- ] >+ ], >+ "extAttrs": [] > } >- ] >+ ], >+ "extAttrs": [] > }, > "name": "bar", >- "arguments": [], >- "extAttrs": [] >- }, >- { >- "type": "operation", >- "getter": false, >- "setter": false, >- "creator": false, >- "deleter": false, >- "legacycaller": false, >- "static": false, >- "stringifier": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "record" >- }, >- "name": "baz", >+ "escapedName": "bar", > "arguments": [], > "extAttrs": [] > } >@@ -149,36 +128,93 @@ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": "record", > "nullable": false, >- "array": false, > "union": false, > "idlType": [ > { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "USVString" >+ "idlType": "USVString", >+ "extAttrs": [] > }, > { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "USVString" >+ "idlType": "USVString", >+ "extAttrs": [] > } >- ] >+ ], >+ "extAttrs": [] > }, >- "name": "init" >+ "name": "init", >+ "escapedName": "init" > } >- ] >+ ], >+ "type": "extended-attribute", >+ "rhs": null > } > ] >+ }, >+ { >+ "type": "interface", >+ "name": "Bar", >+ "partial": false, >+ "members": [ >+ { >+ "type": "operation", >+ "getter": false, >+ "setter": false, >+ "deleter": false, >+ "static": false, >+ "stringifier": false, >+ "idlType": { >+ "type": "return-type", >+ "generic": "record", >+ "nullable": false, >+ "union": false, >+ "idlType": [ >+ { >+ "type": "return-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "DOMString", >+ "extAttrs": [] >+ }, >+ { >+ "type": "return-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "float", >+ "extAttrs": [ >+ { >+ "name": "XAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ } >+ ], >+ "extAttrs": [] >+ }, >+ "name": "bar", >+ "escapedName": "bar", >+ "arguments": [], >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [] > } > ] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json >index c827fff03b6bf3bb4357d1aeee4170345e61437e..8795c59ec87371e74bf7597861478ab8b1c15b54 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "width", >+ "escapedName": "width", > "extAttrs": [] > }, > { >@@ -28,27 +29,21 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "height", >+ "escapedName": "height", > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] > }, >- { >- "type": "exception", >- "name": "NoPointerDevice", >- "members": [], >- "inheritance": null, >- "extAttrs": [] >- }, > { > "type": "interface", > "name": "Button", >@@ -58,20 +53,19 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "isMouseOver", >+ "escapedName": "isMouseOver", > "arguments": [], > "extAttrs": [] > }, >@@ -79,34 +73,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "setDimensions", >+ "escapedName": "setDimensions", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Dimensions" >+ "idlType": "Dimensions", >+ "extAttrs": [] > }, >- "name": "size" >+ "name": "size", >+ "escapedName": "size" > } > ], > "extAttrs": [] >@@ -115,48 +110,51 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "setDimensions", >+ "escapedName": "setDimensions", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, >- "name": "width" >+ "name": "width", >+ "escapedName": "width" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, >- "name": "height" >+ "name": "height", >+ "escapedName": "height" > } > ], > "extAttrs": [] >@@ -165,4 +163,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json >index 4d25f3d9317e12da6d73723cefa7ff8a071be053..133891d461db315c17b4184b0d7443dd35feaf50 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json >@@ -11,18 +11,21 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "value", >+ "escapedName": "value", > "extAttrs": [ > { > "name": "Replaceable", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > }, >@@ -30,20 +33,19 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "increment", >+ "escapedName": "increment", > "arguments": [], > "extAttrs": [] > } >@@ -51,4 +53,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json >index 7ddd402b402aee67c8b0a697d5fc006306e541b6..ead0cdd862c7867cc8cb2e0b55bbca4367aeb89d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json >@@ -8,41 +8,42 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "drawPolygon", >+ "escapedName": "drawPolygon", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": true, >+ "type": "argument-type", > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >- } >+ "idlType": "float", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, >- "name": "coordinates" >+ "name": "coordinates", >+ "escapedName": "coordinates" > } > ], > "extAttrs": [] >@@ -51,27 +52,26 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": true, >+ "type": "return-type", > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >- } >+ "idlType": "float", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "getInflectionPoints", >+ "escapedName": "getInflectionPoints", > "arguments": [], > "extAttrs": [] > } >@@ -81,33 +81,62 @@ > }, > { > "type": "interface", >- "name": "Foo", >+ "name": "I", > "partial": false, > "members": [ >- > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "sequence" >+ "idlType": "void", >+ "extAttrs": [] > }, >- "name": "bar", >- "arguments": [], >+ "name": "f1", >+ "escapedName": "f1", >+ "arguments": [ >+ { >+ "optional": false, >+ "variadic": false, >+ "default": null, >+ "extAttrs": [], >+ "idlType": { >+ "type": "argument-type", >+ "generic": "sequence", >+ "nullable": false, >+ "union": false, >+ "idlType": { >+ "type": "argument-type", >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [ >+ { >+ "name": "XAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ }, >+ "extAttrs": [] >+ }, >+ "name": "arg", >+ "escapedName": "arg" >+ } >+ ], > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] >- } >-] >\ No newline at end of file >+ } >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/serializer.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/serializer.json >deleted file mode 100644 >index 79b501fcbc4c7c492607b51d7f5f0ce41ce02bd8..0000000000000000000000000000000000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/serializer.json >+++ /dev/null >@@ -1,591 +0,0 @@ >-[ >- { >- "type": "interface", >- "name": "Transaction", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "Account" >- }, >- "name": "from", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "Account" >- }, >- "name": "to", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "float" >- }, >- "name": "amount", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "description", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "number", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "name", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "number", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "operation": { >- "name": "serialize", >- "arguments": [] >- }, >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Transaction2", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "Account2" >- }, >- "name": "from", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "Account2" >- }, >- "name": "to", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "float" >- }, >- "name": "amount", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "description", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": true, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "number", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternMap": true, >- "names": [ >- "from", >- "to", >- "amount", >- "description" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account2", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "name", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "number", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "name": "number", >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account3", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "name", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "number", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternMap": true, >- "names": [ >- "attribute" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account4", >- "partial": false, >- "members": [ >- { >- "type": "operation", >- "getter": true, >- "setter": false, >- "creator": false, >- "deleter": false, >- "legacycaller": false, >- "static": false, >- "stringifier": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "object" >- }, >- "name": "getItem", >- "arguments": [ >- { >- "optional": false, >- "variadic": false, >- "extAttrs": [], >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "index" >- } >- ], >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternMap": true, >- "names": [ >- "getter" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account5", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "secondname", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternMap": true, >- "names": [ >- "inherit", >- "secondname" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": "Account", >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account6", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "secondname", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternMap": true, >- "names": [ >- "inherit", >- "attribute" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": "Account", >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account7", >- "partial": false, >- "members": [ >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "DOMString" >- }, >- "name": "name", >- "extAttrs": [] >- }, >- { >- "type": "attribute", >- "static": false, >- "stringifier": false, >- "inherit": false, >- "readonly": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "number", >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternList": true, >- "names": [ >- "name", >- "number" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- }, >- { >- "type": "interface", >- "name": "Account8", >- "partial": false, >- "members": [ >- { >- "type": "operation", >- "getter": true, >- "setter": false, >- "creator": false, >- "deleter": false, >- "legacycaller": false, >- "static": false, >- "stringifier": false, >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "object" >- }, >- "name": "getItem", >- "arguments": [ >- { >- "optional": false, >- "variadic": false, >- "extAttrs": [], >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "unsigned long" >- }, >- "name": "index" >- } >- ], >- "extAttrs": [] >- }, >- { >- "type": "serializer", >- "patternList": true, >- "names": [ >- "getter" >- ], >- "extAttrs": [] >- } >- ], >- "inheritance": null, >- "extAttrs": [] >- } >-] >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json >index d44043a944aa9bd58223a96ca7b7deeef6055091..d8583538fd0f0a1f1e4b3e03942c2aca5f615270 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json >@@ -6,14 +6,16 @@ > "members": [ > { > "type": "setlike", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "long" >- }, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [] >+ } >+ ], > "readonly": false, > "extAttrs": [] > } >@@ -28,20 +30,52 @@ > "members": [ > { > "type": "setlike", >- "idlType": { >- "sequence": false, >- "generic": null, >- "nullable": false, >- "array": false, >- "union": false, >- "idlType": "long" >- }, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [] >+ } >+ ], > "readonly": true, > "extAttrs": [] > } > ], > "inheritance": null, > "extAttrs": [] >+ }, >+ { >+ "type": "interface", >+ "name": "SetLikeExt", >+ "partial": false, >+ "members": [ >+ { >+ "type": "setlike", >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [ >+ { >+ "name": "XAttr", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ } >+ ], >+ "readonly": false, >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [] > } > ] >- >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/static.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/static.json >index faab12b2966cebe10cf7817cebc94e5f007a4065..d0ddf35ec6e4b5da6acdf203eae3daa5f0132d19 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/static.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/static.json >@@ -19,14 +19,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "cx", >+ "escapedName": "cx", > "extAttrs": [] > }, > { >@@ -36,14 +37,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "cy", >+ "escapedName": "cy", > "extAttrs": [] > }, > { >@@ -53,14 +55,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "radius", >+ "escapedName": "radius", > "extAttrs": [] > }, > { >@@ -70,76 +73,82 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, > "name": "triangulationCount", >+ "escapedName": "triangulationCount", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": true, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >+ "idlType": "Point", >+ "extAttrs": [] > }, > "name": "triangulate", >+ "escapedName": "triangulate", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Circle" >+ "idlType": "Circle", >+ "extAttrs": [] > }, >- "name": "c1" >+ "name": "c1", >+ "escapedName": "c1" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Circle" >+ "idlType": "Circle", >+ "extAttrs": [] > }, >- "name": "c2" >+ "name": "c2", >+ "escapedName": "c2" > }, > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Circle" >+ "idlType": "Circle", >+ "extAttrs": [] > }, >- "name": "c3" >+ "name": "c3", >+ "escapedName": "c3" > } > ], > "extAttrs": [] >@@ -148,4 +157,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json >index 196ee6f1a7c07f6d17c7132bced8b38149f1c8d6..dbca7f17902c2b317e9de74ca7a54b1e8c120783 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "id", >+ "escapedName": "id", > "extAttrs": [] > }, > { >@@ -28,14 +29,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [] > } > ], >@@ -43,8 +45,10 @@ > "extAttrs": [ > { > "name": "Constructor", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json >index b4ab7392e5a69b871ab9545aa66a588d0c70e527..c13df6ef10c0c505008448c055e1911def33c9da 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "id", >+ "escapedName": "id", > "extAttrs": [] > }, > { >@@ -28,14 +29,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": true, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "familyName", >+ "escapedName": "familyName", > "extAttrs": [] > }, > { >@@ -45,34 +47,34 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "givenName", >+ "escapedName": "givenName", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": true, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [], > "extAttrs": [] > } >@@ -81,8 +83,10 @@ > "extAttrs": [ > { > "name": "Constructor", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json >index ad3abde85f4bbc610d9d806d4bde52f0801ddc97..a4f23e03f66d4213bf55fcd43b406eb545879333 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json >@@ -8,20 +8,19 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": true, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": null, >+ "escapedName": null, > "arguments": [], > "extAttrs": [] > } >@@ -31,16 +30,14 @@ > }, > { > "type": "interface", >- "name": "A", >+ "name": "B", > "partial": false, > "members": [ > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": true, > "extAttrs": [] >@@ -49,4 +46,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json >index 8bacb967acc1e1eff834532e0b266290117f6b27..d5156bcb4f1b5ddb4db5b2a2518f9cf0a7b41745 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [] > }, > { >@@ -28,42 +29,44 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "owner", >+ "escapedName": "owner", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "isMemberOfBreed", >+ "escapedName": "isMemberOfBreed", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [ > { > "name": "TreatNullAs", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "EmptyString" >@@ -71,14 +74,15 @@ > } > ], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "breedName" >+ "name": "breedName", >+ "escapedName": "breedName" > } > ], > "extAttrs": [] >@@ -87,4 +91,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json >index 91c4d25f5d1d2fb8f58acfe657531d3168679fba..1e98315d9f13bfb0298d8a74290ab90e69d961d4 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "name", >+ "escapedName": "name", > "extAttrs": [] > }, > { >@@ -28,42 +29,44 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, > "name": "owner", >+ "escapedName": "owner", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "isMemberOfBreed", >+ "escapedName": "isMemberOfBreed", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [ > { > "name": "TreatUndefinedAs", > "arguments": null, >+ "type": "extended-attribute", > "rhs": { > "type": "identifier", > "value": "EmptyString" >@@ -71,14 +74,15 @@ > } > ], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "DOMString" >+ "idlType": "DOMString", >+ "extAttrs": [] > }, >- "name": "breedName" >+ "name": "breedName", >+ "escapedName": "breedName" > } > ], > "extAttrs": [] >@@ -87,4 +91,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json >index 9c87672c8aebb1074943530d5de1edd546d3ae22..31e24198ab130f3cd7efdd3e80a4baaf6bb213e3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json >@@ -1,49 +1,48 @@ > [ >- { >- "type" : "typedef", >- "idlType" : { >- "nullable" : false, >- "generic" : null, >- "union" : true, >- "idlType" : [ >- { >- "union" : false, >- "generic" : null, >- "nullable" : false, >- "array" : false, >- "sequence" : false, >- "idlType" : "ImageData" >- }, >- { >- "generic" : null, >- "union" : false, >- "nullable" : false, >- "array" : false, >- "idlType" : "HTMLImageElement", >- "sequence" : false >- }, >- { >- "array" : false, >- "sequence" : false, >- "idlType" : "HTMLCanvasElement", >- "generic" : null, >- "union" : false, >- "nullable" : false >- }, >- { >- "union" : false, >- "generic" : null, >- "nullable" : false, >- "array" : false, >- "sequence" : false, >- "idlType" : "HTMLVideoElement" >- } >- ], >- "sequence" : false, >- "array" : false >- }, >- "name" : "TexImageSource", >- "extAttrs" : [], >- "typeExtAttrs" : [] >- } >+ { >+ "type": "typedef", >+ "idlType": { >+ "type": "typedef-type", >+ "generic": null, >+ "nullable": false, >+ "union": true, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "ImageData", >+ "extAttrs": [] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "HTMLImageElement", >+ "extAttrs": [] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "HTMLCanvasElement", >+ "extAttrs": [] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "HTMLVideoElement", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [] >+ }, >+ "name": "TexImageSource", >+ "extAttrs": [] >+ } > ] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json >index d0854fa3d2626855da2eed1419e32dba7f3d9cfc..35f988e721e75e9808a6a00a749aef3fb051b0e3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json >@@ -11,14 +11,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "x", >+ "escapedName": "x", > "extAttrs": [] > }, > { >@@ -28,14 +29,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "float" >+ "idlType": "float", >+ "extAttrs": [] > }, > "name": "y", >+ "escapedName": "y", > "extAttrs": [] > } > ], >@@ -45,19 +47,19 @@ > { > "type": "typedef", > "idlType": { >- "sequence": true, >+ "type": "typedef-type", > "generic": "sequence", > "nullable": false, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "typedef-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >- } >+ "idlType": "Point", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, > "name": "PointSequence", > "extAttrs": [] >@@ -74,14 +76,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >+ "idlType": "Point", >+ "extAttrs": [] > }, > "name": "topleft", >+ "escapedName": "topleft", > "extAttrs": [] > }, > { >@@ -91,14 +94,15 @@ > "inherit": false, > "readonly": false, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >+ "idlType": "Point", >+ "extAttrs": [] > }, > "name": "bottomright", >+ "escapedName": "bottomright", > "extAttrs": [] > } > ], >@@ -117,48 +121,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Rect" >+ "idlType": "Rect", >+ "extAttrs": [] > }, > "name": "bounds", >+ "escapedName": "bounds", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "pointWithinBounds", >+ "escapedName": "pointWithinBounds", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "Point" >+ "idlType": "Point", >+ "extAttrs": [] > }, >- "name": "p" >+ "name": "p", >+ "escapedName": "p" > } > ], > "extAttrs": [] >@@ -167,34 +173,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "boolean" >+ "idlType": "boolean", >+ "extAttrs": [] > }, > "name": "allPointsWithinBounds", >+ "escapedName": "allPointsWithinBounds", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "PointSequence" >+ "idlType": "PointSequence", >+ "extAttrs": [] > }, >- "name": "ps" >+ "name": "ps", >+ "escapedName": "ps" > } > ], > "extAttrs": [] >@@ -206,16 +213,17 @@ > { > "type": "typedef", > "idlType": { >- "sequence": false, >+ "type": "typedef-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, > "idlType": "octet", > "extAttrs": [ > { > "name": "Clamp", >- "arguments": null >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null > } > ] > }, >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json >index 790c444ef461b05a8ff766228d9c1ced38635b39..52870c22f4b47616e2df15d62752f950d03e0b07 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json >@@ -8,42 +8,42 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "test", >+ "escapedName": "test", > "arguments": [ > { > "optional": false, > "variadic": false, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": true, >+ "type": "argument-type", > "generic": "sequence", > "nullable": true, >- "array": false, > "union": false, > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": true, >- "array": 1, >- "nullableArray": [false], > "union": false, >- "idlType": "DOMString" >- } >+ "idlType": "DOMString", >+ "extAttrs": [] >+ }, >+ "extAttrs": [] > }, >- "name": "foo" >+ "name": "foo", >+ "escapedName": "foo" > } > ], > "extAttrs": [] >@@ -52,4 +52,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json >index 9da5e79f3625ef6c2b11ed204aef90742d925c61..90eb074ef3a0a719e9ecd5f67b47cd52b682f094 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json >@@ -1,127 +1,130 @@ > [ >- { >- "partial": false, >- "members": [ >- { >- "idlType": { >- "idlType": [ >- { >- "array": false, >- "union": false, >- "sequence": false, >- "generic": null, >- "idlType": "float", >- "nullable": false >- }, >- { >- "idlType": [ >+ { >+ "type": "interface", >+ "name": "Union", >+ "partial": false, >+ "members": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": true, >+ "idlType": [ > { >- "nullable": false, >- "idlType": "Date", >- "sequence": false, >- "generic": null, >- "union": false, >- "array": false >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "float", >+ "extAttrs": [] > }, > { >- "nullable": false, >- "idlType": "Event", >- "generic": null, >- "sequence": false, >- "array": false, >- "union": false >- } >- ], >- "nullable": false, >- "sequence": false, >- "generic": null, >- "array": false, >- "union": true >- }, >- { >- "generic": null, >- "sequence": false, >- "idlType": [ >- { >- "array": false, >- "union": false, >- "sequence": false, >- "generic": null, >- "nullable": false, >- "idlType": "Node" >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": true, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Date", >+ "extAttrs": [] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Event", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [] > }, > { >- "nullable": false, >- "idlType": "DOMString", >- "sequence": false, >- "generic": null, >- "array": false, >- "union": false >+ "type": null, >+ "generic": null, >+ "nullable": true, >+ "union": true, >+ "idlType": [ >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Node", >+ "extAttrs": [] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "DOMString", >+ "extAttrs": [] >+ } >+ ], >+ "extAttrs": [] > } >- ], >- "nullable": true, >- "union": true, >- "array": false >- } >- ], >- "nullable": false, >- "generic": null, >- "sequence": false, >- "union": true, >- "array": false >+ ], >+ "extAttrs": [] >+ }, >+ "name": "test", >+ "escapedName": "test", >+ "extAttrs": [] > }, >- "name": "test", >- "inherit": false, >- "type": "attribute", >- "extAttrs": [], >- "readonly": false, >- "stringifier": false, >- "static": false >- }, >- { >- "readonly": false, >- "extAttrs": [], >- "stringifier": false, >- "static": false, >- "name": "test2", >- "idlType": { >- "nullable": false, >- "idlType": [ >- { >- "extAttrs": [ >+ { >+ "type": "attribute", >+ "static": false, >+ "stringifier": false, >+ "inherit": false, >+ "readonly": false, >+ "idlType": { >+ "type": "attribute-type", >+ "generic": null, >+ "nullable": false, >+ "union": true, >+ "idlType": [ > { >- "name": "EnforceRange", >- "arguments": null >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "long", >+ "extAttrs": [ >+ { >+ "name": "EnforceRange", >+ "arguments": null, >+ "type": "extended-attribute", >+ "rhs": null >+ } >+ ] >+ }, >+ { >+ "type": null, >+ "generic": null, >+ "nullable": false, >+ "union": false, >+ "idlType": "Date", >+ "extAttrs": [] > } >- ], >- "nullable": false, >- "idlType": "long", >- "generic": null, >- "sequence": false, >- "array": false, >- "union": false >- }, >- { >- "array": false, >- "union": false, >- "sequence": false, >- "generic": null, >- "idlType": "Date", >- "nullable": false >- } >- ], >- "generic": null, >- "sequence": false, >- "union": true, >- "array": false >- }, >- "inherit": false, >- "type": "attribute" >- } >- ], >- "inheritance": null, >- "name": "Union", >- "extAttrs": [], >- "type": "interface" >- } >+ ], >+ "extAttrs": [] >+ }, >+ "name": "test2", >+ "escapedName": "test2", >+ "extAttrs": [] >+ } >+ ], >+ "inheritance": null, >+ "extAttrs": [] >+ } > ] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json >index 431ec0cb1150e0084cd8c9ac0e5f671d024a2808..3280b7b6a78a9419e008efee46c0f7e5dc2b5bac 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json >@@ -11,48 +11,50 @@ > "inherit": false, > "readonly": true, > "idlType": { >- "sequence": false, >+ "type": "attribute-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "unsigned long" >+ "idlType": "unsigned long", >+ "extAttrs": [] > }, > "name": "cardinality", >+ "escapedName": "cardinality", > "extAttrs": [] > }, > { > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "union", >+ "escapedName": "union", > "arguments": [ > { > "optional": false, > "variadic": true, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, >- "name": "ints" >+ "name": "ints", >+ "escapedName": "ints" > } > ], > "extAttrs": [] >@@ -61,34 +63,35 @@ > "type": "operation", > "getter": false, > "setter": false, >- "creator": false, > "deleter": false, >- "legacycaller": false, > "static": false, > "stringifier": false, > "idlType": { >- "sequence": false, >+ "type": "return-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "void" >+ "idlType": "void", >+ "extAttrs": [] > }, > "name": "intersection", >+ "escapedName": "intersection", > "arguments": [ > { > "optional": false, > "variadic": true, >+ "default": null, > "extAttrs": [], > "idlType": { >- "sequence": false, >+ "type": "argument-type", > "generic": null, > "nullable": false, >- "array": false, > "union": false, >- "idlType": "long" >+ "idlType": "long", >+ "extAttrs": [] > }, >- "name": "ints" >+ "name": "ints", >+ "escapedName": "ints" > } > ], > "extAttrs": [] >@@ -97,4 +100,4 @@ > "inheritance": null, > "extAttrs": [] > } >-] >\ No newline at end of file >+] >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/w3c-import.log >index d79ee75337bedf279e72aedbf07cd15a1e740993..0e29fe78388e6038725f1d1802f6b5670685e058 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -15,10 +15,8 @@ None > ------------------------------------------------------------------------ > List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/array.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/callback.json >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/caller.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constants.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json >@@ -28,7 +26,6 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/enum.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception-inheritance.json >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/exception.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/generic.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json >@@ -41,6 +38,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/iterator.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json >@@ -51,13 +49,13 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/record.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json >-/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/serializer.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/static.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/acquire.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/acquire.js >new file mode 100644 >index 0000000000000000000000000000000000000000..6f37dd6083c3c75dfe561727e9a843465e3cfa6c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/acquire.js >@@ -0,0 +1,8 @@ >+"use strict"; >+ >+const { collect } = require("./collect"); >+const fs = require("fs"); >+ >+for (const test of collect("syntax")) { >+ fs.writeFileSync(test.jsonPath, `${JSON.stringify(test.ast, null, 4)}\n`) >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/collect.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/collect.js >new file mode 100644 >index 0000000000000000000000000000000000000000..7e3d9d3bf31267578c0ce2046eec3f5245c573dc >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/collect.js >@@ -0,0 +1,59 @@ >+"use strict"; >+ >+const wp = require("../../lib/webidl2"); >+const pth = require("path"); >+const fs = require("fs"); >+const jdp = require("jsondiffpatch"); >+ >+/** >+ * Collects test items from the specified directory >+ * @param {string} base >+ */ >+function* collect(base, { expectError } = {}) { >+ base = pth.join(__dirname, "..", base); >+ const dir = pth.join(base, "idl"); >+ const idls = fs.readdirSync(dir) >+ .filter(it => (/\.widl$/).test(it)) >+ .map(it => pth.join(dir, it)); >+ >+ for (const path of idls) { >+ const optFile = pth.join(base, "opt", pth.basename(path)).replace(".widl", ".json"); >+ let opt; >+ if (fs.existsSync(optFile)) >+ opt = JSON.parse(fs.readFileSync(optFile, "utf8")); >+ >+ try { >+ const ast = wp.parse(fs.readFileSync(path, "utf8").replace(/\r\n/g, "\n"), opt); >+ yield new TestItem({ ast, path, opt }); >+ } >+ catch (error) { >+ if (expectError) { >+ yield new TestItem({ path, error }); >+ } >+ else { >+ throw error; >+ } >+ } >+ } >+}; >+ >+ >+class TestItem { >+ constructor({ ast, path, error, opt }) { >+ this.ast = ast; >+ this.path = path; >+ this.error = error; >+ this.opt = opt; >+ this.jsonPath = pth.join(pth.dirname(path), "../json", pth.basename(path).replace(".widl", ".json")); >+ } >+ >+ readJSON() { >+ return JSON.parse(fs.readFileSync(this.jsonPath, "utf8")); >+ } >+ >+ diff(target = this.readJSON()) { >+ return jdp.diff(target, this.ast); >+ } >+} >+ >+module.exports.collect = collect; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/w3c-import.log >new file mode 100644 >index 0000000000000000000000000000000000000000..8a5bd4d07a7af0bf31d2e9630d6916794a2d70ac >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/w3c-import.log >@@ -0,0 +1,18 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/acquire.js >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/util/collect.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/w3c-import.log >index b026795ae9999c59b96c5dda9e2c92edb6a19377..47b7cb9fe563070381711768f19836003c2942f5 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -17,3 +17,4 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/invalid.js > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/mocha.opts > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/syntax.js >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/writer.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/web/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/web/w3c-import.log >index b4cf99e1a5a3642f21f9b29d3bf6660dd130a3f7..44bdb9fb5454d1d0401779eed26349ed305fbd6e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/web/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/web/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/writer.js b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/writer.js >new file mode 100644 >index 0000000000000000000000000000000000000000..e84076b4f28ce38cbb41e47681ac97843df0e427 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/test/writer.js >@@ -0,0 +1,23 @@ >+"use strict"; >+ >+const { collect } = require("./util/collect"); >+const wp = require("../lib/webidl2"); >+const writer = require("../lib/writer"); >+const expect = require("expect"); >+const debug = true; >+ >+describe("Rewrite and parses all of the IDLs to produce the same ASTs", () => { >+ for (const test of collect("syntax")) { >+ it(`should produce the same AST for ${test.path}`, () => { >+ try { >+ const diff = test.diff(wp.parse(writer.write(test.ast), test.opt)); >+ if (diff && debug) console.log(JSON.stringify(diff, null, 4)); >+ expect(diff).toBe(undefined); >+ } >+ catch (e) { >+ console.log(e.toString()); >+ throw e; >+ } >+ }); >+ } >+}); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/w3c-import.log >index 7aea1e13eb5ce5a04f457bb09716c009ba7e7ff2..82459ec25789f11afac3b4eb4264967d50198737 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,8 +14,10 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/CHANGELOG.md > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/LICENSE > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/README.md > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/coverage.html > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/index.js >+/LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package-lock.json > /LayoutTests/imported/w3c/web-platform-tests/resources/webidl2/package.json
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189303
:
348908
|
348918
|
348920
|
348922
|
348924
|
348928
|
348939
|
348940
|
348941
|
348944
|
349009
|
349011
|
349013
|
349014
|
349015
|
349017
|
349018
|
349019
|
349025
|
349031
|
349036
|
349037
|
349062
|
349126
|
349129
|
349130
|
349133