Closed Bug 1565037 Opened 2 years ago Closed 2 years ago

More refactor and cleanup for nsBlockFrame::ComputeFinalBSize()


(Core :: Layout: Block and Inline, task, P3)




Tracking Status
firefox70 --- fixed


(Reporter: TYLin, Assigned: TYLin)




(5 files)

+++ This bug was initially created as a clone of Bug #1562122 +++

I need to do more refactor until I'm comfortable hacking ComputeFinalBSize() for column-span split.

ComputeFinalBSize() doesn't need to modify the final inline-size, so we
don't need to pass the entire LogicalSize into it.

Also, aReflowInput.AvailableBSize() is used multiple times. Cache it to
shorten some statements.

We usually use reference to manipulate nsReflowStatus like in Reflow().

The document for aStatus needs edit, and is done in next part.

Depends on D37623

Because aStatus is also used as an output argument, caching aStatus as
our children's reflow status can and make the logic that morphs aStatus
to our reflow status easier to follow. And this helps the patch I'm
going to add for computing the block-size for column-span split.

Depends on D37624

As described in,
this precomputed argument is not content's block-size, but is the
block-end edge of children because aState.mBCoord is initialized as our
border-padding block-start in BlockReflowInput's constructor.

Depends on D37625

Their definitions already use aBEndEdgeOfChildren.

Depends on D37626

Pushed by
Part 1 - Make nsBlockFrame::ComputeFinalBSize() return the final block size. r=dholbert
Part 2 - Change aStatus to a reference for ComputeFinalBSize(). r=dholbert
Part 3 - Cache our children's reflow status, and use it to guide the morphing into our reflow status. r=dholbert
Part 4 - Rename aContentBSize to aBEndEdgeOfChildren. r=dholbert
Part 5 - Rename aBottomEdgeOfChildren to aBEndEdgeOfChildren in methods' declaration. r=dholbert
You need to log in before you can comment on or make changes to this bug.