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

Issue 2074353002: The element's offset isn't relevant when comparing its dimensions with that of its overflow (Closed)

Created:
4 years, 6 months ago by rhogan
Modified:
4 years, 5 months ago
Reviewers:
eae
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@621359
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

The element's offset isn't relevant when comparing its dimensions with that of its overflow The offset isn't relevant for these functions. Use of the offset was introduced by https://chromium.googlesource.com/chromium/src/+/10b0fc70b6e2383d439a83917541fe073b1e34e5 As far as I can tell we still don't have a test for it, so I don't think the change is correct - makes no sense to me that the position of an object should be considered when comparing the rect used to represent its overflow with the rect used to represent its dimensions. It won't make any difference unless some scaling is done on the object and then it leads to invalid differences. BUG=619509

Patch Set 1 #

Patch Set 2 : bug 619509 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -22 lines) Patch
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html View 1 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html View 1 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-content-alignment.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-content-alignment-rtl.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/sub-pixel/snap-overflow-rect-of-children.html View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/sub-pixel/snap-overflow-rect-of-children-expected.html View 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/sub-pixel/snap-overflow-rect-of-children-width.html View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/sub-pixel/snap-overflow-rect-of-children-width-expected.html View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/date-suggestion-picker-appearance-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/date-suggestion-picker-appearance-rtl-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-rtl-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-with-scroll-bar-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/month-suggestion-picker-appearance-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/time-suggestion-picker-appearance-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/week-suggestion-picker-appearance-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/data-suggestion-picker-appearance-expected.png View 1 Binary file 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 3 chunks +6 lines, -6 lines 2 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
rhogan
4 years, 5 months ago (2016-07-13 18:39:50 UTC) #4
eae
https://codereview.chromium.org/2074353002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2074353002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode453 third_party/WebKit/Source/core/layout/LayoutBox.cpp:453: return snapSizeToPixel(clientWidth(), clientLeft()); The location is needed to correctly ...
4 years, 5 months ago (2016-07-13 20:18:33 UTC) #5
rhogan
https://codereview.chromium.org/2074353002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2074353002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode453 third_party/WebKit/Source/core/layout/LayoutBox.cpp:453: return snapSizeToPixel(clientWidth(), clientLeft()); On 2016/07/13 at 20:18:33, eae wrote: ...
4 years, 5 months ago (2016-07-17 18:37:45 UTC) #6
eae
4 years, 5 months ago (2016-07-18 16:35:30 UTC) #7
On 2016/07/17 18:37:45, rhogan wrote:
>
https://codereview.chromium.org/2074353002/diff/20001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right):
> 
>
https://codereview.chromium.org/2074353002/diff/20001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/layout/LayoutBox.cpp:453: return
> snapSizeToPixel(clientWidth(), clientLeft());
> On 2016/07/13 at 20:18:33, eae wrote:
> > The location is needed to correctly snap the client and offset
widths/heights
> or it will not match where it is painted.
> > 
> > The width/height does depend on the location. The easiest way to illustrate
> this is to imagine a set of repeating inline boxes with a width of 10.5px.
Ever
> other one will snap to 10px and 11px respectively. This to ensure that the
total
> width of all of them is as close to (n * 10.5px) as possible.
> > 
> > It is not, however, needed for the overflow rect.
> 
> OK, so do we have to live with a scrollbar on this guy?
> 
> <div style="top: 87.5px; height: 448.75px; overflow: auto; position:
absolute;">
>     <div style="height: 449px;">
>         <div style="height: 1px; width: 1px;"></div>
>     </div>
> </div>

Yeah, probably. The inner element is, after all, taller than the container.
If we can find a way to avoid a scrollbar there without breaking the other case
that would be great but none immediately comes to mind :(

Powered by Google App Engine
This is Rietveld 408576698