Closed Bug 1489385 Opened 6 years ago Closed 6 years ago

Refactor fullscreen event dispatching code in preparation for bug 1375319

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(2 files)

There are several other steps I'd like to take before getting to bug 1375319, which should make each step of change smaller and more self-contained. But they would all depend on this refactor, so I think it's better to land this code first.
Assignee: nobody → xidorn+moz
Blocks: 1489387
In following patches, we are changing how fullscreen events dispatches,
and this patch removes the only dependency of the original mechanism
outside content-exposed fullscreen events.

Listeners of NewOrigin event nowadays just send a message to the chrome,
so it doesn't really matter a lot when is it dispatched.

This event was made that way as part of bug 1168705. I cannot recall
the exact reason for doing so, but maybe that time we still care about
non-e10s, and syncing this event with flush can help merging the browser
chrome UI change into the same flush on non-e10s.
The mechanism was added in bug 1168705 for fullscreen, and is only used
for this since then. The spec now has a specific step for this in the
event loop, so specialize this mechanism to match the spec closer.

This patch also changes the caller type of the fullscreenchange event
from non-system to system (via using DispatchTrustedEvent rather than
EventTarget::DispatchEvent(Event&)).

Depends on D5234
Priority: -- → P2
Comment on attachment 9007138 [details]
Bug 1489385 part 1 - Have MozDOMFullscreen::NewOrigin event de-aligned with refresh driver. r=smaug

Olli Pettay [:smaug] has approved the revision.
Attachment #9007138 - Flags: review+
Comment on attachment 9007139 [details]
Bug 1489385 part 2 - Make the refresh driver event dispatching specific to fullscreen events. r=smaug

Olli Pettay [:smaug] has approved the revision.
Attachment #9007139 - Flags: review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/584fc6b2a227
part 1 - Have MozDOMFullscreen::NewOrigin event de-aligned with refresh driver. r=smaug
https://hg.mozilla.org/integration/autoland/rev/96c0d4043581
part 2 - Make the refresh driver event dispatching specific to fullscreen events. r=smaug
https://hg.mozilla.org/mozilla-central/rev/584fc6b2a227
https://hg.mozilla.org/mozilla-central/rev/96c0d4043581
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: