window.name resetting drops name when loading about:blank to a window which had non-about:blank loaded to it
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: smaug, Assigned: timhuang)
References
(Depends on 1 open bug)
Details
Attachments
(2 files)
(This is currently Nightly only, since privacy.window.name.update.enabled is enabled only there.)
When about:blank is same origin, I don't think loading it explicitly should reset window.name.
Test is in http://mozilla.pettay.fi/moztests/window_name_test_initial.html
Steps:
- Click 'Open a noopener window'. A new window opens.
- Click 'open another window which has opener pointing to this one'. A new window opens.
- Check what is logged at the top of the page, especially see opener's name
- Click 'Load about:blank to opener'.
- Check what is logged at the top of the page and compare what was there before.
Reporter | ||
Updated•2 months ago
|
Comment 1•2 months ago
|
||
We should also test a variant where you set document.domain
before step 4 I suppose, in which case you would expect name to be reset.
We might also want to test blob URLs, though as suggested in https://github.com/w3c/FileAPI/issues/153 we might want to force noopener for them so I'm not sure how much I care if we reset name there.
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 2•2 months ago
|
||
This patch changes the checking condition about the cases that we don't
need to reset the window.name. It makes the window.name to not be reset
if we load an about:blank page to a window which had loaded a
non-about:blank page.
Also, we take the domain into account when checking the principals of
the ola and new documents. This would make the window.name to be
reset if the document.domain was changed to a cross-origin.
Assignee | ||
Comment 3•2 months ago
|
||
Depends on D101359
Updated•2 months ago
|
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/441e3606b512 Part 1: Not to reset the window.name if it's navigating to an about:blank page from a non-about:blank page. r=smaug https://hg.mozilla.org/integration/autoland/rev/bc08003d6b4c Part 2: Add tests including a mochitest and a web platform test. r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27203 for changes under testing/web-platform/tests
Comment 6•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/441e3606b512
https://hg.mozilla.org/mozilla-central/rev/bc08003d6b4c
Upstream PR merged by moz-wptsync-bot
Comment 8•2 months ago
|
||
Is there a follow-up bug on the Android failures?
Assignee | ||
Comment 9•2 months ago
|
||
I haven't opened it yet. I want to first figure out the root cause of it and then open the bug.
Description
•