Closed Bug 1609506 Opened 5 years ago Closed 5 years ago

Extract computation of ComputedFlex{Container,Line,Item}Info into helper methods

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(5 files)

The motivation was to improve the readability by reducing the length of nsFlexContainerFrame::DoFlexLayout, as preparation of further development for flex fragmentation.

The order of CreateFlexLineAndFlexItemInfo() and
ComputedFlexContainerInfo() doesn't matter. I call
CreateFlexLineAndFlexItemInfo because it matches the order of the
members in ComputedFlexContainerInfo.

Some comments "... filled out at the end of this function" should be
updated. However, since I'm in the process of refactor these
computations, I'll update them in Part 4.

Depends on D60047

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/32d6d980833c Part 1 - Extract the creation of ComputedFlexContainerInfo into a helper method. r=bradwerth https://hg.mozilla.org/integration/autoland/rev/69f7e72facd3 Part 2 - Extract the computation of ComputedFlexContainerInfo's fields into a helper methods. r=bradwerth https://hg.mozilla.org/integration/autoland/rev/b7bc465a5159 Part 3 - Extract the computation of clamp state into a helper method. r=bradwerth https://hg.mozilla.org/integration/autoland/rev/3d62a68b0719 Part 4 - Extract the computation of most fields in ComputedFlexLineInfo and ComputedFlexItemInfo into a helper. r=bradwerth https://hg.mozilla.org/integration/autoland/rev/ade3351d02a6 Part 5 - Move updating clamp state into UpdateFlexLineAndItemInfo(). r=bradwerth
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: