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

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

Issue 2168373002: Revert of Reland "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve WebFrameTest.cpp conflict and appease presubmit Created 4 years, 5 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 1d0f0fcc1cfe818faf7921877ab15ccf4eba3ca6..53c7cbcb2350a480b61090f6c674cbd59eb564a7 100644
--- a/third_party/WebKit/Source/web/FullscreenController.cpp
+++ b/third_party/WebKit/Source/web/FullscreenController.cpp
@@ -37,6 +37,7 @@
#include "core/frame/PageScaleConstraintsSet.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/HTMLVideoElement.h"
+#include "core/layout/LayoutFullScreen.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/WebLayerTreeView.h"
#include "public/web/WebFrameClient.h"
@@ -130,13 +131,6 @@ 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;
@@ -174,13 +168,6 @@ void FullscreenController::exitFullScreenForElement(Element* element)
{
DCHECK(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
- element->document().removeFromTopLayer(element);
-
// The client is exiting full screen, so don't send a notification.
if (m_isCancelingFullScreen)
return;
@@ -197,9 +184,9 @@ void FullscreenController::updateSize()
updatePageScaleConstraints(false);
- Document* document = m_fullScreenFrame->document();
- if (Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(*document))
- Fullscreen::from(fullscreenElement->document()).didUpdateSize(*fullscreenElement);
+ LayoutFullScreen* layoutObject = Fullscreen::from(*m_fullScreenFrame->document()).fullScreenLayoutObject();
+ if (layoutObject)
+ layoutObject->updateStyle();
}
void FullscreenController::didUpdateLayout()
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698