Closed Bug 1334403 Opened 7 years ago Closed 7 years ago

Captions do not take 100% of table's width if inside flexbox


(Core :: Layout, defect, P1)

52 Branch



Tracking Status
firefox51 --- unaffected
firefox52 --- fixed
firefox53 --- fixed
firefox54 --- fixed


(Reporter: mail, Assigned: MatsPalmgren_bugz)



(Keywords: regression, testcase)


(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce:


I put a table inside a div with display: flex; and a caption inside the table.

This works fine with Firefox < 52, and Chrome.

Actual results:

The second table's caption does not take the whole width (display: block won't work either).

Expected results:

The second table's caption should take 100% of the table's width, like the first table.
Has Regression Range: --- → yes
Has STR: --- → yes
Has Regression Range: yes → no
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
It's a regression from that bug.  Thanks for catching this Nicolas!
Assignee: nobody → mats
Blocks: 1316051
Has Regression Range: no → yes
Component: CSS Parsing and Computation → Layout
Ever confirmed: true
Flags: needinfo?(mats)
Keywords: regression, testcase
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All
Looks like an easy fix.  I guess we don't have many tests for table flex items
due to bug 799725, but I'll write one that covers this bug at least.
Attached patch fixSplinter Review
This reverts the ReflowInput change in for anything but Grid for now.  (I think this patch can be reverted
once we fix bug 799725.)
Attachment #8831360 - Flags: review?(dholbert)
Attached patch reftestSplinter Review
Based on layout/reftests/css-grid/grid-item-table-stretch-004.html,
although I had to remove the vertical writing-mode cases due to
bug 1334714 for now.
Comment on attachment 8831360 [details] [diff] [review]

Review of attachment 8831360 [details] [diff] [review]:

Maybe add an XXX comment here to explain the exclusion?

  // XXX grid-specific for now; maybe remove this check after we address bug 799725
Attachment #8831360 - Flags: review?(dholbert) → review+
Pushed by
Make <caption> inline size stretch again for table flex items.  r=dholbert
Some <caption> size tests for table flex items.
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Comment on attachment 8831360 [details] [diff] [review]

Approval Request Comment
[Feature/Bug causing the regression]: bug 1316051
[User impact if declined]: minor layout error of <caption> in <table> flex items
[Is this code covered by automated tests?]:yes
[Has the fix been verified in Nightly?]:yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]:no
[Why is the change risky/not risky?]:reverts to the old behavior for non-grid frames
[String changes made/needed]:none
Attachment #8831360 - Flags: approval-mozilla-beta?
Attachment #8831360 - Flags: approval-mozilla-aurora?
Flags: in-testsuite+
Comment on attachment 8831360 [details] [diff] [review]

fix regression from css grid changes, beta52+, aurora53+
Attachment #8831360 - Flags: approval-mozilla-beta?
Attachment #8831360 - Flags: approval-mozilla-beta+
Attachment #8831360 - Flags: approval-mozilla-aurora?
Attachment #8831360 - Flags: approval-mozilla-aurora+
Pushed by
followup - Correct the path of the reftest test page. rs=dholbert
You need to log in before you can comment on or make changes to this bug.