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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1472083006: Root layer scrolling: set correct size for document's main GraphicsLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@garden
Patch Set: Created 5 years 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/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index e28864f96d0874722932b54f20c660b40fd59c93..2e0fab6cc8e0fab36282462238f5e7788f8a1993 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -52,6 +52,7 @@
#include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/html/HTMLFrameElement.h"
#include "core/layout/HitTestRequest.h"
#include "core/layout/HitTestResult.h"
@@ -2185,8 +2186,8 @@ LayoutRect PaintLayer::boundingBoxForCompositing(const PaintLayer* ancestorLayer
if (this != ancestorLayer && !hasVisibleContent() && !hasVisibleDescendant())
return LayoutRect();
- // The root layer is always just the size of the document.
- if (isRootLayer())
+ // Without composited scrolling, the root layer is the size of the document.
+ if (isRootLayer() && !needsCompositedScrolling())
Ian Vollick 2015/12/22 03:21:50 If the root layer does need composited scrolling,
skobes 2015/12/28 23:33:17 It does return the viewRect, indirectly, since the
Ian Vollick 2015/12/29 00:54:29 Thanks, lgtm.
return LayoutRect(m_layoutObject->view()->documentRect());
// The layer created for the LayoutFlowThread is just a helper for painting and hit-testing,
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698