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

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: reuse boundingBoxForCompositing in ViewPainter 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 c08e5cb19c52bd634aca0d75ba8b30539d533c71..9c051c7cbe11af0c5e222a9ba97066e8fb9c5559 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -51,6 +51,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"
@@ -2212,8 +2213,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())
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