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

Issue 2461463004: Resize background-attachment: fixed when inertTopControls is enabled. (Closed)

Created:
4 years, 1 month ago by bokan
Modified:
4 years, 1 month ago
Reviewers:
flackr, Ian Vollick
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Resize background-attachment: fixed when inertTopControls is enabled. When inertTopControls is enabled, hiding the top controls doesn't change the layout height, meaning we don't invalidate layout or paint. However, background-attachment: fixed is sized to the viewport which *is* resized. In this case we need to explicitly do some work to make sure the background updates correctly. If the background is composited, the GraphicsLayer needs to be resized so we mark the frame as needing layout so that happens. If the background isn't composited, we only need to mark the LayoutView (which paints the background) as needing a paint invalidation. LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded would previously check dimensions against viewWidth and viewHeight to determine if an invalidation is needed. I've refactored the method somewhat but viewWidth|Height are actually layout dimensions so I've replaced them with frameView()->visibleContentSize which reflects the size of the viewport. Removed LayoutView::backgroundRect as it's unused. BUG=565930 Committed: https://crrev.com/478af0332a09c2d8179dccf09a6d078a515ffbaf Cr-Commit-Position: refs/heads/master@{#429736}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Patch Set 3 : Improved tests and fixed nit #

Total comments: 1

Patch Set 4 : Added test for non-fixed-attachment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -19 lines) Patch
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.h View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 4 chunks +13 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 2 3 3 chunks +286 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (21 generated)
bokan
Ian, WDYT? For composited backgrounds, needsLayout might be a bit heavy handed, and I got ...
4 years, 1 month ago (2016-10-28 21:03:50 UTC) #5
bokan
vollick@ recommended flackr@ might be a good reviewer for this.
4 years, 1 month ago (2016-10-31 15:33:43 UTC) #9
flackr
https://codereview.chromium.org/2461463004/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2461463004/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode1496 third_party/WebKit/Source/core/frame/FrameView.cpp:1496: // If root layer scrolls if on, we've already ...
4 years, 1 month ago (2016-10-31 18:17:55 UTC) #10
bokan
All comments addressed, ptal. https://codereview.chromium.org/2461463004/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2461463004/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode1496 third_party/WebKit/Source/core/frame/FrameView.cpp:1496: // If root layer scrolls ...
4 years, 1 month ago (2016-11-01 20:27:58 UTC) #14
flackr
Looks good, just one more possible test case. https://codereview.chromium.org/2461463004/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp File third_party/WebKit/Source/web/tests/VisualViewportTest.cpp (right): https://codereview.chromium.org/2461463004/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp#newcode2094 third_party/WebKit/Source/web/tests/VisualViewportTest.cpp:2094: TEST_P(VisualViewportTest, ...
4 years, 1 month ago (2016-11-03 13:28:11 UTC) #19
bokan
On 2016/11/03 13:28:11, flackr wrote: > Looks good, just one more possible test case. > ...
4 years, 1 month ago (2016-11-03 14:45:09 UTC) #20
flackr
lgtm
4 years, 1 month ago (2016-11-03 19:37:27 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2461463004/60001
4 years, 1 month ago (2016-11-03 20:38:49 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-04 00:16:56 UTC) #29
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 00:19:53 UTC) #31
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/478af0332a09c2d8179dccf09a6d078a515ffbaf
Cr-Commit-Position: refs/heads/master@{#429736}

Powered by Google App Engine
This is Rietveld 408576698