Closed Bug 1565037 Opened 5 years ago Closed 5 years ago

More refactor and cleanup for nsBlockFrame::ComputeFinalBSize()

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(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 https://bugzilla.mozilla.org/show_bug.cgi?id=1562122#c5,
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 aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/310df636a547 Part 1 - Make nsBlockFrame::ComputeFinalBSize() return the final block size. r=dholbert https://hg.mozilla.org/integration/autoland/rev/9a3d6bc5a6f9 Part 2 - Change aStatus to a reference for ComputeFinalBSize(). r=dholbert https://hg.mozilla.org/integration/autoland/rev/e72af5bb7aa3 Part 3 - Cache our children's reflow status, and use it to guide the morphing into our reflow status. r=dholbert https://hg.mozilla.org/integration/autoland/rev/94b17463ded6 Part 4 - Rename aContentBSize to aBEndEdgeOfChildren. r=dholbert https://hg.mozilla.org/integration/autoland/rev/5fd8ae2c6cde 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.

Attachment

General

Created:
Updated:
Size: