- Revision
- 275445
- Author
- [email protected]
- Date
- 2021-04-02 15:24:18 -0700 (Fri, 02 Apr 2021)
Log Message
Remove [Replaceable] extended attribute from `document.all`
https://bugs.webkit.org/show_bug.cgi?id=223883
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
* web-platform-tests/html/dom/idlharness.https-expected.txt:
Source/WebCore:
[Replaceable] semantics was introduced around 2003 to work around a web-compat issue.
Since then, `document.all` was revised multiple times and standardized as [[IsHTMLDDA]]
object without a setter, which was proven to be compatible with the web.
This patch aligns WebKit with the spec [1], Blink, and Gecko.
iOS apps are unlikely to accidentally depend on subtleties in `document.all` behavior since
they were authored long after it became obsolete.
Old versions of libraries, originally designed for the web, are also unlikely to rely on
previous behavior, because `document.all` was never replaceable in some popular browsers.
[1] https://html.spec.whatwg.org/multipage/obsolete.html#Document-partial
Tests: fast/dom/undetectable-document-all.html
imported/w3c/web-platform-tests/html/dom/idlharness.https.html
* dom/Document+HTMLObsolete.idl:
LayoutTests:
* fast/dom/undetectable-document-all-expected.txt:
* fast/dom/undetectable-document-all.html:
* platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (275444 => 275445)
--- trunk/LayoutTests/ChangeLog 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/ChangeLog 2021-04-02 22:24:18 UTC (rev 275445)
@@ -1,3 +1,18 @@
+2021-04-02 Alexey Shvayka <[email protected]>
+
+ Remove [Replaceable] extended attribute from `document.all`
+ https://bugs.webkit.org/show_bug.cgi?id=223883
+
+ Reviewed by Darin Adler.
+
+ * fast/dom/undetectable-document-all-expected.txt:
+ * fast/dom/undetectable-document-all.html:
+ * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+
2021-04-02 Amir Mark Jr <[email protected]>
[MacOS Debug] imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html is a flakey crash and failure
Modified: trunk/LayoutTests/fast/dom/undetectable-document-all-expected.txt (275444 => 275445)
--- trunk/LayoutTests/fast/dom/undetectable-document-all-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/fast/dom/undetectable-document-all-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -1,4 +1,4 @@
-This tests that document.all should be undetectable, and that it should be possible to set document.all to something else. If this test is successful, the text "SUCCESS" should be shown below.
+This tests that document.all should be undetectable, and that it should be possible to delete document.all. If this test is successful, the text "SUCCESS" should be shown below.
document.all: [object HTMLAllCollection]
SUCCESS!
Modified: trunk/LayoutTests/fast/dom/undetectable-document-all.html (275444 => 275445)
--- trunk/LayoutTests/fast/dom/undetectable-document-all.html 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/fast/dom/undetectable-document-all.html 2021-04-02 22:24:18 UTC (rev 275445)
@@ -46,8 +46,8 @@
// Try replacing document.all with something else
document.all = { 'foo': 42}
- if (document.all.foo != 42) {
- debug('FAILURE: replacing document.all did not work')
+ if (document.all.foo == 42) {
+ debug('FAILURE: document.all should be read-only');
return;
}
@@ -70,7 +70,7 @@
</script>
</head>
<body _onload_="runTests();">
-This tests that document.all should be undetectable, and that it should be possible to set document.all to something else. If this test is successful, the text "SUCCESS" should be shown below.
+This tests that document.all should be undetectable, and that it should be possible to delete document.all. If this test is successful, the text "SUCCESS" should be shown below.
<pre id="console"></pre>
</body>
</html>
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (275444 => 275445)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-02 22:24:18 UTC (rev 275445)
@@ -1,3 +1,12 @@
+2021-04-02 Alexey Shvayka <[email protected]>
+
+ Remove [Replaceable] extended attribute from `document.all`
+ https://bugs.webkit.org/show_bug.cgi?id=223883
+
+ Reviewed by Darin Adler.
+
+ * web-platform-tests/html/dom/idlharness.https-expected.txt:
+
2021-04-02 Jessica Tallon <[email protected]>
Update wasm JS-API tests for the type method to latest upstream.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (275444 => 275445)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -5171,9 +5171,7 @@
PASS Document interface: operation clear()
PASS Document interface: operation captureEvents()
PASS Document interface: operation releaseEvents()
-FAIL Document interface: attribute all assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function all() {
- [native code]
-}"
+PASS Document interface: attribute all
PASS Document interface: attribute onabort
FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
PASS Document interface: attribute onblur
Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (275444 => 275445)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -5398,9 +5398,7 @@
PASS Document interface: operation clear()
PASS Document interface: operation captureEvents()
PASS Document interface: operation releaseEvents()
-FAIL Document interface: attribute all assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function all() {
- [native code]
-}"
+PASS Document interface: attribute all
PASS Document interface: attribute onabort
FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
PASS Document interface: attribute onblur
Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (275444 => 275445)
--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -5388,9 +5388,7 @@
PASS Document interface: operation clear()
PASS Document interface: operation captureEvents()
PASS Document interface: operation releaseEvents()
-FAIL Document interface: attribute all assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function all() {
- [native code]
-}"
+PASS Document interface: attribute all
PASS Document interface: attribute onabort
FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
PASS Document interface: attribute onblur
Modified: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (275444 => 275445)
--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -5398,9 +5398,7 @@
PASS Document interface: operation clear()
PASS Document interface: operation captureEvents()
PASS Document interface: operation releaseEvents()
-FAIL Document interface: attribute all assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function all() {
- [native code]
-}"
+PASS Document interface: attribute all
PASS Document interface: attribute onabort
FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
PASS Document interface: attribute onblur
Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (275444 => 275445)
--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -5398,9 +5398,7 @@
PASS Document interface: operation clear()
PASS Document interface: operation captureEvents()
PASS Document interface: operation releaseEvents()
-FAIL Document interface: attribute all assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function all() {
- [native code]
-}"
+PASS Document interface: attribute all
PASS Document interface: attribute onabort
FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
PASS Document interface: attribute onblur
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (275444 => 275445)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt 2021-04-02 22:24:18 UTC (rev 275445)
@@ -5398,9 +5398,7 @@
PASS Document interface: operation clear()
PASS Document interface: operation captureEvents()
PASS Document interface: operation releaseEvents()
-FAIL Document interface: attribute all assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function all() {
- [native code]
-}"
+PASS Document interface: attribute all
PASS Document interface: attribute onabort
FAIL Document interface: attribute onauxclick assert_true: The prototype object must have a property "onauxclick" expected true got false
PASS Document interface: attribute onblur
Modified: trunk/Source/WebCore/ChangeLog (275444 => 275445)
--- trunk/Source/WebCore/ChangeLog 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/Source/WebCore/ChangeLog 2021-04-02 22:24:18 UTC (rev 275445)
@@ -1,3 +1,29 @@
+2021-04-02 Alexey Shvayka <[email protected]>
+
+ Remove [Replaceable] extended attribute from `document.all`
+ https://bugs.webkit.org/show_bug.cgi?id=223883
+
+ Reviewed by Darin Adler.
+
+ [Replaceable] semantics was introduced around 2003 to work around a web-compat issue.
+ Since then, `document.all` was revised multiple times and standardized as [[IsHTMLDDA]]
+ object without a setter, which was proven to be compatible with the web.
+
+ This patch aligns WebKit with the spec [1], Blink, and Gecko.
+
+ iOS apps are unlikely to accidentally depend on subtleties in `document.all` behavior since
+ they were authored long after it became obsolete.
+
+ Old versions of libraries, originally designed for the web, are also unlikely to rely on
+ previous behavior, because `document.all` was never replaceable in some popular browsers.
+
+ [1] https://html.spec.whatwg.org/multipage/obsolete.html#Document-partial
+
+ Tests: fast/dom/undetectable-document-all.html
+ imported/w3c/web-platform-tests/html/dom/idlharness.https.html
+
+ * dom/Document+HTMLObsolete.idl:
+
2021-04-02 Chris Dumez <[email protected]>
Introduce ScriptBuffer class to wrap SharedBuffer containing a script
Modified: trunk/Source/WebCore/dom/Document+HTMLObsolete.idl (275444 => 275445)
--- trunk/Source/WebCore/dom/Document+HTMLObsolete.idl 2021-04-02 22:20:24 UTC (rev 275444)
+++ trunk/Source/WebCore/dom/Document+HTMLObsolete.idl 2021-04-02 22:24:18 UTC (rev 275445)
@@ -38,6 +38,5 @@
undefined captureEvents();
undefined releaseEvents();
- // FIXME: 'all' is not specified to be [Replaceable].
- [Replaceable, SameObject] readonly attribute HTMLAllCollection all;
+ [SameObject] readonly attribute HTMLAllCollection all;
};