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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 0dc1740488d3be457262faef17a4bf9e68808918..a0885bbf1e091a979613fc49c07b9ebb47d410db 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1258,6 +1258,17 @@ void FrameView::removeViewportConstrainedObject(LayoutObject* object)
void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged)
{
+ if (m_frame->settings() && m_frame->settings()->rootLayerScrolls()) {
+ // The background must be repainted when the FrameView is resized, even if the initial
+ // containing block does not change (so we can't rely on layout to issue the invalidation).
+ // This is because the background fills the main GraphicsLayer, which takes the size of the
+ // layout viewport.
+ // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents layer and avoid
+ // this invalidation (http://crbug.com/568847).
+ if (LayoutView* lv = layoutView())
+ lv->setShouldDoFullPaintInvalidation();
+ }
+
if (!hasViewportConstrainedObjects())
return;

Powered by Google App Engine
This is Rietveld 408576698