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..33afc82d76202a4ed89e9a22c386969041ac702b 100644 |
| --- a/third_party/WebKit/Source/web/FullscreenController.cpp |
| +++ b/third_party/WebKit/Source/web/FullscreenController.cpp |
| @@ -137,6 +137,8 @@ void FullscreenController::didExitFullScreen() |
| void FullscreenController::enterFullScreenForElement(Element* element) |
| { |
| + element->document().addToTopLayer(element); |
|
dsinclair
2015/09/28 19:22:04
This fixes up the WebView unit test crash by makin
esprehn
2015/09/28 20:33:47
It seems really weird that we need this in two pla
philipj_slow
2015/09/29 08:05:23
I'm not sure if it's the case here, but there's a
dsinclair
2015/10/01 14:50:14
Added comment and filed bug.
|
| + |
| // We are already transitioning to fullscreen for a different element. |
| if (m_provisionalFullScreenElement) { |
| m_provisionalFullScreenElement = element; |
| @@ -162,6 +164,8 @@ void FullscreenController::exitFullScreenForElement(Element* element) |
| { |
| ASSERT(element); |
| + element->document().removeFromTopLayer(element); |
| + |
| // The client is exiting full screen, so don't send a notification. |
| if (m_isCancelingFullScreen) |
| return; |
| @@ -178,9 +182,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) |
| + Fullscreen::from(fullscreenElement->document()).updatedSize(fullscreenElement); |
| } |
| void FullscreenController::updatePageScaleConstraints(bool removeConstraints) |