Chromium Code Reviews| Index: third_party/WebKit/Source/web/FullscreenController.cpp |
| diff --git a/third_party/WebKit/Source/web/FullscreenController.cpp b/third_party/WebKit/Source/web/FullscreenController.cpp |
| index 019c1d2e18be77f7baabaf7b55f91b3117a9926d..ce146ff3c6e0f154b1e2191298fbd41a619be0b2 100644 |
| --- a/third_party/WebKit/Source/web/FullscreenController.cpp |
| +++ b/third_party/WebKit/Source/web/FullscreenController.cpp |
| @@ -137,6 +137,13 @@ void FullscreenController::didExitFullScreen() |
| void FullscreenController::enterFullScreenForElement(Element* element) |
| { |
| + // TODO(dsinclair): This should not be needed because we addToTopLayer |
| + // in Fullscreen::pushFullscreenElementStack but, the WebView code doesn't |
| + // call Fullscreen::requestFullscreen() and, instead, just enters and |
| + // exists itself. This should be unified so there is one way to go |
| + // fullscreen. crbug.com/538158 |
| + element->document().addToTopLayer(element); |
| + |
| // We are already transitioning to fullscreen for a different element. |
| if (m_provisionalFullScreenElement) { |
| m_provisionalFullScreenElement = element; |
| @@ -162,6 +169,13 @@ void FullscreenController::exitFullScreenForElement(Element* element) |
| { |
| ASSERT(element); |
| + // TODO(dsinclair): This should not be needed because we addToTopLayer |
| + // in Fullscreen::popFullscreenElementStack but, the WebView code doesn't |
| + // call Fullscreen::requestFullscreen() and, instead, just enters and |
| + // exists itself. This should be unified so there is one way to go |
| + // fullscreen. crbug.com/538158 |
|
esprehn
2015/10/09 10:34:00
good catch
dsinclair
2015/10/13 15:50:43
Acknowledged.
|
| + element->document().removeFromTopLayer(element); |
| + |
| // The client is exiting full screen, so don't send a notification. |
| if (m_isCancelingFullScreen) |
| return; |
| @@ -178,9 +192,10 @@ void FullscreenController::updateSize() |
| updatePageScaleConstraints(false); |
| - LayoutFullScreen* layoutObject = Fullscreen::from(*m_fullScreenFrame->document()).fullScreenLayoutObject(); |
| - if (layoutObject) |
| - layoutObject->updateStyle(); |
| + Document* document = m_fullScreenFrame->document(); |
| + Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(*document); |
| + if (fullscreenElement) |
|
esprehn
2015/10/09 10:34:00
if (Element* fullscreenElement = Fullscreen::curre
dsinclair
2015/10/13 15:50:43
Done.
|
| + Fullscreen::from(fullscreenElement->document()).didUpdateSize(*fullscreenElement); |
| } |
| void FullscreenController::updatePageScaleConstraints(bool removeConstraints) |