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

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

Issue 2461463004: Resize background-attachment: fixed when inertTopControls is enabled. (Closed)
Patch Set: Created 4 years, 2 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
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 6f181a26aa831d2d35deeeaa274f2f9c57e424d1..7125acf18f9b66e64c6c77ead8e5748faf74032c 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 if on, we've already issued a full invalidation
flackr 2016/10/31 18:17:55 nit s/if on/is on
bokan 2016/11/01 20:27:58 Done.
+ // 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') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698