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

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

Issue 356933002: Introduce FullscreenElementStack::RequestType (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 b499a8f0ac1e7071c88014395c9cff04cf28faa0..239fe6a6a818725700a660821d6efb5922a8b9b2 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -145,7 +145,7 @@ void FullscreenElementStack::documentWasDisposed()
}
#endif
-void FullscreenElementStack::requestFullScreenForElement(Element& element, unsigned short flags, FullScreenCheckType checkType)
+void FullscreenElementStack::requestFullScreenForElement(Element& element, RequestType requestType)
{
// Ignore this request if the document is not in a live frame.
if (!document()->isActive())
@@ -153,7 +153,7 @@ void FullscreenElementStack::requestFullScreenForElement(Element& element, unsig
// The Mozilla Full Screen API <https://wiki.mozilla.org/Gecko:FullScreenAPI> has different requirements
// for full screen mode, and do not have the concept of a full screen element stack.
- bool inLegacyMozillaMode = (flags & Element::LEGACY_MOZILLA_REQUEST);
+ bool inLegacyMozillaMode = requestType == PrefixedMozillaRequest || requestType == PrefixedMozillaAllowKeyboardInputRequest;
do {
// 1. If any of the following conditions are true, terminate these steps and queue a task to fire
@@ -166,7 +166,7 @@ void FullscreenElementStack::requestFullScreenForElement(Element& element, unsig
// The context object's node document, or an ancestor browsing context's document does not have
// the fullscreen enabled flag set.
- if (checkType == EnforceIFrameAllowFullScreenRequirement && !fullscreenIsAllowedForAllOwners(element.document()))
+ if (requestType != PrefixedVideoRequest && !fullscreenIsAllowedForAllOwners(element.document()))
break;
// The context object's node document fullscreen element stack is not empty and its top element
@@ -249,7 +249,7 @@ void FullscreenElementStack::requestFullScreenForElement(Element& element, unsig
// 5. Return, and run the remaining steps asynchronously.
// 6. Optionally, perform some animation.
- m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT;
+ m_areKeysEnabledInFullScreen = requestType != PrefixedMozillaRequest && requestType != PrefixedVideoRequest;
document()->frameHost()->chrome().client().enterFullScreenForElement(&element);
// 7. Optionally, display a message indicating how the user can exit displaying the context object fullscreen.
« 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