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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2461463004: Resize background-attachment: fixed when inertTopControls is enabled. (Closed)
Patch Set: Added test for non-fixed-attachment Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5c8daac7b6ac0bc4e8d64bb70c4a93f61fe64d14..72a7fd0bbb85de81531096f5ab93f014ead86901 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1483,6 +1483,23 @@ void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) {
lvi.setShouldDoFullPaintInvalidation();
}
+ if (RuntimeEnabledFeatures::inertTopControlsEnabled() && layoutView() &&
+ layoutView()->style()->hasFixedBackgroundImage()) {
+ // In the case where we don't change layout size from top control resizes,
+ // we wont perform a layout. If we have a fixed background image however,
+ // the background layer needs to get resized so we should request a layout
+ // explicitly.
+ PaintLayer* layer = layoutView()->layer();
+ if (layoutView()->compositor()->needsFixedRootBackgroundLayer(layer)) {
+ setNeedsLayout();
+ } else if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ // If root layer scrolls is on, we've already issued a full invalidation
+ // above.
+ layoutView()->setShouldDoFullPaintInvalidationOnResizeIfNeeded(
+ widthChanged, heightChanged);
+ }
+ }
+
if (!hasViewportConstrainedObjects())
return;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698