Closed Bug 1906792 Opened 1 year ago Closed 1 year ago

More cleanup related to intrinsic size

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(4 files)

See the patches for details.

nsIFrame already provides GetIntrinsicSize() for subclasses to override.
Therefore, nsLeafFrame doesn't need to introduce another version for its
subclasses.

This patch (hopefully) shouldn't change the behavior.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
  • Expand SizeToAvailSize() at callsites since it is only used twice, and the
    callsites already have called SetOverflowAreasToDesiredBounds().
  • Revise obsolete comment for nsLeafFrame.
  • Remove redundant virtual keyword.

These frames have very similar implementations in GetMinISize() and
GetPrefISize(). Therefore, add helpers to avoid code duplication. The helpers
are named IntrinsicISize() to match existing helpers in flex & grid container.

Drop "Get" in GetIntrinsicISize() for nsFieldSetFrame and
nsComboboxControlFrame to match our coding style because it always returns a
value.

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/16a4be98c3a0 Part 1 - Let nsLeafFrame and subclasses override GetIntrinsicSize(). r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/e9f1397f7667 Part 2 - More cleanup for nsLeafFrame. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/321316df53f0 Part 3 - Move ContainIntrinsicISize() calls into IntrinsicISize() helper for flex and grid container. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/70c615f711f3 Part 4 - Add IntrinsicISize() helpers to implement GetMinISize()/GetPrefISize(). r=layout-reviewers,emilio
Blocks: 1909995
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: