Closed Bug 1655581 Opened 5 years ago Closed 5 years ago

[css-grid] Growth limits not increased with min-content contributions of spanning items

Categories

(Core :: Layout: Grid, defect)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: mozilla-apprentice, Assigned: Oriol)

References

Details

Attachments

(1 file)

A resolution was made for csswg-drafts/#4790.

[css-grid] Growth limits not increased with min-content contributions of spanning items

  • RESOLVED: Accept the edits made to the ED re minimum vs min-content (and add WPT tests)

Discussion.

Basically, revert https://bugzilla.mozilla.org/show_bug.cgi?id=1255393#c12

https://searchfox.org/mozilla-central/rev/56bb74ea8e04bdac57c33cbe9b54d889b9262ade/layout/generic/nsGridContainerFrame.cpp#2113-2122 should become

      switch (phase) {
        case TrackSizingPhase::IntrinsicMinimums:
          return mMinSize;
        case TrackSizingPhase::ContentBasedMinimums:
        case TrackSizingPhase::IntrinsicMaximums:
          return mMinContentContribution;
        case TrackSizingPhase::MaxContentMinimums:
        case TrackSizingPhase::MaxContentMaximums:
          return mMaxContentContribution;
      }

By mistake the specification used to say that, for items spanning
multiple tracks, the growth limits of the tracks with an intrinsic max
track sizing function should grow to accommodate the minimum
contribution of the item.

But this was a mistake, because an intrinsic max track sizing function
can only be min-content or max-content. So instead of distributing the
minimum contribution, it should be the min-content contribution.

The spec has been fixed and there is a CSSWG resolution in
https://github.com/w3c/csswg-drafts/issues/4790

This patch fixes the problem by reverting 2b923d48ea7e. The change is
likely web compatible, since it only affects a rare edge case with
'minmax()' where the min sizing function is 'auto' or a fixed value
smaller than the min-content contribution, the max sizing function is
'min-content', and an item whose minimum contribution is forced to be
smaller than the min-content contribution, and spans multiple tracks.

Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Pushed by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8322fb7a54a [css-grid] Use min-content size for intrinsic maximums resolution. r=mats
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: