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

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

Issue 428633004: Webkit setting for embedders that do not support fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename to fullscreenSupported Created 6 years, 4 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
Index: Source/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index c5fc482260612002eba1cabbc9cfbfc5bb253c7c..fad5bad892f4b1a5220cb92abce90e79b1de9869 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -33,8 +33,10 @@
#include "core/events/Event.h"
#include "core/frame/FrameHost.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLFrameOwnerElement.h"
+#include "core/html/HTMLMediaElement.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/rendering/RenderFullScreen.h"
@@ -212,6 +214,10 @@ void FullscreenElementStack::requestFullScreenForElement(Element& element, Reque
break;
// There is a previously-established user preference, security risk, or platform limitation.
+ if (!document()->settings()->fullscreenSupported())
+ break;
+ if (document()->settings()->disallowFullscreenForNonMediaElements() && !isHTMLMediaElement(element))
+ break;
// 2. Let doc be element's node document. (i.e. "this")
Document* currentDoc = document();
« no previous file with comments | « LayoutTests/fullscreen/full-screen-request-not-supported-expected.txt ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698