https://codereview.chromium.org/1846023003/ is landing a fairly bad hack. The *right* solution is something like patchset 4 there, to just delay the clamping until after layout. However, that breaks a layout test. This bug tracks the proper fix for bug 593209
debugging notes...
(gdb) p box().hasOverrideLogicalContentHeight()
$6 = false
(gdb) p box().hasOverrideLogicalContentWidth()
$7 = true
(gdb) p box().overrideLogicalContentWidth()
$8 = 100px
(gdb) p box().logicalWidth()
$9 = 100px
(gdb) p box().size().width()
$10 = 135px
(gdb) p box().layoutOverflowRect()
$11 = {
m_location = LayoutPoint(0px, 0px),
m_size = LayoutSize(120px, 120px)
}
Width is 135px (it's the logical height, so grows with content + scrollbar), so it's 15px greater than the layout overflow rect, so we get an origin of -15px.
If I adjust the scroll offset as the origin updates (so that the offset stays constant with respect to the origin), that actually fixes a bug in css3/flexbox/flexbox-overflow-auto.html
But it does break 14 other tests. So I'm still investigating if this is the right approach or not.
So... https://codereview.chromium.org/1867693002 *almost* works
The problem is RTL scrollbars. When an RTL scrollbar appears or disappears, the origin changes. BUT, the scroll position shouldn't change. For all other origin changes, the scroll position should change with them so as to keep the "real" position. (right...?)
Haven't yet found a solution for that.
Comment 1 by cbiesin...@chromium.org
, Apr 4 2016debugging notes... (gdb) p box().hasOverrideLogicalContentHeight() $6 = false (gdb) p box().hasOverrideLogicalContentWidth() $7 = true (gdb) p box().overrideLogicalContentWidth() $8 = 100px (gdb) p box().logicalWidth() $9 = 100px (gdb) p box().size().width() $10 = 135px (gdb) p box().layoutOverflowRect() $11 = { m_location = LayoutPoint(0px, 0px), m_size = LayoutSize(120px, 120px) } Width is 135px (it's the logical height, so grows with content + scrollbar), so it's 15px greater than the layout overflow rect, so we get an origin of -15px.