Closed Bug 1577499 Opened 2 years ago Closed 2 years ago

Implement transient activation flag

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: edgar, Assigned: edgar, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(3 files)

See https://github.com/whatwg/html/pull/3851.

The transient activation flag indicates the current activation state: Every time document is activated, the UA sets the flag to true. And the UA sets the flag to false when the flag expires.

Blocks: 1577516
Assignee: nobody → echen
Blocks: 1578355
Blocks: 1129227
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/991685fb60f5
Part 1: Implement transient activation flag; r=smaug
https://hg.mozilla.org/integration/autoland/rev/cb2ebcd8d0f5
Part 2: Add tests for transient user activation; r=smaug
https://hg.mozilla.org/integration/autoland/rev/2469f247e873
Part 3: Add cross-origin test for has-been-user-activated flag; r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

I don't really understand this, or what documentation is needed for it. Can you give me some help in explaining what this is for, what MDN docs need updating, and what content needs to be added? Thanks!

Flags: needinfo?(echen)
Blocks: 1509933

Edgar, we are considering the possibility of changing getDisplayMedia()'s transient activation test to look at the toplevel Window, for bug 1704278. (Feature policy default allowlist is "self", so a parent has already opted in and requiring a click in the iframe seems overkill.)

Are you aware of any reason why we should not extend WindowContext::mUserGestureStart to out-of-process WindowContext's?

The main reason for that is there wasn't such a use case, and referencing the user gesture status from another window isn't usually what we want, I think that is why spec defines a rule to propagate the activation state, https://html.spec.whatwg.org/multipage/interaction.html#activation-notification. The restriction of in-process-only could help to catch possible misusage.

You need to log in before you can comment on or make changes to this bug.