Open Bug 1436875 Opened 6 years ago Updated 2 years ago

Come up with generalized helper for FlexItem::CanMainSizeInfluenceCrossSize() to use

Categories

(Core :: Layout, enhancement, P3)

57 Branch
enhancement

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

In flexbox layout, we have this function...
  FlexItem::CanMainSizeInfluenceCrossSize()
...which in some cases falls back to asking this question: is it possible for changes in this element's block-size (in its own writing mode) to influence its intrinsic inline-size?

(Particularly after bug 1267462, which is making that function more generic/correct in a writing-mode world.)

Simple cases: for a css block, that answer is "no" -- changes to block-size cannot influence intrinsic isize.  For an img, the answer is "yes", because there's an aspect ratio. For multicol/flex/grid, the answer can be "yes" when block-axis constraints make children wrap to create more columns (which increases the inline size) -- but even there, there are special [common?] cases where the answer is provably "no".  (e.g. see bug 1267462 comment 16 for mats' thoughts on grid scenarios)

Anyway -- for now, in bug 1267462, I'm just special-casing flex items that are blocks and tables, since they're common and potentially-bulky (as a subtree) and have an easy answer.  But really we should probably add a generic way of signalling this.
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.