Closed
Bug 1470346
Opened 7 years ago
Closed 7 years ago
Gesture activation should activate entire doctree branch
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
Attachments
(1 file)
Sometimes when video is playing, a preroll ad plays, and in some cases that may be in a cross origin iframe. If we require gesture activation to play, then the user will have to click once for the cross origin ad, and then once the preroll ad finishes, the user will have to click again to activate playback of the same origin content video.
This is annoying. Also once we start prompting for permission to autoplay with a doorhanger, this will be doubly annoying.
So we should change our gesture activation strategy so that a gesture activation anywhere in the doc tree activates the entire doc tree.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8986982 [details]
Bug 1470346 - Gesture activate all documents in tab, even across origins, upon user interaction.
https://reviewboard.mozilla.org/r/252242/#review259200
Yeah, I guess this is fine. Users don't know about random origins in iframes. For them page is page, and it is the top level thing only.
::: dom/base/nsDocument.cpp:12525
(Diff revision 1)
> - return mUserHasActivatedInteraction;
> + // If any ancestor document is activated, so are we.
> + nsIDocument* doc = GetSameTypeParentDocument();
> + while (doc) {
> + if (doc->mUserGestureActivated) {
> + // An ancestor is also activated. Record activation on the unactivated
> + // sub-brranch to speed up future queries.
brranch
Attachment #8986982 -
Flags: review?(bugs) → review+
Comment hidden (mozreview-request) |
Pushed by cpearce@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4cee97f375da
Gesture activate all documents in tab, even across origins, upon user interaction. r=smaug
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•