зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187801 part 2 - Put clearing fullscreen state on element into an independent function. r=smaug
--HG-- extra : source : d461799695d7fe5325066d4134d0a57eac407627
This commit is contained in:
Родитель
7ea7355828
Коммит
2d891027c2
|
@ -11354,6 +11354,15 @@ UpdateViewportScrollbarOverrideForFullscreen(nsIDocument* aDoc)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ClearFullscreenStateOnElement(Element* aElement)
|
||||
{
|
||||
// Remove any VR state properties
|
||||
aElement->DeleteProperty(nsGkAtoms::vr_state);
|
||||
// Remove styles from existing top element.
|
||||
EventStateManager::SetFullScreenState(aElement, false);
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::CleanupFullscreenState()
|
||||
{
|
||||
|
@ -11366,9 +11375,7 @@ nsDocument::CleanupFullscreenState()
|
|||
// after bug 1195213.
|
||||
for (nsWeakPtr& weakPtr : Reversed(mFullScreenStack)) {
|
||||
if (nsCOMPtr<Element> element = do_QueryReferent(weakPtr)) {
|
||||
// Remove any VR state properties
|
||||
element->DeleteProperty(nsGkAtoms::vr_state);
|
||||
EventStateManager::SetFullScreenState(element, false);
|
||||
ClearFullscreenStateOnElement(element);
|
||||
}
|
||||
}
|
||||
mFullScreenStack.Clear();
|
||||
|
@ -11398,13 +11405,7 @@ nsDocument::FullScreenStackPop()
|
|||
return;
|
||||
}
|
||||
|
||||
Element* top = FullScreenStackTop();
|
||||
|
||||
// Remove any VR state properties
|
||||
top->DeleteProperty(nsGkAtoms::vr_state);
|
||||
|
||||
// Remove styles from existing top element.
|
||||
EventStateManager::SetFullScreenState(top, false);
|
||||
ClearFullscreenStateOnElement(FullScreenStackTop());
|
||||
|
||||
// Remove top element. Note the remaining top element in the stack
|
||||
// will not have full-screen style bits set, so we will need to restore
|
||||
|
|
Загрузка…
Ссылка в новой задаче