Closed Bug 1712496 Opened 3 years ago Closed 3 years ago

Empty flexbox with `flex-direction: *-reverse`, `overflow: auto`, and non-zero padding is overflown

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox88 --- unaffected
firefox89 --- wontfix
firefox90 --- fixed

People

(Reporter: xofe_bugzilla, Assigned: TYLin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file flex overflow testcase

An flexbox element is overflown where all the following are true:

  • it is empty
  • flex-direction is row-reverse or column-reverse
  • overflow is auto
  • padding is not zero

If flex-direction is row or column (i.e. not a *-reverse value), there is no overflow. If there is any children (for example, a text node containing single letter A), there is no overflow.

I've included a testcase with four empty divs, each with a different flex-direction value, that shows the issue.

I would expect no overflow if the element is empty, even if the flex-direction is a *-reverse value.

Reproducible in v89 beta 14, v90 build 20210522213852.

mozregression bisect says bug 1697349 is responsible.

Thanks to anyone who takes a look!

Thanks for the report and the testcase. I'll take a look.

Severity: -- → S3
Flags: needinfo?(aethanyc)
Regressed by: 1697349
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1697349

The rect flexItemMarginBoxBounds is initialized at position (0, 0),
not the flex container's content-box origin. Inflating its initial value
with flex container's padding is just wrong.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Attachment #9223286 - Attachment description: Bug 1712496 - Don't include flex container's padding to the overflow area if there's no flex items. r?dholbert → Bug 1712496 - Adjust flex container's overflow area only if there are flex items. r?dholbert

The patch is simple, and I'd like to uplift it to beta to fix the regression.

Flags: needinfo?(aethanyc)

We are past betas and have already built our RC, I am not wontfixing ot for 89 as I may take a patch in a potential dot release or as a ride along to an RC2 if we have one.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/17d9dd4ab631
Adjust flex container's overflow area only if there are flex items. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/29114 for changes under testing/web-platform/tests
Blocks: 1712875
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: