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

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

Created:
4 years ago by bokan
Modified:
4 years ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2924
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 Review-Url: https://codereview.chromium.org/2519163003 Cr-Commit-Position: refs/heads/master@{#434303} (cherry picked from commit a226f0e367ee7e064cc398d0b76d347d53103295) Committed: https://chromium.googlesource.com/chromium/src/+/e0ebf90514da284bba75b6ddb72a7f043b8ce701

Patch Set 1 #

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 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 2 chunks +17 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 chunk +70 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
bokan
4 years ago (2016-11-25 21:07:49 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e0ebf90514da284bba75b6ddb72a7f043b8ce701.

Powered by Google App Engine
This is Rietveld 408576698