Skip to content
Permalink
Browse files
[WebIDL] Drop [Default] WebKit-IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=156955

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline some tests now that a different exception type is thrown
for some of our APIs when passing null.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Drop [Default] WebKit-IDL extended attribute in favor of the standard
WebIDL syntax for parameters' default value.

Here is what it looks like:
[Default=NullString] optional DOMString a -> optional DOMString a = null
[Default=NullString] optional DOMString? a -> optional DOMString? a = null
[Default=Undefined] optional DOMString a -> optional DOMString a = "undefined"
[Default=Undefined] optional DOMString? a -> optional DOMString? a = null
[Default=Undefined] optional long a -> optional long a = 0
[Default=Undefined] optional bool a -> optional bool a = false
[Default=Undefined] optional unrestricted double a -> optional unrestricted double a = NaN
[Default=Undefined] optional unrestricted float a -> optional unrestricted float a = NaN
[Default=Undefined] optional sequence<DOMString> a -> optional sequence<DOMString> a = []

These do not cause any Web-Exposed behavior change. However, when getting
rid of [Default] started passing more parameters by derefence instead of
pointer (as is expected for parameters not marked as nullable). As a result,
I had to mark a few parameters as nullable in the IDL to maintain the
previous behavior. In some cases, the implementation was already throwing
when passing null. In such cases, I have not marked the type as nullable
so that the generated bindings now throw the exception instead of our
implementation code. In some cases, the exception being thrown is now
different. This is why some of the layout tests had to be rebaselined.

No new tests, existing tests have been rebaselined. No significant Web
exposed behavior change is expected from this patch, beside exceptions
type sometimes being different.

* Modules/encryptedmedia/MediaKeys.idl:
* Modules/fetch/FetchRequest.idl:
* Modules/gamepad/deprecated/GamepadList.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/notifications/Notification.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseDefault):
(parseDefaultValue):
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestOverrideBuiltins.idl:
* css/CSSKeyframesRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSMatrix.idl:
* css/WebKitCSSTransformValue.idl:
* dom/ClientRectList.idl:
* dom/Comment.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.h:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.cpp:
(WebCore::Document::adoptNode):
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
(WebCore::Element::setAttributeNodeNS):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::parseAttributeName): Deleted.
* dom/Element.h:
* dom/Element.idl:
* dom/Event.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::setNamedItemNS):
(WebCore::NamedNodeMap::item): Deleted.
* dom/NamedNodeMap.h:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NonElementParentNode.idl:
* dom/OverflowEvent.idl:
* dom/Range.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/UIEvent.idl:
* dom/WheelEvent.idl:
* html/DOMFormData.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::insertAdjacentElement):
(WebCore::contextElementForInsertion): Deleted.
* html/HTMLElement.h:
* html/HTMLElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/ImageData.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/OESVertexArrayObject.idl:
* page/DOMSelection.cpp:
(WebCore::DOMSelection::extend):
(WebCore::DOMSelection::getRangeAt): Deleted.
* page/DOMSelection.h:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/History.idl:
* page/Performance.idl:
* page/WindowTimers.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/StorageEvent.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGDocument.idl:
* svg/SVGElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGGraphicsElement.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* xml/DOMParser.idl:
* xml/XMLSerializer.cpp:
(WebCore::XMLSerializer::serializeToString):
* xml/XMLSerializer.h:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:

LayoutTests:

Rebaseline some tests now that a different exception type is thrown
for some of our APIs when passing null.

* editing/selection/extend-expected.txt:
* fast/dom/Element/attr-param-typechecking-expected.txt:
* fast/dom/NamedNodeMap-setNamedItem-crash-expected.txt:
* fast/dynamic/insertAdjacentElement-expected.txt:

Canonical link: https://commits.webkit.org/175071@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Apr 24, 2016
1 parent 085402e commit 8c7d8ccf45fa9dee315b2ca36e45f0d60f2b27d4
Showing with 1,367 additions and 823 deletions.
  1. +15 −0 LayoutTests/ChangeLog
  2. +2 −2 LayoutTests/editing/selection/extend-expected.txt
  3. +12 −12 LayoutTests/fast/dom/Element/attr-param-typechecking-expected.txt
  4. +1 −1 LayoutTests/fast/dom/NamedNodeMap-setNamedItem-crash-expected.txt
  5. +1 −1 LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt
  6. +13 −0 LayoutTests/imported/w3c/ChangeLog
  7. +8 −14 LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
  8. +3 −9 LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
  9. +3 −9 LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
  10. +176 −0 Source/WebCore/ChangeLog
  11. +3 −2 Source/WebCore/Modules/encryptedmedia/MediaKeys.idl
  12. +2 −2 Source/WebCore/Modules/fetch/FetchRequest.idl
  13. +1 −1 Source/WebCore/Modules/gamepad/deprecated/GamepadList.idl
  14. +2 −2 Source/WebCore/Modules/indexeddb/IDBDatabase.idl
  15. +2 −1 Source/WebCore/Modules/mediastream/RTCStatsResponse.idl
  16. +1 −1 Source/WebCore/Modules/notifications/Notification.idl
  17. +1 −1 Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl
  18. +3 −3 Source/WebCore/Modules/webaudio/AudioNode.idl
  19. +1 −1 Source/WebCore/Modules/websockets/WebSocket.idl
  20. +0 −1 Source/WebCore/bindings/scripts/CodeGenerator.pm
  21. +22 −8 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
  22. +0 −1 Source/WebCore/bindings/scripts/IDLAttributes.txt
  23. +6 −0 Source/WebCore/bindings/scripts/IDLParser.pm
  24. +60 −4 Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
  25. +64 −4 Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
  26. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
  27. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
  28. +134 −29 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
  29. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
  30. +8 −2 Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
  31. +40 −4 Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
  32. +1 −1 Source/WebCore/bindings/scripts/test/TestInterface.idl
  33. +1 −1 Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl
  34. +9 −2 Source/WebCore/bindings/scripts/test/TestObj.idl
  35. +1 −1 Source/WebCore/bindings/scripts/test/TestOverrideBuiltins.idl
  36. +5 −4 Source/WebCore/css/CSSKeyframesRule.idl
  37. +3 −3 Source/WebCore/css/CSSMediaRule.idl
  38. +7 −5 Source/WebCore/css/CSSPrimitiveValue.idl
  39. +1 −1 Source/WebCore/css/CSSRuleList.idl
  40. +14 −10 Source/WebCore/css/CSSStyleDeclaration.idl
  41. +8 −6 Source/WebCore/css/CSSStyleSheet.idl
  42. +4 −3 Source/WebCore/css/CSSSupportsRule.idl
  43. +1 −1 Source/WebCore/css/CSSValueList.idl
  44. +5 −3 Source/WebCore/css/MediaList.idl
  45. +2 −2 Source/WebCore/css/MediaQueryList.idl
  46. +1 −1 Source/WebCore/css/MediaQueryListListener.idl
  47. +3 −1 Source/WebCore/css/StyleMedia.idl
  48. +1 −1 Source/WebCore/css/StyleSheetList.idl
  49. +1 −1 Source/WebCore/css/WebKitCSSFilterValue.idl
  50. +20 −19 Source/WebCore/css/WebKitCSSMatrix.idl
  51. +1 −1 Source/WebCore/css/WebKitCSSTransformValue.idl
  52. +1 −1 Source/WebCore/dom/ClientRectList.idl
  53. +1 −1 Source/WebCore/dom/Comment.idl
  54. +6 −5 Source/WebCore/dom/CompositionEvent.idl
  55. +1 −1 Source/WebCore/dom/CustomEvent.h
  56. +2 −1 Source/WebCore/dom/CustomEvent.idl
  57. +9 −6 Source/WebCore/dom/DOMImplementation.idl
  58. +4 −2 Source/WebCore/dom/DOMStringList.idl
  59. +1 −1 Source/WebCore/dom/DataTransferItem.idl
  60. +4 −3 Source/WebCore/dom/DataTransferItemList.idl
  61. +8 −7 Source/WebCore/dom/DeviceMotionEvent.idl
  62. +15 −15 Source/WebCore/dom/DeviceOrientationEvent.idl
  63. +1 −1 Source/WebCore/dom/Document.cpp
  64. +62 −50 Source/WebCore/dom/Document.idl
  65. +35 −49 Source/WebCore/dom/Element.cpp
  66. +3 −3 Source/WebCore/dom/Element.h
  67. +33 −19 Source/WebCore/dom/Element.idl
  68. +5 −3 Source/WebCore/dom/Event.idl
  69. +6 −5 Source/WebCore/dom/HashChangeEvent.idl
  70. +45 −43 Source/WebCore/dom/KeyboardEvent.idl
  71. +25 −24 Source/WebCore/dom/MessageEvent.idl
  72. +16 −15 Source/WebCore/dom/MouseEvent.idl
  73. +9 −8 Source/WebCore/dom/MutationEvent.idl
  74. +3 −8 Source/WebCore/dom/NamedNodeMap.cpp
  75. +2 −2 Source/WebCore/dom/NamedNodeMap.h
  76. +9 −7 Source/WebCore/dom/NamedNodeMap.idl
  77. +9 −8 Source/WebCore/dom/Node.idl
  78. +2 −2 Source/WebCore/dom/NodeFilter.idl
  79. +2 −1 Source/WebCore/dom/NonElementParentNode.idl
  80. +3 −3 Source/WebCore/dom/OverflowEvent.idl
  81. +10 −10 Source/WebCore/dom/Range.idl
  82. +4 −2 Source/WebCore/dom/Text.idl
  83. +6 −5 Source/WebCore/dom/TextEvent.idl
  84. +14 −13 Source/WebCore/dom/TouchEvent.idl
  85. +6 −5 Source/WebCore/dom/UIEvent.idl
  86. +22 −22 Source/WebCore/dom/WheelEvent.idl
  87. +3 −3 Source/WebCore/html/DOMFormData.idl
  88. +1 −1 Source/WebCore/html/HTMLAllCollection.idl
  89. +1 −1 Source/WebCore/html/HTMLAudioElement.idl
  90. +2 −2 Source/WebCore/html/HTMLCanvasElement.idl
  91. +7 −5 Source/WebCore/html/HTMLCollection.idl
  92. +2 −2 Source/WebCore/html/HTMLDocument.idl
  93. +2 −8 Source/WebCore/html/HTMLElement.cpp
  94. +1 −1 Source/WebCore/html/HTMLElement.h
  95. +6 −4 Source/WebCore/html/HTMLElement.idl
  96. +2 −2 Source/WebCore/html/HTMLFormControlsCollection.idl
  97. +3 −3 Source/WebCore/html/HTMLInputElement.idl
  98. +6 −4 Source/WebCore/html/HTMLMediaElement.idl
  99. +1 −1 Source/WebCore/html/HTMLOptionElement.idl
  100. +6 −5 Source/WebCore/html/HTMLOptionsCollection.idl
  101. +6 −4 Source/WebCore/html/HTMLSelectElement.idl
  102. +1 −1 Source/WebCore/html/HTMLTableElement.idl
  103. +1 −1 Source/WebCore/html/HTMLTableRowElement.idl
  104. +1 −1 Source/WebCore/html/HTMLTableSectionElement.idl
  105. +3 −3 Source/WebCore/html/HTMLTextAreaElement.idl
  106. +1 −4 Source/WebCore/html/ImageData.idl
  107. +2 −4 Source/WebCore/html/canvas/CanvasGradient.idl
  108. +13 −8 Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
  109. +30 −30 Source/WebCore/html/canvas/DOMPath.idl
  110. +3 −3 Source/WebCore/html/canvas/OESVertexArrayObject.idl
  111. +4 −9 Source/WebCore/page/DOMSelection.cpp
  112. +1 −1 Source/WebCore/page/DOMSelection.h
  113. +10 −9 Source/WebCore/page/DOMSelection.idl
  114. +26 −24 Source/WebCore/page/DOMWindow.idl
  115. +1 −1 Source/WebCore/page/History.idl
  116. +4 −4 Source/WebCore/page/Performance.idl
  117. +4 −4 Source/WebCore/page/WindowTimers.idl
  118. +4 −2 Source/WebCore/plugins/DOMMimeTypeArray.idl
  119. +4 −2 Source/WebCore/plugins/DOMPlugin.idl
  120. +6 −3 Source/WebCore/plugins/DOMPluginArray.idl
  121. +10 −9 Source/WebCore/storage/StorageEvent.idl
  122. +2 −2 Source/WebCore/svg/SVGAnimationElement.idl
  123. +2 −1 Source/WebCore/svg/SVGDocument.idl
  124. +2 −1 Source/WebCore/svg/SVGElement.idl
  125. +2 −2 Source/WebCore/svg/SVGFEDropShadowElement.idl
  126. +2 −2 Source/WebCore/svg/SVGFEGaussianBlurElement.idl
  127. +2 −2 Source/WebCore/svg/SVGFEMorphologyElement.idl
  128. +2 −2 Source/WebCore/svg/SVGFilterElement.idl
  129. +1 −1 Source/WebCore/svg/SVGGraphicsElement.idl
  130. +1 −1 Source/WebCore/svg/SVGMarkerElement.idl
  131. +60 −60 Source/WebCore/svg/SVGPathElement.idl
  132. +10 −9 Source/WebCore/svg/SVGSVGElement.idl
  133. +2 −1 Source/WebCore/svg/SVGTests.idl
  134. +8 −9 Source/WebCore/svg/SVGTextContentElement.idl
  135. +2 −2 Source/WebCore/xml/DOMParser.idl
  136. +2 −6 Source/WebCore/xml/XMLSerializer.cpp
  137. +1 −1 Source/WebCore/xml/XMLSerializer.h
  138. +1 −1 Source/WebCore/xml/XMLSerializer.idl
  139. +10 −8 Source/WebCore/xml/XPathEvaluator.idl
  140. +1 −1 Source/WebCore/xml/XPathExpression.idl
  141. +2 −1 Source/WebCore/xml/XPathNSResolver.idl
  142. +1 −1 Source/WebCore/xml/XPathResult.idl
  143. +3 −3 Source/WebCore/xml/XSLTProcessor.idl
  144. +9 −0 Tools/ChangeLog
  145. +1 −1 Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
@@ -1,3 +1,18 @@
2016-04-23 Chris Dumez <cdumez@apple.com>

[WebIDL] Drop [Default] WebKit-IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=156955

Reviewed by Darin Adler.

Rebaseline some tests now that a different exception type is thrown
for some of our APIs when passing null.

* editing/selection/extend-expected.txt:
* fast/dom/Element/attr-param-typechecking-expected.txt:
* fast/dom/NamedNodeMap-setNamedItem-crash-expected.txt:
* fast/dynamic/insertAdjacentElement-expected.txt:

2016-04-24 Filip Pizlo <fpizlo@apple.com> and Andy VanWagoner <thetalecrafter@gmail.com>

[INTL] Implement String.prototype.localeCompare in ECMA-402
@@ -4,5 +4,5 @@ Success: s.extend(span2.firstChild, 4) raised Error: IndexSizeError: DOM Excepti
Success: s.extend(span2.firstChild, -1) raised Error: IndexSizeError: DOM Exception 1.
Success: window.getSelection() is b.
Success: window.getSelection() is arbaz.
Success: s.extend() raised Error: TypeMismatchError: DOM Exception 17.
Success: s.extend(null, 0) raised Error: TypeMismatchError: DOM Exception 17.
Success: s.extend() raised TypeError: Type error.
Success: s.extend(null, 0) raised TypeError: Type error.
@@ -3,18 +3,18 @@ This test checks whether passing wrong types to setAttributeNode causes a crash.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS element.setAttributeNode("style"); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode(null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode(undefined); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode(new Object); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode("style"); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode(null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode(undefined); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode(new Object); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS("style"); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS(null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS(undefined); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS(new Object); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode("style"); threw exception TypeError: Type error.
PASS element.setAttributeNode(null); threw exception TypeError: Type error.
PASS element.setAttributeNode(undefined); threw exception TypeError: Type error.
PASS element.setAttributeNode(new Object); threw exception TypeError: Type error.
PASS element.removeAttributeNode("style"); threw exception TypeError: Type error.
PASS element.removeAttributeNode(null); threw exception TypeError: Type error.
PASS element.removeAttributeNode(undefined); threw exception TypeError: Type error.
PASS element.removeAttributeNode(new Object); threw exception TypeError: Type error.
PASS element.setAttributeNodeNS("style"); threw exception TypeError: Type error.
PASS element.setAttributeNodeNS(null); threw exception TypeError: Type error.
PASS element.setAttributeNodeNS(undefined); threw exception TypeError: Type error.
PASS element.setAttributeNodeNS(new Object); threw exception TypeError: Type error.
PASS successfullyParsed is true

TEST COMPLETE
@@ -1,2 +1,2 @@
CONSOLE MESSAGE: line 7: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
CONSOLE MESSAGE: line 7: TypeError: Type error
This passes if it does not crash. (see https://bugs.webkit.org/show_bug.cgi?id=18958)
@@ -1,5 +1,5 @@
Caught expected exception: Error: NotSupportedError: DOM Exception 9
Caught expected exception: Error: TypeMismatchError: DOM Exception 17
Caught expected exception: TypeError: Type error
1 (black) 2 (green) 3 (green) 4 (black)

PASS
@@ -1,3 +1,16 @@
2016-04-23 Chris Dumez <cdumez@apple.com>

[WebIDL] Drop [Default] WebKit-IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=156955

Reviewed by Darin Adler.

Rebaseline some tests now that a different exception type is thrown
for some of our APIs when passing null.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

2016-04-21 Chris Dumez <cdumez@apple.com>

Drop [UsePointersEvenForNonNullableObjectArguments] from Document
@@ -716,9 +716,9 @@ PASS Element interface: operation hasAttribute(DOMString)
FAIL Element interface: operation hasAttributeNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
FAIL Element interface: operation getAttributeNode(DOMString) assert_equals: property has wrong .length expected 1 but got 0
FAIL Element interface: operation getAttributeNodeNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
FAIL Element interface: operation setAttributeNode(Attr) assert_equals: property has wrong .length expected 1 but got 0
FAIL Element interface: operation setAttributeNodeNS(Attr) assert_equals: property has wrong .length expected 1 but got 0
FAIL Element interface: operation removeAttributeNode(Attr) assert_equals: property has wrong .length expected 1 but got 0
PASS Element interface: operation setAttributeNode(Attr)
PASS Element interface: operation setAttributeNodeNS(Attr)
PASS Element interface: operation removeAttributeNode(Attr)
PASS Element interface: operation closest(DOMString)
PASS Element interface: operation matches(DOMString)
FAIL Element interface: operation getElementsByTagName(DOMString) assert_equals: property has wrong .length expected 1 but got 0
@@ -788,17 +788,11 @@ FAIL Element interface: calling getAttributeNodeNS(DOMString,DOMString) on eleme
fn.apply(obj, args);
}" did not throw
PASS Element interface: element must inherit property "setAttributeNode" with the proper type (19)
FAIL Element interface: calling setAttributeNode(Attr) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling setAttributeNode(Attr) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "setAttributeNodeNS" with the proper type (20)
FAIL Element interface: calling setAttributeNodeNS(Attr) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling setAttributeNodeNS(Attr) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "removeAttributeNode" with the proper type (21)
FAIL Element interface: calling removeAttributeNode(Attr) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling removeAttributeNode(Attr) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "closest" with the proper type (22)
PASS Element interface: calling closest(DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "matches" with the proper type (23)
@@ -928,8 +922,8 @@ PASS NamedNodeMap interface: attribute length
FAIL NamedNodeMap interface: operation item(unsigned long) assert_equals: property has wrong .length expected 1 but got 0
FAIL NamedNodeMap interface: operation getNamedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
FAIL NamedNodeMap interface: operation getNamedItemNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
FAIL NamedNodeMap interface: operation setNamedItem(Attr) assert_equals: property has wrong .length expected 1 but got 0
FAIL NamedNodeMap interface: operation setNamedItemNS(Attr) assert_equals: property has wrong .length expected 1 but got 0
PASS NamedNodeMap interface: operation setNamedItem(Attr)
PASS NamedNodeMap interface: operation setNamedItemNS(Attr)
FAIL NamedNodeMap interface: operation removeNamedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
FAIL NamedNodeMap interface: operation removeNamedItemNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
FAIL Attr interface: existence and properties of interface object assert_equals: prototype of self's property "Attr" is not Function.prototype expected function "function () {
@@ -1084,17 +1084,11 @@ FAIL Element interface: calling getAttributeNodeNS(DOMString,DOMString) on docum
fn.apply(obj, args);
}" did not throw
PASS Element interface: document.createElement("noscript") must inherit property "setAttributeNode" with the proper type (19)
FAIL Element interface: calling setAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling setAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "setAttributeNodeNS" with the proper type (20)
FAIL Element interface: calling setAttributeNodeNS(Attr) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling setAttributeNodeNS(Attr) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "removeAttributeNode" with the proper type (21)
FAIL Element interface: calling removeAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling removeAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "closest" with the proper type (22)
PASS Element interface: calling closest(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "matches" with the proper type (23)
@@ -1084,17 +1084,11 @@ FAIL Element interface: calling getAttributeNodeNS(DOMString,DOMString) on docum
fn.apply(obj, args);
}" did not throw
PASS Element interface: document.createElement("noscript") must inherit property "setAttributeNode" with the proper type (19)
FAIL Element interface: calling setAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling setAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "setAttributeNodeNS" with the proper type (20)
FAIL Element interface: calling setAttributeNodeNS(Attr) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling setAttributeNodeNS(Attr) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "removeAttributeNode" with the proper type (21)
FAIL Element interface: calling removeAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
fn.apply(obj, args);
}" threw object "Error: TypeMismatchError: DOM Exception 17" ("TypeMismatchError") expected object "TypeError" ("TypeError")
PASS Element interface: calling removeAttributeNode(Attr) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "closest" with the proper type (22)
PASS Element interface: calling closest(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "matches" with the proper type (23)

0 comments on commit 8c7d8cc

Please sign in to comment.