Closed Bug 1777627 Opened 3 months ago Closed 3 months ago

Improve BlockReflowState::IsAdjacentWithTop() and clean up its callsites

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(3 files)

See the upcoming patches.

I rename and add a comment to the helper, and rewrite it to make it closer to
what the comment describes. The behavior is the same because mBCoord and
mContentArea.BStart(wm) are both initialized as mBorderPadding.BStart(wm)
[1].

Note isAdjacentWithTop local variable in ReflowFloat() is not changed because
it's going to be removed in the next patch.

[1] https://searchfox.org/mozilla-central/rev/2005e8d87ee045f19dac58e5bff32eff7d01bc9b/layout/generic/BlockReflowState.cpp#142

The argument is only used to clear the mIsTopOfPage bit for the ReflowInput
argument aFrameRI. However, the callsites have all the information to do that
themselves, so there's no need for aIsAdjacentWithBStart argument.

Depends on D150831

Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/67f4db7e6fef
Part 1 - Improve BlockReflowState::IsAdjacentWithTop(). r=emilio
https://hg.mozilla.org/integration/autoland/rev/fa58e578d6b3
Part 2 - Remove aIsAdjacentWithBStart argument on nsBlockReflowContext::ReflowBlock(). r=emilio
https://hg.mozilla.org/integration/autoland/rev/5da16396fa22
Part 3 - Improve BlockReflowState::mBorderPadding's documentation. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.