Closed Bug 1920280 Opened 1 year ago Closed 1 year ago

Investigate whether StretchPreservingRatio enum variant can be removed

Categories

(Core :: Layout: Grid, task)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(2 files)

After bug 1685428, we've tried to honor aspect-ratio under stretch alignment in grid layout. It seems Stretch and StretchPreservingRatio [1] might ultimately have the same meaning. We should investigate whether we can remove StretchPreservingRatio and simplify the code.

[1] https://searchfox.org/mozilla-central/rev/a6f4fbcd9b1ce352b7d6d1b87204d3e015266b57/layout/generic/nsContainerFrame.cpp#2235-2238

Depends on: 1685428

The old code store them in iSize and bSize, which is confusing since they
can also store the resolved non-auto sizes.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

After fixing bug 1685428, we honor aspect-ratio under stretch alignment in grid
layout. That makes the enum variants Stretch and StretchPreservingRatio
confusing.

To clarify their distinct behaviors, this patch renames the enum and its
variants as follows:

  • Stretch::NoStretch (eNoStretch) -> FillCB::No
  • Stretch::Stretch (eStretch) -> FillCB::Stretch
  • Stretch::StretchPreservingRatio (eStretchPreservingRatio) -> FillCB::Clamp
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/1310354f3fd3 Part 1 - Use two variables to store sizes that fill containing block sizes. r=dshin https://hg.mozilla.org/integration/autoland/rev/a9acd1328271 Part 2 - Rename the enum and its variants that controls fill CB behavior. r=dshin
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: