New issue
Advanced search Search tips

Issue 906530 link

Starred by 2 users

Issue metadata

Status: Available
Merged: issue 902863
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Issues with intrinsic heights and scrollbars

Project Member Reported by r...@igalia.com, Nov 19

Issue description


The height of an element with min-content|max-content|fit-content|-webkit-fill-available
is wrongly computed if the element has horizontal scrollbar.

A simple case to reproduce the issue:
  <div style="width: 100px; height: min-content; border: solid thick; overflow-x: scroll;">foobar</div>

The size of this should be the same than:
  <div style="width: 100px; height: auto; border: solid thick; overflow-x: scroll;">foobar</div>
But it's different.

Check the attached example for more cases.

Investigating the code it seems this got broken in r201824 (https://chromium.googlesource.com/chromium/src/+/a78687847c12659503d2f1e02f8f522d52c0c1fd)
when LayoutBox::computeContentAndScrollbarLogicalHeightUsing() was modified so it adds the scrollbar in:
  return computeIntrinsicLogicalContentHeightUsing(height, intrinsicContentHeight, borderAndPaddingLogicalHeight())
      + scrollbarLogicalHeight();

Removing that fixes the issues but causes a failure in css3/flexbox/overflow-auto-resizes-correctly.html.
 
bugs-intrinsic-height-scrollbar.html
397 bytes View Download
Labels: Needs-Milestone
Mergedinto: 902863
Status: Duplicate (was: Unconfirmed)
Cc: -r...@chromium.org r...@igalia.com
The right fix is probably to subtract ScrollbarLogicalHeight() from intrinsic_content_logical_height_ when passing it to computeIntrinsicLogicalContentHeightUsing
Cc: mstensho@chromium.org
Status: Available (was: Duplicate)
Morten, see also my comment above why I think this bug is different

Sign in to add a comment