Closed
Bug 1353466
Opened 7 years ago
Closed 4 years ago
Window opened with window.open, `noopener` feature cannot close itself
Categories
(Core :: DOM: Navigation, defect, P2)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla79
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: lyza, Assigned: smaug)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce: * `window.open('foo.html', '', 'noopener')` * Within `foo.html`: `window.close()` Actual results: Logged warning "Scripts may not close windows that were not opened by script." Window is not closed. Expected results: According to current spec language[1], `foo.html`'s browsing context meets the requirements for being script-closable—`window.close` should work here. There is some debate in an existing bug thread[2] that the current spec language here may not be web-compatible, but in any case, current behavior leads to some orphaned windows in some Web Platform Tests[3]. [1]: https://html.spec.whatwg.org/#apis-for-creating-and-navigating-browsing-contexts-by-name [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1316857 [3]: https://github.com/w3c/web-platform-tests/pull/5306
Comment 1•7 years ago
|
||
Clearly a bug in that we're using a signal (the presence or absence of window.opener) that has nothing to do, really with what we're interpreting it to mean. We might have an opener in a window NOT opened by script (bug 1316857) or we might have a script-opened window without an opener (this bug). Probably should be fixed together by recording "script-opened-window" in some other way.
Component: DOM: Security → DOM: Core & HTML
Depends on: 1316857
Updated•7 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•7 years ago
|
Priority: -- → P2
Comment 2•6 years ago
|
||
Moving to p3 because no activity for at least 1 year(s). See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Comment 3•4 years ago
|
||
I think this bug is the cause of a lot of the target=_blank fallout. We should reconsider its priority.
Component: DOM: Core & HTML → DOM: Navigation
Flags: needinfo?(ehsan)
Priority: P3 → --
Updated•4 years ago
|
Flags: needinfo?(ehsan) → needinfo?(htsai)
Comment 4•4 years ago
|
||
I'll take an action to explore resource alternatives.
Flags: needinfo?(htsai)
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → bugs
Priority: -- → P2
Assignee | ||
Comment 5•4 years ago
|
||
Updated•4 years ago
|
Attachment #9150207 -
Attachment description: Bug 1353466, 'A browsing context is script-closable ... if it is a top-level browsing context whose session history contains only one Document' → Bug 1353466, 'A browsing context is script-closable ... if it is a top-level browsing context whose session history contains only one Document', r=peterv
Assignee | ||
Comment 6•4 years ago
|
||
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e166841f170 'A browsing context is script-closable ... if it is a top-level browsing context whose session history contains only one Document', r=peterv
Comment 8•4 years ago
|
||
Backed out changeset 1e166841f170 (bug 1353466) for Mochitest failures in gecko/dom/base/nsGlobalWindowOuter.cpp. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304540428&repo=autoland&lineNumber=4081
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=L1zu2F-wRkqhIdEms8d64A-1&revision=1e166841f170792c79338488b1379b85b0f5c7ab
Backout:
https://hg.mozilla.org/integration/autoland/rev/e8d0f18c2300a223c31847d27196d1a8ad673515
Flags: needinfo?(bugs)
Backout by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8d0f18c2300 Backed out changeset 1e166841f170 for Mochitest failures in gecko/dom/base/nsGlobalWindowOuter.cpp. CLOSED TREE
Assignee | ||
Comment 10•4 years ago
|
||
aha, IsFrame() is broken in Fission.
Assignee | ||
Comment 11•4 years ago
|
||
Flags: needinfo?(bugs)
Comment 12•4 years ago
|
||
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a312f7cd30fc 'A browsing context is script-closable ... if it is a top-level browsing context whose session history contains only one Document', r=peterv
Comment 13•4 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox79:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in
before you can comment on or make changes to this bug.
Description
•