Closed Bug 1735375 Opened 2 years ago Closed 2 years ago

fieldset in flex item not fragmented for printing


(Core :: Layout: Flexbox, defect)

Firefox 93



95 Branch
Tracking Status
firefox95 --- verified


(Reporter: jscher2000, Assigned: TYLin)



(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

(1) Open (from SUMO: )

The ingredient list is a <ul> in a <fieldset> in a <section> in a flex item.

(2) Call up Print to display preview

Actual results:

The list is pushed from the first page to the second page.

On the second page, it is truncated due to limitations of the layout, but this is not the main issue.

Same on Nightly 20211012093200

Expected results:

The <fieldset> inside a flex item should fragment, as it does outside of a flex item after bug 471015.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Flexbox' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Flexbox
Product: Firefox → Core

I got this when choosing "Font Size: Large", then print. The "ingredient" list is shifted to the second page, and is truncated.

Severity: -- → S3
Ever confirmed: true
Assignee: nobody → aethanyc

(I just found that I haven't sent the comment ...)

When a flex container is in a fragmented context, it can reflow a flex item twice: the first time is a measuring reflow to compute a flex item's total block-size without any constraint in the block axis; the second time is a final reflow with available block-size applied.

The reported site uses a <fieldset> in a flex item. When the flex item is under the final reflow, according to the following if, we skip reflowing its child <fieldset>'s inner frame because <fieldset> doesn't have any condition to let aReflowInput.ShouldReflowAllKids() returns true, nor does its next-in-flow exists (yet).

  if (aReflowInput.ShouldReflowAllKids() || GetNextInFlow()) {
    reflowInner = inner != nullptr;
    reflowLegend = legend != nullptr;

However, we really should reflow the inner frame of the fieldset because the available block-size is constrained this time where it was unconstrained in the last reflow.

Pushed by
Always reflow fieldset when its available bsize is constrained. r=dholbert
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Flags: qe-verify+

Reproduced this issue using an affected Nightly build 95.0a1 (20211012093200) on Win 10x64 and Ubuntu 20.04.

Verified as fixed on Beta 95.0b2 (20211102190739) on Win 10x64, macoS 10.15 and Ubuntu 20.04.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.