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

Issue 2519163003: LayoutView's paint layer should clip to the full viewport size. (Closed)

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

Description

LayoutView's paint layer should clip to the full viewport size. This patch makes it so that the LayoutView's painting size is always at least the size of the layout viewport. Today (without root-layer-scrolls), the LayoutView's PaintLayer (and its parent root content layer) is sized to contain all the document's content and is clipped and scrolled by the PaintLayers belonging to the Frame's PaintLayerCompositor (the Frame Scroll and Clipping layers). This is problematic if the content is smaller than the viewport since position: fixed elements are attached to the viewport but are not counted as part of the LayoutView's "layout overflow". This occurs in two situations (both occur only on Android): 1. Bug 666806 - With inert top controls on and the top controls hidden, a page whose document is empty (for e.g.) will produce a LayoutView layer whose height is the height of the viewport minus the height of the top controls. This means bottom position: fixed elements will get clipped. 2. Bug 436871 - If the content on a page is wider than the ICB, Chrome will grow the layout viewport until its width covers all the content (or the minimum scale is reached), keeping the aspect-ratio fixed. When this happens, the layout viewport can become taller than the content resulting in clipping of bottom position: fixed elements. (This is related to crbug.com/492871). This patch fixes both issues. BUG=666806, 436871 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/a226f0e367ee7e064cc398d0b76d347d53103295 Cr-Commit-Position: refs/heads/master@{#434303}

Patch Set 1 #

Patch Set 2 : Fix test #

Patch Set 3 : Fix test #

Total comments: 2

Patch Set 4 : Add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -6 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 2 chunks +17 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 37 (24 generated)
bokan
Skobes, wdyt? This passes all the tests and feels ok to me but I don't ...
4 years, 1 month ago (2016-11-22 23:19:56 UTC) #15
bokan
Oh, and I haven't added a test yet. I'll wait for validation of the general ...
4 years, 1 month ago (2016-11-22 23:20:39 UTC) #16
skobes
This seems reasonable. It's only affecting the non-RLS case, right? https://codereview.chromium.org/2519163003/diff/40001/third_party/WebKit/Source/core/paint/PaintLayer.cpp File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right): https://codereview.chromium.org/2519163003/diff/40001/third_party/WebKit/Source/core/paint/PaintLayer.cpp#newcode2551 ...
4 years, 1 month ago (2016-11-23 00:13:24 UTC) #19
bokan
On 2016/11/23 00:13:24, skobes wrote: > This seems reasonable. It's only affecting the non-RLS case, ...
4 years ago (2016-11-23 22:49:19 UTC) #20
bokan
Test added, ptal. https://codereview.chromium.org/2519163003/diff/40001/third_party/WebKit/Source/core/paint/PaintLayer.cpp File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right): https://codereview.chromium.org/2519163003/diff/40001/third_party/WebKit/Source/core/paint/PaintLayer.cpp#newcode2551 third_party/WebKit/Source/core/paint/PaintLayer.cpp:2551: if (isRootLayer()) { On 2016/11/23 00:13:24, ...
4 years ago (2016-11-23 22:49:32 UTC) #21
skobes
lgtm
4 years ago (2016-11-23 22:56:18 UTC) #22
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/2519163003/60001
4 years ago (2016-11-23 22:58:13 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on ...
4 years ago (2016-11-24 01:00:53 UTC) #26
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/2519163003/60001
4 years ago (2016-11-24 01:02:48 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_daisy_chromium_compile_only_ng on ...
4 years ago (2016-11-24 03:04:46 UTC) #30
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/2519163003/60001
4 years ago (2016-11-24 03:48:37 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-11-24 05:11:00 UTC) #35
commit-bot: I haz the power
4 years ago (2016-11-24 05:13:41 UTC) #37
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a226f0e367ee7e064cc398d0b76d347d53103295
Cr-Commit-Position: refs/heads/master@{#434303}

Powered by Google App Engine
This is Rietveld 408576698