Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: Source/core/dom/FullscreenElementStack.cpp

Issue 387233002: Introduce FullscreenElementStack::fullyExitFullscreen() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/FullscreenElementStack.h ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index 221066ef091e01f8a53815edc5f738936ec6a0a4..9b0ac32319977b0e1068b076055bd8e37f2b16c3 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -268,25 +268,23 @@ void FullscreenElementStack::requestFullScreenForElement(Element& element, Reque
enqueueErrorEvent(element);
}
-void FullscreenElementStack::webkitCancelFullScreen()
+void FullscreenElementStack::fullyExitFullscreen()
{
- // The Mozilla "cancelFullScreen()" API behaves like the W3C "fully exit fullscreen" behavior, which
- // is defined as:
// "To fully exit fullscreen act as if the exitFullscreen() method was invoked on the top-level browsing
// context's document and subsequently empty that document's fullscreen element stack."
if (!fullscreenElementFrom(document()->topDocument()))
return;
// To achieve that aim, remove all the elements from the top document's stack except for the first before
- // calling webkitExitFullscreen():
+ // calling exitFullscreen():
WillBeHeapVector<RefPtrWillBeMember<Element> > replacementFullscreenElementStack;
replacementFullscreenElementStack.append(fullscreenElementFrom(document()->topDocument()));
FullscreenElementStack& topFullscreenElementStack = from(document()->topDocument());
topFullscreenElementStack.m_fullScreenElementStack.swap(replacementFullscreenElementStack);
- topFullscreenElementStack.webkitExitFullscreen();
+ topFullscreenElementStack.exitFullscreen();
}
-void FullscreenElementStack::webkitExitFullscreen()
+void FullscreenElementStack::exitFullscreen()
{
// The exitFullscreen() method must run these steps:
@@ -451,9 +449,9 @@ void FullscreenElementStack::webkitDidExitFullScreenForElement(Element*)
m_fullScreenElement = nullptr;
document()->setNeedsStyleRecalc(SubtreeStyleChange);
- // When webkitCancelFullScreen is called, we call webkitExitFullScreen on the topDocument(). That
- // means that the events will be queued there. So if we have no events here, start the timer on
- // the exiting document.
+ // When fullyExitFullscreen is called, we call exitFullscreen on the topDocument(). That means
+ // that the events will be queued there. So if we have no events here, start the timer on the
+ // exiting document.
Document* exitingDocument = document();
if (m_eventQueue.isEmpty())
exitingDocument = &document()->topDocument();
@@ -529,7 +527,7 @@ void FullscreenElementStack::eventQueueTimerFired(Timer<FullscreenElementStack>*
void FullscreenElementStack::fullScreenElementRemoved()
{
m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
- webkitCancelFullScreen();
+ fullyExitFullscreen();
}
void FullscreenElementStack::removeFullScreenElementOfSubtree(Node* node, bool amongChildrenOnly)
« no previous file with comments | « Source/core/dom/FullscreenElementStack.h ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698