Skip to content
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

Define Window's opener when there's no browsing context #4379

Merged
merged 3 commits into from
Mar 4, 2019

Conversation

annevk
Copy link
Member

@annevk annevk commented Feb 19, 2019

@annevk
Copy link
Member Author

annevk commented Feb 19, 2019

This makes me think "current browsing context" is probably not a good idea.

@annevk
Copy link
Member Author

annevk commented Feb 19, 2019

@bzbarsky if you could have a look that's be great. I aimed to match Firefox since Chrome/Safari are wrong when it comes to the global and there's bugs on that already.

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but will let you sync the introductory sentences across this and other PRs before we merge.

source Show resolved Hide resolved
Copy link
Contributor

@bzbarsky bzbarsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 22, 2019
annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 22, 2019
@annevk
Copy link
Member Author

annevk commented Feb 22, 2019

@bzbarsky it seems like this isn't what we do for opener of an auxiliary browsing context for some reason? Per web-platform-tests/wpt#15518 it continues to return a WindowProxy object after closing the browsing context.

@annevk annevk added the do not merge yet Pull request must not be merged per rationale in comment label Feb 22, 2019
@bzbarsky
Copy link
Contributor

bzbarsky commented Mar 1, 2019

@annevk window.close() does the browsing context discarding off a task in Gecko, not synchronously. That explains the difference in behavior the test is showing, I expect.

@bzbarsky
Copy link
Contributor

bzbarsky commented Mar 1, 2019

Sometimes off two nested tasks, btw, if the entry global is the window being closed... The code comments for that start off with:

  // This stuff is non-sensical but incredibly fragile. The reasons for the
  // behavior here don't make sense today and may not have ever made sense,

and go on to talk about how various code in at least the Firefox UI breaks if you change the behavior, interaction with timeouts that are set after the close() call, etc. See https://searchfox.org/mozilla-central/rev/00f3836a87b844b5e4bc82f698c559b9966e4be2/dom/base/nsGlobalWindowOuter.cpp#6229-6248 for gory details.

@annevk
Copy link
Member Author

annevk commented Mar 2, 2019

Given that there's now #4405 to track window.close() I think we can merge this as it's still the correct behavior. It's just that discarding happens later with window.close() than anticipated.

@annevk annevk removed the do not merge yet Pull request must not be merged per rationale in comment label Mar 2, 2019
@annevk annevk merged commit 7c9a8c0 into master Mar 4, 2019
@annevk annevk deleted the annevk/window-opener-sans-bc branch March 4, 2019 13:49
annevk added a commit to web-platform-tests/wpt that referenced this pull request Mar 7, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 15, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Mar 16, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 16, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Mar 17, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 1, 2019
…wsing context, a=testonly

Automatic update from web-platform-tests
HTML: opener and discarded auxiliary browsing context

For whatwg/html#4379.
--

wpt-commits: 3df07160e80e074edf0579627b7d5689f7bebf7b
wpt-pr: 15518
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Apr 2, 2019
…wsing context, a=testonly

Automatic update from web-platform-tests
HTML: opener and discarded auxiliary browsing context

For whatwg/html#4379.
--

wpt-commits: 3df07160e80e074edf0579627b7d5689f7bebf7b
wpt-pr: 15518
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 23, 2019
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 23, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461

UltraBlame original commit: 2f41234f6509a10f9ff8438bde2ec7b28f98cb76
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461

UltraBlame original commit: 063b443f99cd6346bfaf3ac5f93f0c7019a27550
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…wsing context, a=testonly

Automatic update from web-platform-tests
HTML: opener and discarded auxiliary browsing context

For whatwg/html#4379.
--

wpt-commits: 3df07160e80e074edf0579627b7d5689f7bebf7b
wpt-pr: 15518

UltraBlame original commit: c1ae8fa14e174cd51576e4b63a69d88e1180c64a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461

UltraBlame original commit: 2f41234f6509a10f9ff8438bde2ec7b28f98cb76
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461

UltraBlame original commit: 063b443f99cd6346bfaf3ac5f93f0c7019a27550
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…wsing context, a=testonly

Automatic update from web-platform-tests
HTML: opener and discarded auxiliary browsing context

For whatwg/html#4379.
--

wpt-commits: 3df07160e80e074edf0579627b7d5689f7bebf7b
wpt-pr: 15518

UltraBlame original commit: c1ae8fa14e174cd51576e4b63a69d88e1180c64a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461

UltraBlame original commit: 2f41234f6509a10f9ff8438bde2ec7b28f98cb76
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…ontext, a=testonly

Automatic update from web-platform-tests
HTML: opener of a Window sans browsing context

For whatwg/html#4379.
--

wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a
wpt-pr: 15461

UltraBlame original commit: 063b443f99cd6346bfaf3ac5f93f0c7019a27550
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…wsing context, a=testonly

Automatic update from web-platform-tests
HTML: opener and discarded auxiliary browsing context

For whatwg/html#4379.
--

wpt-commits: 3df07160e80e074edf0579627b7d5689f7bebf7b
wpt-pr: 15518

UltraBlame original commit: c1ae8fa14e174cd51576e4b63a69d88e1180c64a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants