Open Bug 1702844 Opened 4 years ago Updated 4 years ago

Scrollbar overlaps child, on auto-height "overflow-x:scroll" element with vertical writing mode

Categories

(Core :: Layout: Scrolling and Overflow, defect)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file testcase 1

STR:

  1. Load attached testcase.

EXPECTED RESULTS:
You should see the same amount of purple border on all sides of the box.

ACTUAL RESULTS (on platforms where scrollbars take up space):
The purple border is clipped on the bottom. The scrollbar overlaps it.

It looks like we're not including any space for the horizontal scrollbar when determining the intrinsic height of the container here, so it ends up stomping on the children. This would be sort-of normal/expected if the element had overflow-x:auto and we couldn't tell up front whether there would be a scrollbar; but in this case, the element has overflow-x:scroll which is explicitly requesting a scrollbar, so we should allocate some space for it.

Note that Firefox on Mac (with overlay scrollbars) is unaffected; probably Android is unaffected too (haven't tested). This is only a problem on platforms where scrollbars take up space -- i.e. Linux and Windows, as well as some special Mac configurations.

This bug is part of the reason that https://wpt.live/css/css-flexbox/cross-axis-scrollbar.html fails, which is included as part of the compat2021 test set; hence, tagging as blocking the compat2021 metabug.

Here's a sort-of reference case, flipped to use a horizontal writing mode (and overflow-y:scroll instead of overflow-x:scroll).

This produces EXPECTED RESULTS. So we've got an asymmetry here where we're doing something wrong in vertical writing modes (and/or when accounting for horizontal-scrollbar height).

Here's a screenshot showing the discrepancy between the two attached cases.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: