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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2643723009: Revert of Remove obsolete code that invalidates document element on LayoutView resize (patchset #3 … (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize-vertical-writing-mode-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index f211a982b81cdf218b5e0441a5a251c52b194d3a..6e5bbf09012e2e1d53e4a08f8e72c507e3c2b3f4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -247,6 +247,8 @@ void LayoutView::layout() {
SubtreeLayoutScope layoutScope(*this);
+ LayoutRect oldLayoutOverflowRect = layoutOverflowRect();
+
// Use calcWidth/Height to get the new width/height, since this will take the
// full page zoom factor into account.
bool relayoutChildren =
@@ -281,6 +283,17 @@ void LayoutView::layout() {
layoutContent();
+ if (layoutOverflowRect() != oldLayoutOverflowRect) {
+ // The document element paints the viewport background, so we need to
+ // invalidate it when layout overflow changes.
+ // FIXME: Improve viewport background styling/invalidation/painting.
+ // crbug.com/475115
+ if (Element* documentElement = document().documentElement()) {
+ if (LayoutObject* rootObject = documentElement->layoutObject())
+ rootObject->setShouldDoFullPaintInvalidation();
+ }
+ }
+
#if ENABLE(ASSERT)
checkLayoutState();
#endif
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize-vertical-writing-mode-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698