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

Unified Diff: Source/core/rendering/RenderFullScreen.cpp

Issue 662393003: Revert 183623 "Fix fullscreen elements in pinch viewport mode." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2194/
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderFullScreen.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFullScreen.cpp
===================================================================
--- Source/core/rendering/RenderFullScreen.cpp (revision 183995)
+++ Source/core/rendering/RenderFullScreen.cpp (working copy)
@@ -26,14 +26,8 @@
#include "core/rendering/RenderFullScreen.h"
#include "core/dom/Fullscreen.h"
-#include "core/frame/FrameHost.h"
-#include "core/frame/Settings.h"
-#include "core/page/Chrome.h"
-#include "core/page/Page.h"
#include "core/rendering/RenderBlockFlow.h"
-#include "public/platform/WebScreenInfo.h"
-
using namespace blink;
class RenderFullScreenPlaceholder final : public RenderBlockFlow {
@@ -94,7 +88,7 @@
RenderFlexibleBox::willBeDestroyed();
}
-void RenderFullScreen::updateStyle()
+static PassRefPtr<RenderStyle> createFullScreenStyle()
{
RefPtr<RenderStyle> fullscreenStyle = RenderStyle::createDefaultStyle();
@@ -110,20 +104,14 @@
fullscreenStyle->setFlexDirection(FlowColumn);
fullscreenStyle->setPosition(FixedPosition);
+ fullscreenStyle->setWidth(Length(100.0, Percent));
+ fullscreenStyle->setHeight(Length(100.0, Percent));
fullscreenStyle->setLeft(Length(0, blink::Fixed));
fullscreenStyle->setTop(Length(0, blink::Fixed));
- if (document().page()->settings().pinchVirtualViewportEnabled()) {
- IntSize viewportSize = document().page()->frameHost().pinchViewport().size();
- fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed));
- fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed));
- } else {
- fullscreenStyle->setWidth(Length(100.0, Percent));
- fullscreenStyle->setHeight(Length(100.0, Percent));
- }
fullscreenStyle->setBackgroundColor(StyleColor(Color::black));
- setStyle(fullscreenStyle);
+ return fullscreenStyle.release();
}
RenderObject* RenderFullScreen::wrapRenderer(RenderObject* object, RenderObject* parent, Document* document)
@@ -133,7 +121,7 @@
DeprecatedDisableModifyRenderTreeStructureAsserts disabler;
RenderFullScreen* fullscreenRenderer = RenderFullScreen::createAnonymous(document);
- fullscreenRenderer->updateStyle();
+ fullscreenRenderer->setStyle(createFullScreenStyle());
if (parent && !parent->isChildAllowed(fullscreenRenderer, fullscreenRenderer->style())) {
fullscreenRenderer->destroy();
return 0;
« no previous file with comments | « Source/core/rendering/RenderFullScreen.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698