Diff
Modified: trunk/LayoutTests/ChangeLog (203545 => 203546)
--- trunk/LayoutTests/ChangeLog 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/ChangeLog 2016-07-22 02:21:23 UTC (rev 203546)
@@ -1,3 +1,22 @@
+2016-07-21 Chris Dumez <[email protected]>
+
+ Make parameters mandatory for attribute-related API on Element
+ https://bugs.webkit.org/show_bug.cgi?id=160059
+
+ Reviewed by Ryosuke Niwa.
+
+ Update existing layout tests to reflect the behavior change.
+
+ * fast/dom/Element/script-tests/setAttributeNS-namespace-err.js:
+ * fast/dom/Element/setAttributeNS-namespace-err-expected.txt:
+ * fast/dom/HTMLHrElement/hr-color-noshade-attribute.html:
+ * fast/dom/attribute-downcast-right.html:
+ * fast/images/style-access-during-imageChanged-style-freeze.html:
+ * fast/selectors/read-only-read-write-input-basics.html:
+ * fast/selectors/read-only-read-write-textarea-basics.html:
+ * media/video-playsinline-expected.txt:
+ * media/video-playsinline.html:
+
2016-07-21 Dean Jackson <[email protected]>
REGRESSION (r202927): The internal size of the ImageBuffer is scaled twice by the context scaleFactor
Modified: trunk/LayoutTests/fast/dom/Element/script-tests/setAttributeNS-namespace-err.js (203545 => 203546)
--- trunk/LayoutTests/fast/dom/Element/script-tests/setAttributeNS-namespace-err.js 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/dom/Element/script-tests/setAttributeNS-namespace-err.js 2016-07-22 02:21:23 UTC (rev 203546)
@@ -124,10 +124,9 @@
}
}
-// Moz throws a "Not enough arguments" exception in these, we don't:
var element = document.createElement("div");
-shouldBeUndefined("element.setAttributeNS()");
-shouldBeUndefined("element.setAttributeNS(\"http://www.example.com\")");
-shouldBeUndefined("element.setAttributeNS(\"http://www.example.com\", \"foo\")");
+shouldThrow("element.setAttributeNS()");
+shouldThrow("element.setAttributeNS(\"http://www.example.com\")");
+shouldThrow("element.setAttributeNS(\"http://www.example.com\", \"foo\")");
runNSTests();
Modified: trunk/LayoutTests/fast/dom/Element/setAttributeNS-namespace-err-expected.txt (203545 => 203546)
--- trunk/LayoutTests/fast/dom/Element/setAttributeNS-namespace-err-expected.txt 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/dom/Element/setAttributeNS-namespace-err-expected.txt 2016-07-22 02:21:23 UTC (rev 203546)
@@ -3,9 +3,9 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS element.setAttributeNS() is undefined.
-PASS element.setAttributeNS("http://www.example.com") is undefined.
-PASS element.setAttributeNS("http://www.example.com", "foo") is undefined.
+PASS element.setAttributeNS() threw exception TypeError: Not enough arguments.
+PASS element.setAttributeNS("http://www.example.com") threw exception TypeError: Not enough arguments.
+PASS element.setAttributeNS("http://www.example.com", "foo") threw exception TypeError: Not enough arguments.
PASS element.setAttributeNS(undefined, undefined, 'value')
PASS element.setAttributeNS(null, undefined, 'value')
FAIL element.setAttributeNS(undefined, null, 'value')
Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html (203545 => 203546)
--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -28,7 +28,7 @@
var blob = new Blob([string], {type: "text/html"});
var link = document.getElementById("blob-url");
link.href = ""
- link.setAttribute('download');
+ link.setAttribute('download', '');
click(link);
}
runTest();
Modified: trunk/LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html (203545 => 203546)
--- trunk/LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -13,12 +13,12 @@
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement3'),null).getPropertyValue('background-color')","rgb(0, 0, 0)");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement4'),null).getPropertyValue('border-color')","rgb(128, 128, 128)");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement4'),null).getPropertyValue('background-color')","rgb(128, 128, 128)");
- document.getElementById('hrElement5').setAttribute("color","yellow");
- document.getElementById('hrElement5').setAttribute("noshade");
+ document.getElementById('hrElement5').setAttribute("color", "yellow");
+ document.getElementById('hrElement5').setAttribute("noshade", "");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement5'),null).getPropertyValue('border-color')","rgb(255, 255, 0)");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement5'),null).getPropertyValue('background-color')","rgb(255, 255, 0)");
- document.getElementById('hrElement6').setAttribute("noshade");
- document.getElementById('hrElement6').setAttribute("color","green");
+ document.getElementById('hrElement6').setAttribute("noshade", "");
+ document.getElementById('hrElement6').setAttribute("color", "green");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement6'),null).getPropertyValue('border-color')","rgb(0, 128, 0)");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('hrElement6'),null).getPropertyValue('background-color')","rgb(0, 128, 0)");
}
@@ -32,4 +32,4 @@
<hr id="hrElement5">
<hr id="hrElement6">
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/fast/dom/attribute-downcast-right.html (203545 => 203546)
--- trunk/LayoutTests/fast/dom/attribute-downcast-right.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/dom/attribute-downcast-right.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -4,8 +4,8 @@
var oElement = document.createElement("s")
var oElementNS = document.createElementNS(null, "test");
-oElementNS.setAttributeNS();
-var oAttributeNS = oElementNS.getAttributeNodeNS();
+oElementNS.setAttributeNS(null, "test", "value");
+var oAttributeNS = oElementNS.getAttributeNodeNS(null, "test");
var oAttributeNSClone = oAttributeNS.cloneNode();
oElement.setAttributeNode(oAttributeNSClone);
</SCRIPT>
Modified: trunk/LayoutTests/fast/images/style-access-during-imageChanged-style-freeze.html (203545 => 203546)
--- trunk/LayoutTests/fast/images/style-access-during-imageChanged-style-freeze.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/images/style-access-during-imageChanged-style-freeze.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -22,7 +22,7 @@
container.style.removeProperty("display");
document.body.offsetTop;
var target = document.getElementById("target");
- target.setAttribute("foo");
+ target.setAttribute("foo", "");
document.body.offsetTop;
var result = document.getElementById("result");
result.innerText = getComputedStyle(target).color === "rgb(0, 128, 0)" ? "PASS" : "FAIL";
Modified: trunk/LayoutTests/fast/selectors/read-only-read-write-input-basics.html (203545 => 203546)
--- trunk/LayoutTests/fast/selectors/read-only-read-write-input-basics.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/selectors/read-only-read-write-input-basics.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -80,7 +80,7 @@
testProperties(!supportsReadonly);
// Setting readonly through attributes.
- testCase.setAttribute("readonly");
+ testCase.setAttribute("readonly", "");
testProperties(true);
testCase.removeAttribute("readonly");
@@ -94,7 +94,7 @@
testProperties(!supportsReadonly);
// Setting disabled through attributes.
- testCase.setAttribute("disabled");
+ testCase.setAttribute("disabled", "");
testProperties(true);
testCase.removeAttribute("disabled");
Modified: trunk/LayoutTests/fast/selectors/read-only-read-write-textarea-basics.html (203545 => 203546)
--- trunk/LayoutTests/fast/selectors/read-only-read-write-textarea-basics.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/fast/selectors/read-only-read-write-textarea-basics.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -143,7 +143,7 @@
}
// Setting the value through attributes.
-newTextArea.setAttribute("readonly");
+newTextArea.setAttribute("readonly", "");
testProperties(true);
newTextArea.removeAttribute("readonly");
testProperties(false);
@@ -153,7 +153,7 @@
testAttribute("readonly", "false");
testAttribute("readonly", "foobar");
-newTextArea.setAttribute("disabled");
+newTextArea.setAttribute("disabled", "");
testProperties(true);
newTextArea.removeAttribute("disabled");
testProperties(false);
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203545 => 203546)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-07-22 02:21:23 UTC (rev 203546)
@@ -1,5 +1,17 @@
2016-07-21 Chris Dumez <[email protected]>
+ Make parameters mandatory for attribute-related API on Element
+ https://bugs.webkit.org/show_bug.cgi?id=160059
+
+ Reviewed by Ryosuke Niwa.
+
+ Rebaseline several W3C tests now that more checks are passing.
+
+ * web-platform-tests/dom/interfaces-expected.txt:
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-07-21 Chris Dumez <[email protected]>
+
Make parameters to Document.getElementsBy*() operations mandatory
https://bugs.webkit.org/show_bug.cgi?id=160050
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (203545 => 203546)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt 2016-07-22 02:21:23 UTC (rev 203546)
@@ -831,16 +831,16 @@
PASS Element interface: operation hasAttributes()
PASS Element interface: attribute attributes
FAIL Element interface: operation getAttributeNames() assert_own_property: interface prototype object missing non-static operation expected property "getAttributeNames" missing
-FAIL Element interface: operation getAttribute(DOMString) assert_equals: property has wrong .length expected 1 but got 0
-FAIL Element interface: operation getAttributeNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
-FAIL Element interface: operation setAttribute(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
-FAIL Element interface: operation setAttributeNS(DOMString,DOMString,DOMString) assert_equals: property has wrong .length expected 3 but got 0
-FAIL Element interface: operation removeAttribute(DOMString) assert_equals: property has wrong .length expected 1 but got 0
+PASS Element interface: operation getAttribute(DOMString)
+PASS Element interface: operation getAttributeNS(DOMString,DOMString)
+PASS Element interface: operation setAttribute(DOMString,DOMString)
+PASS Element interface: operation setAttributeNS(DOMString,DOMString,DOMString)
+PASS Element interface: operation removeAttribute(DOMString)
PASS Element interface: operation removeAttributeNS(DOMString,DOMString)
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
+PASS Element interface: operation hasAttributeNS(DOMString,DOMString)
+PASS Element interface: operation getAttributeNode(DOMString)
+PASS Element interface: operation getAttributeNodeNS(DOMString,DOMString)
PASS Element interface: operation setAttributeNode(Attr)
PASS Element interface: operation setAttributeNodeNS(Attr)
PASS Element interface: operation removeAttributeNode(Attr)
@@ -883,41 +883,25 @@
PASS Element interface: element must inherit property "attributes" with the proper type (9)
FAIL Element interface: element must inherit property "getAttributeNames" with the proper type (10) assert_inherits: property "getAttributeNames" not found in prototype chain
PASS Element interface: element must inherit property "getAttribute" with the proper type (11)
-FAIL Element interface: calling getAttribute(DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttribute(DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "getAttributeNS" with the proper type (12)
-FAIL Element interface: calling getAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "setAttribute" with the proper type (13)
-FAIL Element interface: calling setAttribute(DOMString,DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling setAttribute(DOMString,DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "setAttributeNS" with the proper type (14)
-FAIL Element interface: calling setAttributeNS(DOMString,DOMString,DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling setAttributeNS(DOMString,DOMString,DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "removeAttribute" with the proper type (15)
-FAIL Element interface: calling removeAttribute(DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling removeAttribute(DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "removeAttributeNS" with the proper type (16)
PASS Element interface: calling removeAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "hasAttribute" with the proper type (17)
PASS Element interface: calling hasAttribute(DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "hasAttributeNS" with the proper type (18)
-FAIL Element interface: calling hasAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling hasAttributeNS(DOMString,DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "getAttributeNode" with the proper type (19)
-FAIL Element interface: calling getAttributeNode(DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttributeNode(DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "getAttributeNodeNS" with the proper type (20)
-FAIL Element interface: calling getAttributeNodeNS(DOMString,DOMString) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttributeNodeNS(DOMString,DOMString) on element with too few arguments must throw TypeError
PASS Element interface: element must inherit property "setAttributeNode" with the proper type (21)
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 (22)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (203545 => 203546)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-07-22 02:21:23 UTC (rev 203546)
@@ -1241,41 +1241,25 @@
PASS Element interface: document.createElement("noscript") must inherit property "attributes" with the proper type (8)
FAIL Element interface: document.createElement("noscript") must inherit property "getAttributeNames" with the proper type (9) assert_inherits: property "getAttributeNames" not found in prototype chain
PASS Element interface: document.createElement("noscript") must inherit property "getAttribute" with the proper type (10)
-FAIL Element interface: calling getAttribute(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttribute(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "getAttributeNS" with the proper type (11)
-FAIL Element interface: calling getAttributeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttributeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "setAttribute" with the proper type (12)
-FAIL Element interface: calling setAttribute(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling setAttribute(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "setAttributeNS" with the proper type (13)
-FAIL Element interface: calling setAttributeNS(DOMString,DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling setAttributeNS(DOMString,DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "removeAttribute" with the proper type (14)
-FAIL Element interface: calling removeAttribute(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling removeAttribute(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "removeAttributeNS" with the proper type (15)
PASS Element interface: calling removeAttributeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "hasAttribute" with the proper type (16)
PASS Element interface: calling hasAttribute(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "hasAttributeNS" with the proper type (17)
-FAIL Element interface: calling hasAttributeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling hasAttributeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "getAttributeNode" with the proper type (18)
-FAIL Element interface: calling getAttributeNode(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttributeNode(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "getAttributeNodeNS" with the proper type (19)
-FAIL Element interface: calling getAttributeNodeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" did not throw
+PASS Element interface: calling getAttributeNodeNS(DOMString,DOMString) on document.createElement("noscript") with too few arguments must throw TypeError
PASS Element interface: document.createElement("noscript") must inherit property "setAttributeNode" with the proper type (20)
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 (21)
Modified: trunk/LayoutTests/media/video-playsinline-expected.txt (203545 => 203546)
--- trunk/LayoutTests/media/video-playsinline-expected.txt 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/media/video-playsinline-expected.txt 2016-07-22 02:21:23 UTC (rev 203546)
@@ -1,7 +1,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -9,7 +9,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -17,7 +17,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -25,7 +25,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -33,7 +33,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -41,7 +41,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -49,7 +49,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -57,7 +57,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -65,7 +65,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -73,7 +73,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -81,7 +81,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -89,7 +89,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -97,7 +97,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -105,7 +105,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -113,7 +113,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline"))
+RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
@@ -121,7 +121,7 @@
RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline"))
+RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
Modified: trunk/LayoutTests/media/video-playsinline.html (203545 => 203546)
--- trunk/LayoutTests/media/video-playsinline.html 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/LayoutTests/media/video-playsinline.html 2016-07-22 02:21:23 UTC (rev 203546)
@@ -26,7 +26,7 @@
video.controls = true;
video.src = "" 'content/test');
run('video.playsInline = ' + hasPlaysInline);
- run('video.' + (hasWebKitPlaysInline ? 'set' : 'remove') + 'Attribute("webkit-playsinline")');
+ run('video.' + (hasWebKitPlaysInline ? 'set' : 'remove') + 'Attribute("webkit-playsinline", "")');
waitForEventOnce('canplaythrough', () => {
runWithKeyDown(() => {
run('video.play()');
Modified: trunk/Source/WebCore/ChangeLog (203545 => 203546)
--- trunk/Source/WebCore/ChangeLog 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/Source/WebCore/ChangeLog 2016-07-22 02:21:23 UTC (rev 203546)
@@ -1,3 +1,22 @@
+2016-07-21 Chris Dumez <[email protected]>
+
+ Make parameters mandatory for attribute-related API on Element
+ https://bugs.webkit.org/show_bug.cgi?id=160059
+
+ Reviewed by Ryosuke Niwa.
+
+ Make parameters mandatory for attribute-related API on Element to match
+ the specification:
+ - https://dom.spec.whatwg.org/#element
+
+ Firefox and Chrome agree with the specification. Calling this API
+ without the parameters does not make much sense, especially considering
+ WebKit uses the string "undefined" when the parameter is omitted.
+
+ No new tests, rebaselined existing tests.
+
+ * dom/Element.idl:
+
2016-07-21 Myles C. Maxfield <[email protected]>
Remove support for deprecated SPI inlineMediaPlaybackRequiresPlaysInlineAttribute
Modified: trunk/Source/WebCore/dom/Element.idl (203545 => 203546)
--- trunk/Source/WebCore/dom/Element.idl 2016-07-22 01:40:22 UTC (rev 203545)
+++ trunk/Source/WebCore/dom/Element.idl 2016-07-22 02:21:23 UTC (rev 203546)
@@ -29,19 +29,16 @@
readonly attribute DOMString? tagName;
- // FIXME: Using "undefined" as default parameter value is wrong.
- DOMString? getAttribute(optional DOMString name = "undefined");
+ DOMString? getAttribute(DOMString name);
[ObjCLegacyUnnamedParameters, RaisesException, InvokesCustomElementLifecycleCallbacks]
- // FIXME: Using "undefined" as default parameter value is wrong.
- void setAttribute(optional DOMString name = "undefined", optional DOMString value = "undefined");
+ void setAttribute(DOMString name, DOMString value);
- // FIXME: Using "undefined" as default parameter value is wrong.
- [InvokesCustomElementLifecycleCallbacks] void removeAttribute(optional DOMString name = "undefined");
- Attr getAttributeNode(optional DOMString name = "undefined");
+ [InvokesCustomElementLifecycleCallbacks] void removeAttribute(DOMString name);
+ Attr? getAttributeNode(DOMString name);
- [RaisesException, InvokesCustomElementLifecycleCallbacks] Attr setAttributeNode(Attr newAttr);
+ [RaisesException, InvokesCustomElementLifecycleCallbacks] Attr? setAttributeNode(Attr newAttr);
[RaisesException, InvokesCustomElementLifecycleCallbacks] Attr removeAttributeNode(Attr oldAttr);
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
@@ -59,13 +56,11 @@
// DOM Level 2 Core
- // FIXME: Using "undefined" as default parameter value is wrong.
- [ObjCLegacyUnnamedParameters] DOMString? getAttributeNS(optional DOMString? namespaceURI = null, optional DOMString localName = "undefined");
+ [ObjCLegacyUnnamedParameters] DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
[ObjCLegacyUnnamedParameters, RaisesException, InvokesCustomElementLifecycleCallbacks]
- // FIXME: Using "undefined" as default parameter value is wrong.
- void setAttributeNS(optional DOMString? namespaceURI = null, optional DOMString qualifiedName = "undefined", optional DOMString value = "undefined");
+ void setAttributeNS(DOMString? namespaceURI, DOMString qualifiedName, DOMString value);
[ObjCLegacyUnnamedParameters, InvokesCustomElementLifecycleCallbacks] void removeAttributeNS(DOMString? namespaceURI, DOMString localName);
@@ -76,13 +71,12 @@
HTMLCollection getElementsByTagNameNS(optional DOMString? namespaceURI = null, optional DOMString localName = "undefined");
#endif
- // FIXME: Using "undefined" as default parameter value is wrong.
- [ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS(optional DOMString? namespaceURI = null, optional DOMString localName = "undefined");
- [RaisesException, InvokesCustomElementLifecycleCallbacks] Attr setAttributeNodeNS(Attr newAttr);
+ [ObjCLegacyUnnamedParameters] Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName);
+ [RaisesException, InvokesCustomElementLifecycleCallbacks] Attr? setAttributeNodeNS(Attr newAttr);
boolean hasAttribute(DOMString name);
- // FIXME: Using "undefined" as default parameter value is wrong.
- [ObjCLegacyUnnamedParameters] boolean hasAttributeNS(optional DOMString? namespaceURI = null, optional DOMString localName = "undefined");
+ [ObjCLegacyUnnamedParameters] boolean hasAttributeNS(DOMString? namespaceURI, DOMString localName);
+
[ImplementedAs=cssomStyle] readonly attribute CSSStyleDeclaration style;
// DOM 4