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

Consume user activation when creating a new top-level traversable #10547

Merged

Conversation

CanadaHonk
Copy link
Member

@CanadaHonk CanadaHonk commented Aug 5, 2024

Closes #10108.

(See WHATWG Working Mode: Changes for more details.)


/document-sequences.html ( diff )

Copy link
Member

@zcorpan zcorpan left a comment

Choose a reason for hiding this comment

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

I think this looks reasonable. It will only consume when actually creating a top-level traversable.

source Show resolved Hide resolved
source Show resolved Hide resolved
@zcorpan zcorpan self-assigned this Aug 30, 2024
@EdgarChen
Copy link
Member

WPT tests will be added in https://bugzilla.mozilla.org/show_bug.cgi?id=1879820.

@annevk
Copy link
Member

annevk commented Nov 12, 2024

Thanks! @zcorpan can you complete OP?

@zcorpan
Copy link
Member

zcorpan commented Nov 18, 2024

The multi-global test highlights a difference between this PR and what is implemented in Chromium.

currentNavigable is set by

  1. Let sourceDocument be the entry global object's associated Document.
  2. Let targetNavigable and windowType be the result of applying the rules for choosing a navigable given target, sourceDocument's node navigable, and noopener.

https://html.spec.whatwg.org/#window-open-steps

So the user activation is consumed in the entry global. But Chromium consumes in the relevant global per: web-platform-tests/wpt#49138 (comment)

I think using the entry global makes sense if other things of the window open steps use that (as currently defined).

@zcorpan
Copy link
Member

zcorpan commented Nov 18, 2024

Thanks! @zcorpan can you complete OP?

Done.

@zcorpan zcorpan merged commit 49976e0 into whatwg:main Nov 20, 2024
2 checks passed
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request Nov 20, 2024
AtkinsSJ added a commit to AtkinsSJ/ladybird that referenced this pull request Nov 25, 2024
awesomekling pushed a commit to LadybirdBrowser/ladybird that referenced this pull request Nov 26, 2024
nico pushed a commit to nico/serenity that referenced this pull request Nov 26, 2024
Corresponds to whatwg/html#10547

(cherry picked from commit 2c7e73072685d241585795c8f82bb9f1b1840c98)
nico pushed a commit to SerenityOS/serenity that referenced this pull request Nov 27, 2024
Corresponds to whatwg/html#10547

(cherry picked from commit 2c7e73072685d241585795c8f82bb9f1b1840c98)
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 27, 2024
….open (multi-global test), a=testonly

Automatic update from web-platform-tests
HTML: Consume user activation for window.open (multi-global test)

See whatwg/html#10547
--

wpt-commits: 5ec8ba6d68f27d49a056cbf940e3bc9a8324c538
wpt-pr: 49138
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 30, 2024
….open (multi-global test), a=testonly

Automatic update from web-platform-tests
HTML: Consume user activation for window.open (multi-global test)

See whatwg/html#10547
--

wpt-commits: 5ec8ba6d68f27d49a056cbf940e3bc9a8324c538
wpt-pr: 49138
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 1, 2024
….open (multi-global test), a=testonly

Automatic update from web-platform-tests
HTML: Consume user activation for window.open (multi-global test)

See whatwg/html#10547
--

wpt-commits: 5ec8ba6d68f27d49a056cbf940e3bc9a8324c538
wpt-pr: 49138

UltraBlame original commit: 3da7235374ed270a493d09f34f3c394c87b74de9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 1, 2024
….open (multi-global test), a=testonly

Automatic update from web-platform-tests
HTML: Consume user activation for window.open (multi-global test)

See whatwg/html#10547
--

wpt-commits: 5ec8ba6d68f27d49a056cbf940e3bc9a8324c538
wpt-pr: 49138

UltraBlame original commit: 3da7235374ed270a493d09f34f3c394c87b74de9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 1, 2024
….open (multi-global test), a=testonly

Automatic update from web-platform-tests
HTML: Consume user activation for window.open (multi-global test)

See whatwg/html#10547
--

wpt-commits: 5ec8ba6d68f27d49a056cbf940e3bc9a8324c538
wpt-pr: 49138

UltraBlame original commit: 3da7235374ed270a493d09f34f3c394c87b74de9
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2024
Per whatwg/html#10547, we should always consume the
user activation even if the popup blocker is disabled or the window has
permission to open a new window.

Differential Revision: https://phabricator.services.mozilla.com/D230331

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1930458
gecko-commit: a63ca42b209f7b7eb5d84a897d4f7a6efacbf98c
gecko-reviewers: smaug
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 4, 2024
…ow; r=smaug

Per whatwg/html#10547, we should always consume the
user activation even if the popup blocker is disabled or the window has
permission to open a new window.

Differential Revision: https://phabricator.services.mozilla.com/D230331
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 4, 2024
Per whatwg/html#10547, we should always consume the
user activation even if the popup blocker is disabled or the window has
permission to open a new window.

Differential Revision: https://phabricator.services.mozilla.com/D230331

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1930458
gecko-commit: a63ca42b209f7b7eb5d84a897d4f7a6efacbf98c
gecko-reviewers: smaug
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Dec 6, 2024
…ow; r=smaug

Per whatwg/html#10547, we should always consume the
user activation even if the popup blocker is disabled or the window has
permission to open a new window.

Differential Revision: https://phabricator.services.mozilla.com/D230331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Should <a target="_blank"> and window.open consume the transient activation?
5 participants