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

Unified Diff: third_party/WebKit/Source/web/FullscreenController.cpp

Issue 1363023005: Implement FullScreen using top layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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: 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)

Powered by Google App Engine
This is Rietveld 408576698