Chromium Code Reviews| Index: Source/core/dom/FullscreenElementStack.cpp |
| diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp |
| index e248d9c40b9cf75d2b4d7606f84f38c7bf2adf88..93802e3ef0bdea4eda24af921cc44eca25ea76e2 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()? |
|
abarth-chromium
2013/10/09 23:53:54
I think so!
|
| + 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(); |