Vertical scrollbar doesn't contribute to shrink-to-fit container width in initial layout pass
Reported by
msten...@opera.com,
Nov 21 2016
|
||
Issue descriptionIt looks like the forced re-layout with PaintLayerScrollableArea::FreezeScrollbarsScope in layoutBlockFlow() isn't always triggered when it should. The reason is that preferredLogicalWidthsDirty() is true all the time e.g. if "width" is "fit-content". One would perhaps expect updateLogicalWidthAndColumnWidth() to always clear the PreferredLogicalWidthsDirty flag, but this only happens if computePreferredLogicalWidths() is involved. In the case of "width:fit-content", it's computeBlockPreferredLogicalWidths() that's called, which doesn't reset the flag (well, it's a const method...) In the attached test case, if you resize the window (to trigger another layout pass), it will pass.
,
Dec 10
This also affects LayoutNG. scrollbars/auto-scrollbar-fit-content.html fails in LayoutNG because of this. It doesn't fail in legacy layout, though, because the float in the test somehow triggers sufficient amounts of layout passes (in legacy, but not in NG). Changing the float in the test from "float:left" to "width:fit-content" makes the problem reproducible in legacy layout too. Note that Blink is the only engine that actually makes room for auto scrollbars that might appear when calculating min/max preferred widths. |
||
►
Sign in to add a comment |
||
Comment 1 by e...@chromium.org
, Oct 26Owner: ----
Status: Available (was: Assigned)