Closed Bug 1625362 Opened 4 years ago Closed 4 years ago

Move some grid container frame's overflow-list helper function to nsContainerFrame

Categories

(Core :: Layout, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

(Whiteboard: [layout:backlog:77])

Attachments

(3 files)

In this bug, I'm planning to move some helper functions that manipulate overflow lists in nsGridContainerFrame to nsContainerFrame. I find these helpers are not tailored specifically for grid layout, but are general enough to be useful when implementing flex item fragmentation.

We have duplicated ReparentFrame and ReparentFrames define in both
nsBlockFrame and nsGridContainerFrame. We should move them into
nsContainerFrame.

We can utilize these helpers to implement flex item fragmentation.

Depends on D68490

I left all the bits that related to grid container, such as setting
aStatus, NS_STATE_GRID_DID_PUSH_ITEMS, and aState.mIter in
nsGridContainerFrame::ReflowRowsInFragmentainer().

Depends on D68491

I also want to move nsGridContainerFrame::NormalizeChildLists() to nsContainerFrame, because I think we need this function when the flex container has been fragmented, and we are reflow again from its first-in-flow. However, this function sets some grid specific bits like NS_STATE_GRID_DID_PUSH_ITEMS, NS_STATE_GRID_HAS_CHILD_NIFS, and mDidPushItemsBitMayLie, and I'm not sure how to generalize it yet. One possible way could be defining the same bits in the flex container, and restrict the function to be used by only grid and flex.

Whiteboard: [layout:backlog:77]
Status: NEW → ASSIGNED

To be clear, the patch for moving nsGridContainerFrame::NormalizeChildLists() to nsContainerFrame (described in comment 4) will be done either in bug 1622935 or a separate bug. The three parts already attached are ready for the review.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fd847fbe1a51
Part 1 - Move ReparentFrame and ReparentFrames into nsContainerFrame. r=mats
https://hg.mozilla.org/integration/autoland/rev/49bf43d18337
Part 2 - Move some helpers manipulating overflow lists from nsGridContainerFrame to nsContainerFrame. r=mats
https://hg.mozilla.org/integration/autoland/rev/07d0377a5002
Part 3 - Extract grid container's PushIncompleteChildren logic, and move it to nsContainerFrame. r=mats
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: