Closed Bug 1610044 Opened 5 years ago Closed 19 days ago

Investigate alignment padding in flex container and other helper classes

Categories

(Core :: Layout: Flexbox, task, P3)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(1 file)

Per mats' review in https://phabricator.services.mozilla.com/D59048#1835927, we could investigate the alignment padding issue to make the classes more compact.

Currently, FlexItem, FlexLine and other position trackers exist only in reflow, but once we consider fragmenting flex containers in bug 939897, we might need to store some information on the first continuation in order to share with later continuations. Memory usage could go up.

Severity: normal → S3

Searchfox has a handy feature to list the layout of a class. For example, https://searchfox.org/mozilla-central/query/default?q=field-layout%3A%27nsFlexContainerFrame%27

I've taken a look at nsFlexContainerFrame and other helper classes such as FlexItem, FlexboxAxisTracker, etc. They are all fairly compact. FlexLine can be improved slightly.

On Android, there is a 4 byte hole between mTotalItemMBP and
mTotalOuterHypotheticalMainSize. See
https://searchfox.org/mozilla-central/query/default?q=field-layout%3A%27nsFlexContainerFrame%3A%3AFlexLine%27

By moving mTotalOuterHypotheticalMainSize to the beginning of the class, we
can make FlexLine more compact on Android. The size remains the same on other
platforms, with or without this change.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f3cf5ce3bd2f
Fill the hole in FlexLine by reordering members. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: