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

Clarify Window's focus() and blur() #4377

Merged
merged 2 commits into from
Feb 22, 2019
Merged

Clarify Window's focus() and blur() #4377

merged 2 commits into from
Feb 22, 2019

Conversation

annevk
Copy link
Member

@annevk annevk commented Feb 19, 2019

In particular when there's a null browsing context, for #4363.

Tests: web-platform-tests/wpt#15460.


/interaction.html ( diff )

In particular when there's a null browsing context, for #4363.

Tests: web-platform-tests/wpt#15460.
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.

Some ways to make this even better, but feel free to push back if you feel that I'm scope-creeping.

source Show resolved Hide resolved
source Show resolved Hide resolved
provides a hint to the user agent that the script believes the user probably is not currently
interested in the contents of this <code>Window</code> object's <span data-x="window bc">browsing
context</span>, if non-null, but that the contents might become interesting again in the
future.</p>
Copy link
Member

Choose a reason for hiding this comment

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

This could become a three-step algorithm.

  1. User agents should return at this point, causing the method to do nothing.
  2. If the BC is null, return.
  3. If this point is reached, then the page author has provided a hint...

Note that it does nothing in Blink (1, 2). It seems to do something in Safari, sometimes (1, 2). I couldn't untangle Gecko's mess of window-related classes enough to find the blur method implementation there.

@annevk
Copy link
Member Author

annevk commented Feb 22, 2019

I've fixed the minor nits, but let's leave the bigger blur() question/refactoring for #4381.

annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 22, 2019
@annevk annevk requested a review from domenic February 22, 2019 10:03
@annevk annevk merged commit 12969e1 into master Feb 22, 2019
@annevk annevk deleted the annevk/window-focus-bc branch February 22, 2019 16:14
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 15, 2019
…xt, a=testonly

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Mar 16, 2019
…xt, a=testonly

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

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

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Mar 17, 2019
…xt, a=testonly

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460
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
…xt, a=testonly

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460

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

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460

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

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460

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

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460

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

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460

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

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460

UltraBlame original commit: d3eedffa9545cd523e3632aac00c7336c056cbc6
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