forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop evaluating <script>s moved between Documents during fetching
https://bugs.webkit.org/show_bug.cgi?id=202714 <rdar://problem/56208425> Reviewed by Geoffrey Garen. LayoutTests/imported/w3c: Rebaseline WPT tests now that more checks are passing. Note that these checks were already passing in both Firefox and Chrome. * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic-expected.txt: Source/WebCore: Stop evaluating <script>s moved between Documents during fetching: - whatwg/html#2469 - whatwg/html#2673 Both Firefox and Chrome already behave this way. No new tests, rebaselined existing tests. * dom/ScriptElement.cpp: (WebCore::ScriptElement::prepareScript): Set the element's preparation-time document to its node document, as per: - https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 11) (WebCore::ScriptElement::executePendingScript): If scriptElement's preparation-time document is not equal to scriptElement's node document, then return, as per: - https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block (step 2) * dom/ScriptElement.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@280924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
cdumez@apple.com
committed
Aug 11, 2021
1 parent
8314787
commit 4008034
Showing
20 changed files
with
107 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...t/moving-between-documents/after-prepare-iframe-fetch-error-external-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move fetch-error external classic script to iframe after-prepare | ||
PASS <script> load: Move fetch-error external classic script to iframe after-prepare | ||
FAIL <script> error: Move fetch-error external classic script to iframe after-prepare assert_unreached: Script error evennt fired unexpectedly Reached unreachable code | ||
PASS <script> error: Move fetch-error external classic script to iframe after-prepare | ||
PASS window error: Move fetch-error external classic script to iframe after-prepare | ||
|
3 changes: 2 additions & 1 deletion
3
...nt/moving-between-documents/after-prepare-iframe-fetch-error-external-module-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move fetch-error external module script to iframe after-prepare | ||
PASS <script> load: Move fetch-error external module script to iframe after-prepare | ||
FAIL <script> error: Move fetch-error external module script to iframe after-prepare assert_unreached: Script error evennt fired unexpectedly Reached unreachable code | ||
PASS <script> error: Move fetch-error external module script to iframe after-prepare | ||
PASS window error: Move fetch-error external module script to iframe after-prepare | ||
|
6 changes: 3 additions & 3 deletions
6
...t/moving-between-documents/after-prepare-iframe-parse-error-external-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: SyntaxError: Left side of assignment is not a reference. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move parse-error external classic script to iframe after-prepare | ||
FAIL <script> load: Move parse-error external classic script to iframe after-prepare assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS <script> load: Move parse-error external classic script to iframe after-prepare | ||
PASS <script> error: Move parse-error external classic script to iframe after-prepare | ||
FAIL window error: Move parse-error external classic script to iframe after-prepare assert_unreached: Window error event shouldn't fired on destination window Reached unreachable code | ||
PASS window error: Move parse-error external classic script to iframe after-prepare | ||
|
4 changes: 2 additions & 2 deletions
4
...nt/moving-between-documents/after-prepare-iframe-parse-error-external-module-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: SyntaxError: Left side of assignment is not a reference. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move parse-error external module script to iframe after-prepare | ||
PASS <script> load: Move parse-error external module script to iframe after-prepare | ||
FAIL <script> error: Move parse-error external module script to iframe after-prepare assert_unreached: Script error evennt fired unexpectedly Reached unreachable code | ||
PASS <script> error: Move parse-error external module script to iframe after-prepare | ||
PASS window error: Move parse-error external module script to iframe after-prepare | ||
|
6 changes: 3 additions & 3 deletions
6
...ent/moving-between-documents/after-prepare-iframe-parse-error-inline-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: SyntaxError: Left side of assignment is not a reference. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move parse-error inline classic script to iframe after-prepare | ||
FAIL <script> load: Move parse-error inline classic script to iframe after-prepare assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS <script> load: Move parse-error inline classic script to iframe after-prepare | ||
PASS <script> error: Move parse-error inline classic script to iframe after-prepare | ||
FAIL window error: Move parse-error inline classic script to iframe after-prepare assert_unreached: Window error event shouldn't fired on destination window Reached unreachable code | ||
PASS window error: Move parse-error inline classic script to iframe after-prepare | ||
|
6 changes: 3 additions & 3 deletions
6
...ement/moving-between-documents/after-prepare-iframe-success-external-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: exec | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
FAIL Eval: Move success external classic script to iframe after-prepare assert_false: The script must not have executed in destination window expected false got "executed" | ||
FAIL <script> load: Move success external classic script to iframe after-prepare assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS Eval: Move success external classic script to iframe after-prepare | ||
PASS <script> load: Move success external classic script to iframe after-prepare | ||
PASS <script> error: Move success external classic script to iframe after-prepare | ||
PASS window error: Move success external classic script to iframe after-prepare | ||
|
6 changes: 3 additions & 3 deletions
6
...lement/moving-between-documents/after-prepare-iframe-success-external-module-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: TypeError: Requested module is not instantiated yet. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move success external module script to iframe after-prepare | ||
FAIL <script> load: Move success external module script to iframe after-prepare assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS <script> load: Move success external module script to iframe after-prepare | ||
PASS <script> error: Move success external module script to iframe after-prepare | ||
FAIL window error: Move success external module script to iframe after-prepare assert_unreached: Window error event shouldn't fired on destination window Reached unreachable code | ||
PASS window error: Move success external module script to iframe after-prepare | ||
|
5 changes: 3 additions & 2 deletions
5
...element/moving-between-documents/after-prepare-iframe-success-inline-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
FAIL Eval: Move success inline classic script to iframe after-prepare assert_false: The script must not have executed in destination window expected false got "executed" | ||
FAIL <script> load: Move success inline classic script to iframe after-prepare assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS Eval: Move success inline classic script to iframe after-prepare | ||
PASS <script> load: Move success inline classic script to iframe after-prepare | ||
PASS <script> error: Move success inline classic script to iframe after-prepare | ||
PASS window error: Move success inline classic script to iframe after-prepare | ||
|
3 changes: 2 additions & 1 deletion
3
...ement/moving-between-documents/move-back-iframe-fetch-error-external-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move fetch-error external classic script to iframe move-back | ||
PASS <script> load: Move fetch-error external classic script to iframe move-back | ||
FAIL <script> error: Move fetch-error external classic script to iframe move-back assert_unreached: Script error evennt fired unexpectedly Reached unreachable code | ||
PASS <script> error: Move fetch-error external classic script to iframe move-back | ||
PASS window error: Move fetch-error external classic script to iframe move-back | ||
|
3 changes: 2 additions & 1 deletion
3
...lement/moving-between-documents/move-back-iframe-fetch-error-external-module-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move fetch-error external module script to iframe move-back | ||
PASS <script> load: Move fetch-error external module script to iframe move-back | ||
FAIL <script> error: Move fetch-error external module script to iframe move-back assert_unreached: Script error evennt fired unexpectedly Reached unreachable code | ||
PASS <script> error: Move fetch-error external module script to iframe move-back | ||
PASS window error: Move fetch-error external module script to iframe move-back | ||
|
6 changes: 3 additions & 3 deletions
6
...ement/moving-between-documents/move-back-iframe-parse-error-external-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: SyntaxError: Left side of assignment is not a reference. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move parse-error external classic script to iframe move-back | ||
FAIL <script> load: Move parse-error external classic script to iframe move-back assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS <script> load: Move parse-error external classic script to iframe move-back | ||
PASS <script> error: Move parse-error external classic script to iframe move-back | ||
FAIL window error: Move parse-error external classic script to iframe move-back assert_unreached: Window error event shouldn't fired on source window Reached unreachable code | ||
PASS window error: Move parse-error external classic script to iframe move-back | ||
|
4 changes: 2 additions & 2 deletions
4
...lement/moving-between-documents/move-back-iframe-parse-error-external-module-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: SyntaxError: Left side of assignment is not a reference. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move parse-error external module script to iframe move-back | ||
PASS <script> load: Move parse-error external module script to iframe move-back | ||
FAIL <script> error: Move parse-error external module script to iframe move-back assert_unreached: Script error evennt fired unexpectedly Reached unreachable code | ||
PASS <script> error: Move parse-error external module script to iframe move-back | ||
PASS window error: Move parse-error external module script to iframe move-back | ||
|
6 changes: 3 additions & 3 deletions
6
...element/moving-between-documents/move-back-iframe-parse-error-inline-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: SyntaxError: Left side of assignment is not a reference. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move parse-error inline classic script to iframe move-back | ||
FAIL <script> load: Move parse-error inline classic script to iframe move-back assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS <script> load: Move parse-error inline classic script to iframe move-back | ||
PASS <script> error: Move parse-error inline classic script to iframe move-back | ||
FAIL window error: Move parse-error inline classic script to iframe move-back assert_unreached: Window error event shouldn't fired on source window Reached unreachable code | ||
PASS window error: Move parse-error inline classic script to iframe move-back | ||
|
6 changes: 3 additions & 3 deletions
6
...t-element/moving-between-documents/move-back-iframe-success-external-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: exec | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
FAIL Eval: Move success external classic script to iframe move-back assert_false: The script must not have executed in source window expected false got "executed" | ||
FAIL <script> load: Move success external classic script to iframe move-back assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS Eval: Move success external classic script to iframe move-back | ||
PASS <script> load: Move success external classic script to iframe move-back | ||
PASS <script> error: Move success external classic script to iframe move-back | ||
PASS window error: Move success external classic script to iframe move-back | ||
|
6 changes: 3 additions & 3 deletions
6
...pt-element/moving-between-documents/move-back-iframe-success-external-module-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
CONSOLE MESSAGE: TypeError: Requested module is not instantiated yet. | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
PASS Eval: Move success external module script to iframe move-back | ||
FAIL <script> load: Move success external module script to iframe move-back assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS <script> load: Move success external module script to iframe move-back | ||
PASS <script> error: Move success external module script to iframe move-back | ||
FAIL window error: Move success external module script to iframe move-back assert_unreached: Window error event shouldn't fired on source window Reached unreachable code | ||
PASS window error: Move success external module script to iframe move-back | ||
|
5 changes: 3 additions & 2 deletions
5
...ipt-element/moving-between-documents/move-back-iframe-success-inline-classic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONSOLE MESSAGE: Not executing script because it moved between documents during fetching | ||
|
||
|
||
PASS Sanity check around top-level Window | ||
FAIL Eval: Move success inline classic script to iframe move-back assert_false: The script must not have executed in source window expected false got "executed" | ||
FAIL <script> load: Move success inline classic script to iframe move-back assert_unreached: Script load event fired unexpectedly Reached unreachable code | ||
PASS Eval: Move success inline classic script to iframe move-back | ||
PASS <script> load: Move success inline classic script to iframe move-back | ||
PASS <script> error: Move success inline classic script to iframe move-back | ||
PASS window error: Move success inline classic script to iframe move-back | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters