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

Issue 1448253002: Clip scrollbars to box bounds when they don't fit. (Closed)

Created:
5 years, 1 month ago by skobes
Modified:
5 years, 1 month ago
Reviewers:
Ian Vollick, chrishtr
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clip scrollbars to box bounds when they don't fit. There are three cases: (1) scroller is a non-composited self-painting layer (2) scroller is not a self-painting layer (3) scroller is a composited layer (3a) scroller is a composited layer that does not use composited scrolling Case (1) already worked correctly through the background clip applied by PaintLayerPainter. Case (2) is addressed by the change in BlockPainter. Case (3) is addressed by the changes in CompositedLayerMapping. The clip is applied by m_overflowControlsHostLayer. GraphicsLayerTreeBuilder is modified to preserve the layer tree in case (3a). I have renamed m_overflowControlsClippingLayer for clarity, since the overflow controls can now be clipped for two different reasons. Note that for an iframe with CSS "resize", the scroll corner comes from the iframe element's CompositedLayerMapping, not the inner PaintLayerCompositor. For this reason, PLC::attachFrameContentLayersToIframeLayer must preserve overflow controls just like the "!parented" path of GraphicsLayerTreeBuilder. BUG=549174 Committed: https://crrev.com/bf0a5ac073c0844a514a979beab5c8b08a445393 Cr-Commit-Position: refs/heads/master@{#360860} Committed: https://crrev.com/74aa5e43fc22ffaa2538dca20aa36e22a3e9df38 Cr-Commit-Position: refs/heads/master@{#361037}

Patch Set 1 : #

Total comments: 1

Patch Set 2 : manual rebaseline on Linux #

Patch Set 3 : rebase #

Total comments: 6

Patch Set 4 : rebase #

Total comments: 2

Patch Set 5 : address chrishtr review comments #

Total comments: 4

Patch Set 6 : rename parentFrameContentLayers #

Patch Set 7 : fix assertion in clipTypeAsDebugString #

Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -106 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 1 chunk +68 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/iframes/resizer-expected.txt View 1 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/accelerated-overflow-scroll-should-not-affect-perspective-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/clear-scroll-parent-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/composited-scrolling-paint-phases-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/content-gains-scrollbars-expected.txt View 1 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/overflow-scrollbar-layers-expected.txt View 1 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/resize-painting-expected.txt View 1 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/scroll-parent-absolute-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/scrolling-without-painting-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/universal-accelerated-overflow-scroll-expected.txt View 1 12 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/updating-scrolling-content-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/scrollbars/nested-overlay-scrollbars-expected.txt View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/squashing/composited-bounds-for-negative-z-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/update-paint-phases-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/repaint/overflow-move-after-scroll-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-after-move-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/invalidate-after-composited-scroll-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/selection-gaps-after-removing-scrolling-contents-expected.txt View 1 7 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/selection-gaps-toggling-expected.txt View 1 5 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/selection-gaps-toggling-with-scrolling-contents-expected.txt View 1 7 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/textarea-scroll-touch-expected.txt View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/compositing/repaint/should-not-clip-composited-overflow-scrolling-layer-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/replaced/width100percent-textarea-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/selection/selection-within-composited-scroller-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/selection-gaps-after-removing-scrolling-contents-expected.txt View 1 7 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/selection-gaps-toggling-expected.txt View 1 5 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/selection-gaps-toggling-with-scrolling-contents-expected.txt View 1 7 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-color-change-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/text-match-highlight-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/textarea-scroll-touch-expected.txt View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-and-content-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/scrollbars/border-box-rect-clips-scrollbars.html View 1 chunk +51 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/scrollbars/border-box-rect-clips-scrollbars-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/scrollbars/border-box-rect-clips-scrollbars-expected.txt View 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/accelerated-overflow-scroll-should-not-affect-perspective-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/clear-scroll-parent-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/composited-scrolling-paint-phases-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/content-gains-scrollbars-expected.txt View 1 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-auto-with-touch-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-auto-with-touch-toggle-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-overlay-with-touch-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-scrollbar-layers-expected.txt View 1 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/resize-painting-expected.txt View 1 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-parent-absolute-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrolling-without-painting-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/universal-accelerated-overflow-scroll-expected.txt View 1 12 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-container-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/updating-scrolling-content-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h View 1 2 3 3 chunks +12 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 12 chunks +49 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp View 1 2 3 4 5 1 chunk +2 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 2 3 4 5 2 chunks +2 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPainter.cpp View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 35 (16 generated)
skobes
5 years, 1 month ago (2015-11-18 03:55:51 UTC) #5
Ian Vollick
core/layout/compositing/* looks great to me. I defer to Chris for paint/ I know it's a ...
5 years, 1 month ago (2015-11-18 13:41:05 UTC) #11
skobes
On 2015/11/18 13:41:05, vollick wrote: > I know it's a pain, but could you please ...
5 years, 1 month ago (2015-11-19 00:11:30 UTC) #12
Ian Vollick
On 2015/11/19 00:11:30, skobes wrote: > On 2015/11/18 13:41:05, vollick wrote: > > I know ...
5 years, 1 month ago (2015-11-19 00:43:16 UTC) #13
chrishtr
https://codereview.chromium.org/1448253002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (left): https://codereview.chromium.org/1448253002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#oldcode1366 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1366: layer->setPosition(hBar->frameRect().location() - offsetFromLayoutObject); subpixelAccumulation was incorrectly omitted before? https://codereview.chromium.org/1448253002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ...
5 years, 1 month ago (2015-11-19 17:29:52 UTC) #14
skobes
https://codereview.chromium.org/1448253002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (left): https://codereview.chromium.org/1448253002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#oldcode1366 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1366: layer->setPosition(hBar->frameRect().location() - offsetFromLayoutObject); On 2015/11/19 17:29:52, chrishtr wrote: > ...
5 years, 1 month ago (2015-11-19 18:30:08 UTC) #15
chrishtr
https://codereview.chromium.org/1448253002/diff/160001/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp File third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp (right): https://codereview.chromium.org/1448253002/diff/160001/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp#newcode100 third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp:100: parented = PaintLayerCompositor::parentFrameContentLayers(toLayoutPart(layer.layoutObject())); So you figured out what this ...
5 years, 1 month ago (2015-11-20 01:20:43 UTC) #17
skobes
https://codereview.chromium.org/1448253002/diff/160001/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp File third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp (right): https://codereview.chromium.org/1448253002/diff/160001/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp#newcode100 third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp:100: parented = PaintLayerCompositor::parentFrameContentLayers(toLayoutPart(layer.layoutObject())); On 2015/11/20 01:20:42, chrishtr wrote: > ...
5 years, 1 month ago (2015-11-20 01:35:21 UTC) #19
chrishtr
lgtm
5 years, 1 month ago (2015-11-20 18:02:54 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1448253002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1448253002/180001
5 years, 1 month ago (2015-11-20 18:05:17 UTC) #23
commit-bot: I haz the power
Committed patchset #6 (id:180001)
5 years, 1 month ago (2015-11-20 18:13:09 UTC) #24
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/bf0a5ac073c0844a514a979beab5c8b08a445393 Cr-Commit-Position: refs/heads/master@{#360860}
5 years, 1 month ago (2015-11-20 18:14:51 UTC) #25
grt (UTC plus 2)
A revert of this CL (patchset #6 id:180001) has been created in https://codereview.chromium.org/1457963006/ by grt@chromium.org. ...
5 years, 1 month ago (2015-11-20 20:53:34 UTC) #26
dcheng
A revert of this CL (patchset #6 id:180001) has been created in https://codereview.chromium.org/1458353004/ by dcheng@chromium.org. ...
5 years, 1 month ago (2015-11-20 21:15:57 UTC) #27
skobes
PTAL
5 years, 1 month ago (2015-11-20 23:57:55 UTC) #29
chrishtr
lgtm
5 years, 1 month ago (2015-11-21 23:34:11 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1448253002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1448253002/200001
5 years, 1 month ago (2015-11-21 23:34:54 UTC) #33
commit-bot: I haz the power
Committed patchset #7 (id:200001)
5 years, 1 month ago (2015-11-22 05:01:23 UTC) #34
commit-bot: I haz the power
5 years, 1 month ago (2015-11-22 05:01:49 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/74aa5e43fc22ffaa2538dca20aa36e22a3e9df38
Cr-Commit-Position: refs/heads/master@{#361037}

Powered by Google App Engine
This is Rietveld 408576698