Closed Bug 1621989 Opened 6 years ago Closed 6 years ago

Some minor flexbox cleanup

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(3 files)

I'm spinning off some non-functional refactoring patches from my local work for bug 1492538, to land in this bug.

This patch doesn't change behavior. It just renames all ReflowOutput-type
variables to use "reflow output" in their naming, rather than "desired
size". (And it changes two code-comments with s/desired size/reflow-output
measurements/ for consistency.)

I'm doing this because I may want to create a new variable called "desired
size" (or similar) in a later patch, and that's easier if there aren't
similarly-named variables lying around.

This patch doesn't change behavior; it's effectively just a rename.

Before this patch, we would store instances of the class
"CachedMeasuringReflowResult" in a frame property with the (arbitrary and
nearly-identical) name "CachedFlexMeasuringReflow". These subtly-different
names cause unnecessary confusion & typos.

Let's do away with the custom name for the property table entry, and just name
the entry "CachedMeasuringReflowResult::Prop". This is what we do in
nsGridContainerFrame.cpp for the various frame properties (e.g. Subgrid::Prop),
and it works well for readability there.

Depends on D66588

Attachment #9132909 - Attachment description: Bug 1621989 part 3: Where possible, reuse existing cached struct for flex item measurements (rather than always instantiating a new one). r?TYLin → Bug 1621989 part 3: Where possible, reuse existing cache object to store updated flex item measurements (rather than always allocating a new one). r?TYLin
Blocks: 1492538
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b6fd95e0011b part 1: Rename "aDesiredSize" to "aReflowOutput" throughout nsFlexContainerFrame. r=TYLin https://hg.mozilla.org/integration/autoland/rev/8f6d085ceab6 part 2: Simplify the name for frame property that stores flex item reflow measurements. r=TYLin https://hg.mozilla.org/integration/autoland/rev/23e3b1215157 part 3: Where possible, reuse existing cache object to store updated flex item measurements (rather than always allocating a new one). r=TYLin
Blocks: 1629650
Regressions: 1626152
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: