Closed Bug 1334403 Opened 6 years ago Closed 6 years ago
Captions do not take 100% of table's width if inside flexbox
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: See https://codepen.io/anon/pen/rjGgoj. 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
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=c11a7836e61b18bcb4dd3d75191ffd10830b9280&tochange=cb5c261faec02c184166fe2c3221870caf394248 which points to bug 1316051. Mats, is the test in this bug the intended behaviour, or is this a regression?
It's a regression from that bug. Thanks for catching this Nicolas!
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. https://hg.mozilla.org/try/rev/1d6efc4fb572b8dbc7e4adc9c39e106a22251e78
This reverts the ReflowInput change in https://bugzilla.mozilla.org/attachment.cgi?id=8810261&action=diff#a/layout/generic/ReflowInput.cpp_sec2 for anything but Grid for now. (I think this patch can be reverted once we fix bug 799725.)
Attachment #8831360 - Flags: review?(dholbert)
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. https://treeherder.mozilla.org/#/jobs?repo=try&revision=4134f9f2c3e597d9c67948e6ddb82c333e880b43
Comment on attachment 8831360 [details] [diff] [review] fix Review of attachment 8831360 [details] [diff] [review]: ----------------------------------------------------------------- Maybe add an XXX comment here to explain the exclusion? e.g.: // XXX grid-specific for now; maybe remove this check after we address bug 799725
Attachment #8831360 - Flags: review?(dholbert) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/ca810c416600 Make <caption> inline size stretch again for table flex items. r=dholbert https://hg.mozilla.org/integration/mozilla-inbound/rev/410a33e2a95e Some <caption> size tests for table flex items.
Comment on attachment 8831360 [details] [diff] [review] fix 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
Comment on attachment 8831360 [details] [diff] [review] fix fix regression from css grid changes, beta52+, aurora53+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/74edf47a8ccd 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.