зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168705 part 2 - Move fullscreenchange event to be triggered after the related chrome events. r=smaug
--HG-- extra : source : 0d125f8a263647ad6fdf4675d4f3ad8c511fc9f4
This commit is contained in:
Родитель
e71f015f03
Коммит
0e522bae44
|
@ -11823,13 +11823,6 @@ nsDocument::ApplyFullscreen(const FullscreenRequest& aRequest)
|
|||
}
|
||||
}
|
||||
|
||||
// Dispatch "mozfullscreenchange" events. Note this loop is in reverse
|
||||
// order so that the events for the root document arrives before the leaf
|
||||
// document, as required by the spec.
|
||||
for (uint32_t i = 0; i < changed.Length(); ++i) {
|
||||
DispatchFullScreenChange(changed[changed.Length() - i - 1]);
|
||||
}
|
||||
|
||||
// If this document hasn't already been approved in this session,
|
||||
// check to see if the user has granted the fullscreen access
|
||||
// to the document's principal's host, if it has one. Note that documents
|
||||
|
@ -11842,6 +11835,8 @@ nsDocument::ApplyFullscreen(const FullscreenRequest& aRequest)
|
|||
nsContentUtils::IsSitePermAllow(NodePrincipal(), "fullscreen");
|
||||
}
|
||||
|
||||
FullscreenRoots::Add(this);
|
||||
|
||||
// If it is the first entry of the fullscreen, trigger an event so
|
||||
// that the UI can response to this change, e.g. hide chrome, or
|
||||
// notifying parent process to enter fullscreen. Note that chrome
|
||||
|
@ -11871,7 +11866,12 @@ nsDocument::ApplyFullscreen(const FullscreenRequest& aRequest)
|
|||
asyncDispatcher->PostDOMEvent();
|
||||
}
|
||||
|
||||
FullscreenRoots::Add(this);
|
||||
// Dispatch "mozfullscreenchange" events. Note this loop is in reverse
|
||||
// order so that the events for the root document arrives before the leaf
|
||||
// document, as required by the spec.
|
||||
for (uint32_t i = 0; i < changed.Length(); ++i) {
|
||||
DispatchFullScreenChange(changed[changed.Length() - i - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче