-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
User Activation: siblings are not processed #9831
Comments
I wonder if instead of all the tree walks we should then just use an origin map on the agent instead. @arturjanc @johannhof I guess there's an ABA question here as well, but probably not compatible to enforce it here. |
So I called out this exact concern in #3851 (comment) (and elsewhere in the thread too). @mustaqahmed can you maybe help clarify what happened here? Same-origin sibling documents were indeed not meant to receive activation, but implementations never got updated and the specification didn't get updated either? |
Looking at this Chromium bug, it seems they want to remove this behavior from their implementation and consider it a bug. Maybe this idea should just be ditched entirely? I can fix WPTs to match current spec. |
I worry about compat, but it seems reasonable to update WPT given the state of the specification. However, let's give @mustaqahmed at least until next week to chime in here? |
Thanks for spotting this. Yes we wanted to make Chrome spec complaint but never got a chance to fix it! And then I missed the crack when added the WPT 🤦🏼. I agree that the compat concerns are real here. I see two ways forward: Let's vote. I am slightly biased towards A. Closely related: User Activation has been proposed as a focus area for Interop 2024: web-platform-tests/interop#428. We need to find a list of WPTs there, and this one is a clear candidate. |
I agree with A too. I've already updated the test in my Gecko patch implementing the API (was going to wait for this issue), so that'll get merged hopefully in the next week or so if everyone is good with that plan. |
Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 gecko-commit: 7c84c5fc7d0002a8bee64ebc66899437638331c6 gecko-reviewers: dom-core, webidl, saschanaz, edgar
Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 gecko-commit: 73919dbff272db85ba6334dca0a9ddfd7f5f039d gecko-reviewers: dom-core, webidl, saschanaz, edgar
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 gecko-commit: fba49989dde6aa32244c622fd43abe19a32128ae gecko-reviewers: dom-core, webidl, saschanaz, edgar
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 gecko-commit: fba49989dde6aa32244c622fd43abe19a32128ae gecko-reviewers: dom-core, webidl, saschanaz, edgar
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
On the narrow, somewhat tangential point about ABA embedding scenarios (same-origin documents with a cross-origin / cross-site ancestor), I think the behavior here is fine from a security/privacy perspective. That is, we are sharing state (activation) across cross-origin ancestors, but this on its own isn't problematic -- the documents can synchronously access and postMessage to each other so this doesn't give them any new capabilities. And because activation is not application state in the same way that e.g. cookies or local storage are, it doesn't seem like the cross-origin ancestor (B) would be able to do anything malicious to leak / affect state from its descendant frame. Security-wise it would also be okay to propagate the activation to siblings, but I agree that it would be somewhat awkward -- the proposed approach of making the WPT match the spec sounds reasonable to me. |
Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 gecko-commit: fba49989dde6aa32244c622fd43abe19a32128ae gecko-reviewers: dom-core, webidl, saschanaz, edgar
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 7c84c5fc7d0002a8bee64ebc66899437638331c6
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 73919dbff272db85ba6334dca0a9ddfd7f5f039d
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: fba49989dde6aa32244c622fd43abe19a32128ae
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 7c84c5fc7d0002a8bee64ebc66899437638331c6
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 73919dbff272db85ba6334dca0a9ddfd7f5f039d
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: fba49989dde6aa32244c622fd43abe19a32128ae
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 7c84c5fc7d0002a8bee64ebc66899437638331c6
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 73919dbff272db85ba6334dca0a9ddfd7f5f039d
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <evilpiesgmail.com> Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: fba49989dde6aa32244c622fd43abe19a32128ae
Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 gecko-commit: fba49989dde6aa32244c622fd43abe19a32128ae gecko-reviewers: dom-core, webidl, saschanaz, edgar
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
What is the issue with the HTML Standard?
Looking at the same-origin propagation WPT, it has a frame tree like this (simplified):
It clicks child two, then expects child one to be
isActive
andhasBeenActive
too.The spec user activation processing model states:
It does not state what to do with the elements siblings (seemingly excluding them), yet the WPT expects the sibling of child two (child one) to be activated. Chromium and WebKit appear to follow the WPT behavior and not spec as above, this should probably be corrected in spec by adding same-origin siblings to windows too.
The text was updated successfully, but these errors were encountered: