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

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

Issue 26444008: Remove several Page.h includes in preparation for removing page/ dependencies from the rest of core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Now 100% more buildable on debug Created 7 years, 2 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/Document.cpp ('k') | Source/core/html/HTMLMetaElement-in.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 98b7b0f7fcded9366010b3163f5130143c2bbb79..d9a8e6a3ea7916dc6283a8fc8c9a0f1e118afe46 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -184,12 +184,13 @@ void FullscreenElementStack::requestFullScreenForElement(Element* element, unsig
// An algorithm is allowed to show a pop-up if, in the task in which the algorithm is running, either:
// - an activation behavior is currently being processed whose click event was trusted, or
// - the event listener for a trusted click event is being handled.
- if (!UserGestureIndicator::processingUserGesture() && (!element->isMediaElement() || document()->page()->settings().mediaFullscreenRequiresUserGesture()))
+ // FIXME: Does this need to null-check settings()?
+ if (!UserGestureIndicator::processingUserGesture() && (!element->isMediaElement() || document()->settings()->mediaFullscreenRequiresUserGesture()))
break;
UserGestureIndicator::consumeUserGesture();
// There is a previously-established user preference, security risk, or platform limitation.
- if (!document()->page() || !document()->page()->settings().fullScreenEnabled())
+ if (!document()->settings() || !document()->settings()->fullScreenEnabled())
break;
// 2. Let doc be element's node document. (i.e. "this")
@@ -358,10 +359,10 @@ void FullscreenElementStack::webkitWillEnterFullScreenForElement(Element* elemen
ASSERT(element);
// Protect against being called after the document has been removed from the page.
- if (!document()->page())
+ if (!document()->settings())
return;
- ASSERT(document()->page()->settings().fullScreenEnabled());
+ ASSERT(document()->settings()->fullScreenEnabled());
if (m_fullScreenRenderer)
m_fullScreenRenderer->unwrapRenderer();
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/HTMLMetaElement-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698