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

Issue 2897033002: Make room for any scrollbars in the content box and border box. (Closed)

Created:
3 years, 7 months ago by mstensho (USE GERRIT)
Modified:
3 years, 6 months ago
Reviewers:
cbiesinger, skobes, szager1
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make room for any scrollbars in the content box and border box. The spec isn't clear. It does say to perform such clamping if the specified border-box size is less than the total size of border+padding, but there's nothing for scrollbars in particular. However, since we have code that assumes that subtracting a scrollbar width from a border box size won't result in negative values, this seems like a reasonable thing to do. This aligns us with IE / Edge, while Firefox does no such stretching. This CL makes the fix for bug 720227 (VerticalScrollbarWidthClampedToContentBox()) unnecessary, so revert it, but keep the tests. Had to remove the test for bug 549174, because it assumes that a scrollbar may overflow the border box, but that's no longer going to happen ever. The test find-hidden-text.html also needed an update, since it assumed that forcing a scrollbar on and at the same time specifying width or height as 0 would leave the border box width at 0. This is no longer the case. BUG=724255

Patch Set 1 #

Patch Set 2 : rebase master #

Patch Set 3 : Revert fix for bug 720227 - no longer needed. #

Patch Set 4 : Add test. #

Patch Set 5 : Remove test for bug 549174 - a scrollbar will no longer ever overflow the border box #

Patch Set 6 : rebase master #

Patch Set 7 : Update find-hidden-text.html - scrollbars (at least non-overlay ones) now properly take up space in… #

Patch Set 8 : Rebaseline tests that got wider/taller objects. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -94 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG View 1 2 3 4 5 3 chunks +0 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scrolling/small-border-box.html View 1 2 3 1 chunk +78 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/text/find-hidden-text.html View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/replaced/width100percent-textarea-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/replaced/width100percent-textarea-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.11/css3/flexbox/button-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/css3/flexbox/button-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/replaced/width100percent-textarea-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac-mac10.9/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-retina/css3/flexbox/button-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/css3/flexbox/button-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/replaced/width100percent-textarea-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/replaced/width100percent-textarea-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/win/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png View 1 2 3 4 Binary file 0 comments Download
D third_party/WebKit/LayoutTests/scrollbars/border-box-rect-clips-scrollbars.html View 1 2 3 4 1 chunk +0 lines, -51 lines 0 comments Download
D third_party/WebKit/LayoutTests/scrollbars/border-box-rect-clips-scrollbars-expected.txt View 1 2 3 4 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 4 5 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 4 chunks +8 lines, -17 lines 0 comments Download

Messages

Total messages: 22 (14 generated)
mstensho (USE GERRIT)
Discussion regarding stretching the border box to fit the scrollbars: https://codereview.chromium.org/2893833004#msg10 Also not too happy ...
3 years, 6 months ago (2017-06-14 08:49:36 UTC) #15
skobes
It looks like this will regress http://crbug.com/549174. I don't understand your comment: "It looks like ...
3 years, 6 months ago (2017-06-14 14:25:02 UTC) #16
mstensho (USE GERRIT)
On 2017/06/14 14:25:02, skobes wrote: > It looks like this will regress http://crbug.com/549174. I don't ...
3 years, 6 months ago (2017-06-14 14:55:46 UTC) #17
skobes
On 2017/06/14 14:55:46, mstensho wrote: > Hm, so the bug title is "Scrollbars are visible ...
3 years, 6 months ago (2017-06-14 15:51:05 UTC) #18
mstensho (USE GERRIT)
On 2017/06/14 15:51:05, skobes wrote: > On 2017/06/14 14:55:46, mstensho wrote: > > Hm, so ...
3 years, 6 months ago (2017-06-14 19:37:21 UTC) #19
cbiesinger
On 2017/06/14 19:37:21, mstensho wrote: > On 2017/06/14 15:51:05, skobes wrote: > > On 2017/06/14 ...
3 years, 6 months ago (2017-06-14 19:39:02 UTC) #20
cbiesinger
Oh, I just caught up to some of the above discussion. I guess the overflow: ...
3 years, 6 months ago (2017-06-14 19:39:58 UTC) #21
skobes
3 years, 6 months ago (2017-06-15 02:43:27 UTC) #22
Message was sent while issue was closed.
On 2017/06/14 19:37:21, mstensho wrote:
> So, something like the VerticalScrollbarWidthClampedToContentBox() thing we
> currently have, but more of it?

Yes that's roughly what I had in mind, though I'd just call it
ClippedVerticalScrollbarWidth.

Even better might be for VerticalScrollbarWidth to always return the clipped
value.  But maybe that breaks other assumptions.

Powered by Google App Engine
This is Rietveld 408576698