-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assign a name to iframes when loading the initial about:blank #21976
Conversation
Heads up! This PR modifies the following files:
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#13585. |
Warning: the test case in this PR doesn't pass yetThis PR allows slither.io to be opened and played. However, due to a second bug in the iframe implementation, the |
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#13585. |
1 similar comment
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#13585. |
Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe.
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#13585. |
WIP marker removed -- ready to reviewTurns out I was misunderstanding a few things, and the Servo behavior is within the documented behavior of the spec (it's Firefox that's being weird, by synchronously firing events). The So, fixed the test to ignore the blank document.
|
@bors-servo try=wpt |
Assign a name to iframes when loading the initial about:blank Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #21886 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21976) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
|
It was already broken, since Servo doesn't support pop-up windows. The iframe changes just made it broken in a different way.
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#13585. |
@bors-servo try=wpt |
Assign a name to iframes when loading the initial about:blank Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #21886 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21976) <!-- Reviewable:end -->
☀️ Test successful - linux-rel-css, linux-rel-wpt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this so carefully!
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
async_test(function(t) { | ||
window.addEventListener("load", function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should pass t.step_func(function() {
instead.
form.appendChild(input); | ||
document.documentElement.appendChild(form); | ||
form.submit(); | ||
frame.addEventListener("load", function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also pass t.step_func(function() {
document.documentElement.appendChild(form); | ||
form.submit(); | ||
frame.addEventListener("load", function() { | ||
if (frame.contentWindow.location.href != "about:blank") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make this check for the actual expected value instead? Maybe using new URL("form-target-iframe-helper.py", window.location)
?
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#13585. |
@bors-servo r+ |
📌 Commit 10442ae has been approved by |
Assign a name to iframes when loading the initial about:blank Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #21886 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21976) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
@bors-servo retry Out-of-memory |
⚡ Previous build results for android, android-mac, android-x86, arm32, arm64, linux-dev, linux-rel-css, mac-dev-unit, mac-rel-css2, mac-rel-wpt3, status-taskcluster, windows-msvc-dev are reusable. Rebuilding only linux-rel-wpt, mac-rel-css1, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt4... |
☀️ Test successful - android, android-mac, android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, status-taskcluster, windows-msvc-dev |
Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is