Changeset 203539 in webkit
- Timestamp:
- Jul 21, 2016, 4:52:35 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/getElementsByClassName/dumpHTMLCollection-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/dom/getElementsByClassName/dumpHTMLCollection.html (modified) (2 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (modified) (3 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (modified) (7 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.idl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203538 r203539 1 2016-07-21 Chris Dumez <cdumez@apple.com> 2 3 Make parameters to Document.getElementsBy*() operations mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160050 5 6 Reviewed by Daniel Bates. 7 8 Drop cases that were calling the operation without parameter. 9 10 * fast/dom/getElementsByClassName/dumpHTMLCollection-expected.txt: 11 * fast/dom/getElementsByClassName/dumpHTMLCollection.html: 12 1 13 2016-07-21 Nan Wang <n_wang@apple.com> 2 14 -
trunk/LayoutTests/fast/dom/getElementsByClassName/dumpHTMLCollection-expected.txt
r188735 r203539 14 14 length: 0 15 15 length: 0 16 length: 017 16 [object HTMLDivElement], length: 1 18 17 [object HTMLDivElement], [object HTMLParagraphElement], length: 2 … … 23 22 length: 0 24 23 length: 0 25 length: 026 24 -
trunk/LayoutTests/fast/dom/getElementsByClassName/dumpHTMLCollection.html
r188735 r203539 34 34 log(document.getElementsByClassName("").dump()); 35 35 log(document.getElementsByClassName("onetwo").dump()); 36 log(document.getElementsByClassName().dump());37 36 log(document.getElementsByClassName(null).dump()); 38 37 log(document.getElementsByClassName(undefined).dump()); … … 44 43 log(elm.getElementsByClassName("").dump()); 45 44 log(elm.getElementsByClassName("onetwo").dump()); 46 log(elm.getElementsByClassName().dump());47 45 log(elm.getElementsByClassName(null).dump()); 48 46 log(elm.getElementsByClassName(undefined).dump()); -
trunk/LayoutTests/imported/w3c/ChangeLog
r203535 r203539 1 2016-07-21 Chris Dumez <cdumez@apple.com> 2 3 Make parameters to Document.getElementsBy*() operations mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160050 5 6 Reviewed by Daniel Bates. 7 8 Rebaseline several W3C tests now that more checks are passing. 9 10 * web-platform-tests/dom/interfaces-expected.txt: 11 * web-platform-tests/html/dom/interfaces-expected.txt: 12 1 13 2016-07-21 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
r203535 r203539 256 256 PASS Document interface: attribute doctype 257 257 PASS Document interface: attribute documentElement 258 FAIL Document interface: operation getElementsByTagName(DOMString) assert_equals: property has wrong .length expected 1 but got 0 259 FAIL Document interface: operation getElementsByTagNameNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0 260 FAIL Document interface: operation getElementsByClassName(DOMString) assert_equals: property has wrong .length expected 1 but got 0 258 PASS Document interface: operation getElementsByTagName(DOMString) 259 PASS Document interface: operation getElementsByTagNameNS(DOMString,DOMString) 260 PASS Document interface: operation getElementsByClassName(DOMString) 261 261 PASS Document interface: operation createElement(DOMString,ElementCreationOptions) 262 262 PASS Document interface: operation createElementNS(DOMString,DOMString,ElementCreationOptions) … … 296 296 PASS Document interface: new Document() must inherit property "documentElement" with the proper type (10) 297 297 PASS Document interface: new Document() must inherit property "getElementsByTagName" with the proper type (11) 298 FAIL Document interface: calling getElementsByTagName(DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 299 fn.apply(obj, args); 300 }" did not throw 298 PASS Document interface: calling getElementsByTagName(DOMString) on new Document() with too few arguments must throw TypeError 301 299 PASS Document interface: new Document() must inherit property "getElementsByTagNameNS" with the proper type (12) 302 FAIL Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 303 fn.apply(obj, args); 304 }" did not throw 300 PASS Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on new Document() with too few arguments must throw TypeError 305 301 PASS Document interface: new Document() must inherit property "getElementsByClassName" with the proper type (13) 306 FAIL Document interface: calling getElementsByClassName(DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 307 fn.apply(obj, args); 308 }" did not throw 302 PASS Document interface: calling getElementsByClassName(DOMString) on new Document() with too few arguments must throw TypeError 309 303 PASS Document interface: new Document() must inherit property "createElement" with the proper type (14) 310 304 PASS Document interface: calling createElement(DOMString,ElementCreationOptions) on new Document() with too few arguments must throw TypeError … … 450 444 PASS Document interface: xmlDoc must inherit property "documentElement" with the proper type (10) 451 445 PASS Document interface: xmlDoc must inherit property "getElementsByTagName" with the proper type (11) 452 FAIL Document interface: calling getElementsByTagName(DOMString) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 453 fn.apply(obj, args); 454 }" did not throw 446 PASS Document interface: calling getElementsByTagName(DOMString) on xmlDoc with too few arguments must throw TypeError 455 447 PASS Document interface: xmlDoc must inherit property "getElementsByTagNameNS" with the proper type (12) 456 FAIL Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 457 fn.apply(obj, args); 458 }" did not throw 448 PASS Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on xmlDoc with too few arguments must throw TypeError 459 449 PASS Document interface: xmlDoc must inherit property "getElementsByClassName" with the proper type (13) 460 FAIL Document interface: calling getElementsByClassName(DOMString) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 461 fn.apply(obj, args); 462 }" did not throw 450 PASS Document interface: calling getElementsByClassName(DOMString) on xmlDoc with too few arguments must throw TypeError 463 451 PASS Document interface: xmlDoc must inherit property "createElement" with the proper type (14) 464 452 PASS Document interface: calling createElement(DOMString,ElementCreationOptions) on xmlDoc with too few arguments must throw TypeError -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r203535 r203539 29 29 PASS Document interface: attribute forms 30 30 FAIL Document interface: attribute scripts assert_true: The prototype object must have a property "scripts" expected true got false 31 FAIL Document interface: operation getElementsByName(DOMString) assert_equals: property has wrong .length expected 1 but got 0 31 PASS Document interface: operation getElementsByName(DOMString) 32 32 FAIL Document interface: attribute cssElementMap assert_true: The prototype object must have a property "cssElementMap" expected true got false 33 33 PASS Document interface: attribute currentScript … … 136 136 PASS Document interface: iframe.contentDocument must inherit property "documentElement" with the proper type (10) 137 137 PASS Document interface: iframe.contentDocument must inherit property "getElementsByTagName" with the proper type (11) 138 FAIL Document interface: calling getElementsByTagName(DOMString) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 139 fn.apply(obj, args); 140 }" did not throw 138 PASS Document interface: calling getElementsByTagName(DOMString) on iframe.contentDocument with too few arguments must throw TypeError 141 139 PASS Document interface: iframe.contentDocument must inherit property "getElementsByTagNameNS" with the proper type (12) 142 FAIL Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 143 fn.apply(obj, args); 144 }" did not throw 140 PASS Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on iframe.contentDocument with too few arguments must throw TypeError 145 141 PASS Document interface: iframe.contentDocument must inherit property "getElementsByClassName" with the proper type (13) 146 FAIL Document interface: calling getElementsByClassName(DOMString) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 147 fn.apply(obj, args); 148 }" did not throw 142 PASS Document interface: calling getElementsByClassName(DOMString) on iframe.contentDocument with too few arguments must throw TypeError 149 143 PASS Document interface: iframe.contentDocument must inherit property "createElement" with the proper type (14) 150 144 PASS Document interface: calling createElement(DOMString) on iframe.contentDocument with too few arguments must throw TypeError … … 199 193 PASS Document interface: iframe.contentDocument must inherit property "scripts" with the proper type (50) 200 194 PASS Document interface: iframe.contentDocument must inherit property "getElementsByName" with the proper type (51) 201 FAIL Document interface: calling getElementsByName(DOMString) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 202 fn.apply(obj, args); 203 }" did not throw 195 PASS Document interface: calling getElementsByName(DOMString) on iframe.contentDocument with too few arguments must throw TypeError 204 196 FAIL Document interface: iframe.contentDocument must inherit property "cssElementMap" with the proper type (52) assert_inherits: property "cssElementMap" not found in prototype chain 205 197 PASS Document interface: iframe.contentDocument must inherit property "currentScript" with the proper type (53) … … 426 418 PASS Document interface: new Document() must inherit property "documentElement" with the proper type (10) 427 419 PASS Document interface: new Document() must inherit property "getElementsByTagName" with the proper type (11) 428 FAIL Document interface: calling getElementsByTagName(DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 429 fn.apply(obj, args); 430 }" did not throw 420 PASS Document interface: calling getElementsByTagName(DOMString) on new Document() with too few arguments must throw TypeError 431 421 PASS Document interface: new Document() must inherit property "getElementsByTagNameNS" with the proper type (12) 432 FAIL Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 433 fn.apply(obj, args); 434 }" did not throw 422 PASS Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on new Document() with too few arguments must throw TypeError 435 423 PASS Document interface: new Document() must inherit property "getElementsByClassName" with the proper type (13) 436 FAIL Document interface: calling getElementsByClassName(DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 437 fn.apply(obj, args); 438 }" did not throw 424 PASS Document interface: calling getElementsByClassName(DOMString) on new Document() with too few arguments must throw TypeError 439 425 PASS Document interface: new Document() must inherit property "createElement" with the proper type (14) 440 426 PASS Document interface: calling createElement(DOMString) on new Document() with too few arguments must throw TypeError … … 489 475 FAIL Document interface: new Document() must inherit property "scripts" with the proper type (50) assert_inherits: property "scripts" not found in prototype chain 490 476 PASS Document interface: new Document() must inherit property "getElementsByName" with the proper type (51) 491 FAIL Document interface: calling getElementsByName(DOMString) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 492 fn.apply(obj, args); 493 }" did not throw 477 PASS Document interface: calling getElementsByName(DOMString) on new Document() with too few arguments must throw TypeError 494 478 FAIL Document interface: new Document() must inherit property "cssElementMap" with the proper type (52) assert_inherits: property "cssElementMap" not found in prototype chain 495 479 PASS Document interface: new Document() must inherit property "currentScript" with the proper type (53) … … 719 703 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "documentElement" with the proper type (10) 720 704 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "getElementsByTagName" with the proper type (11) 721 FAIL Document interface: calling getElementsByTagName(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 722 fn.apply(obj, args); 723 }" did not throw 705 PASS Document interface: calling getElementsByTagName(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 724 706 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "getElementsByTagNameNS" with the proper type (12) 725 FAIL Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 726 fn.apply(obj, args); 727 }" did not throw 707 PASS Document interface: calling getElementsByTagNameNS(DOMString,DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 728 708 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "getElementsByClassName" with the proper type (13) 729 FAIL Document interface: calling getElementsByClassName(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 730 fn.apply(obj, args); 731 }" did not throw 709 PASS Document interface: calling getElementsByClassName(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 732 710 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "createElement" with the proper type (14) 733 711 PASS Document interface: calling createElement(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError … … 782 760 FAIL Document interface: document.implementation.createDocument(null, "", null) must inherit property "scripts" with the proper type (50) assert_inherits: property "scripts" not found in prototype chain 783 761 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "getElementsByName" with the proper type (51) 784 FAIL Document interface: calling getElementsByName(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 785 fn.apply(obj, args); 786 }" did not throw 762 PASS Document interface: calling getElementsByName(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 787 763 FAIL Document interface: document.implementation.createDocument(null, "", null) must inherit property "cssElementMap" with the proper type (52) assert_inherits: property "cssElementMap" not found in prototype chain 788 764 PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "currentScript" with the proper type (53) -
trunk/Source/WebCore/ChangeLog
r203538 r203539 1 2016-07-21 Chris Dumez <cdumez@apple.com> 2 3 Make parameters to Document.getElementsBy*() operations mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160050 5 6 Reviewed by Daniel Bates. 7 8 Make parameters to Document.getElementsBy*() operations mandatory to 9 match the specification: 10 - https://dom.spec.whatwg.org/#interface-document 11 12 Firefox and Chrome agree with the specification so the compatibility 13 risk should be low. 14 15 It makes very little sense to call these operations without parameter, 16 especially considering WebKit uses the string "undefined" if the 17 parameter is omitted. 18 19 No new tests, rebaselined existing tests. 20 21 * dom/Document.idl: 22 1 23 2016-07-21 Nan Wang <n_wang@apple.com> 2 24 -
trunk/Source/WebCore/dom/Document.idl
r203535 r203539 49 49 [ImplementedAs=getElementsByTagNameForObjC] NodeList getElementsByTagName(optional DOMString tagname); 50 50 #else 51 // FIXME: Using "undefined" as default parameter value is wrong. 52 HTMLCollection getElementsByTagName(optional DOMString tagname = "undefined"); 51 HTMLCollection getElementsByTagName(DOMString tagname); 53 52 #endif 54 53 … … 63 62 [ObjCLegacyUnnamedParameters, ImplementedAs=getElementsByTagNameNSForObjC] NodeList getElementsByTagNameNS(optional DOMString namespaceURI, optional DOMString localName); 64 63 #else 65 // FIXME: Using "undefined" as default parameter value is wrong. 66 HTMLCollection getElementsByTagNameNS(optional DOMString? namespaceURI = null, optional DOMString localName = "undefined"); 64 HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName); 67 65 #endif 68 66 … … 187 185 readonly attribute DOMString lastModified; 188 186 189 // FIXME: Using "undefined" as default parameter value is wrong. 190 NodeList getElementsByName([AtomicString] optional DOMString elementName = "undefined"); 187 NodeList getElementsByName([AtomicString] DOMString elementName); 191 188 192 189 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT … … 245 242 [ImplementedAs=getElementsByClassNameForObjC] NodeList getElementsByClassName(optional DOMString classNames); 246 243 #else 247 // FIXME: Using "undefined" as default parameter value is wrong. 248 HTMLCollection getElementsByClassName(optional DOMString classNames = "undefined"); 244 HTMLCollection getElementsByClassName(DOMString classNames); 249 245 #endif 250 246
Note:
See TracChangeset
for help on using the changeset viewer.