mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1323517 Part 1 - Remove a duplicate assertion, and assert a fresh reflow status in ReflowFloat(). r=jfkthame
In FlowAndPlaceFloat(), condense two identical assertions about float frame parent into one. FlowAndPlaceFloat() calls ReflowFloat() only once, either an early reflow (when `earlyFloatReflow` is `true`) or a late reflow (when `earlyFloatReflow` is `false`), so the reflow status is always fresh. Differential Revision: https://phabricator.services.mozilla.com/D151203
This commit is contained in:
parent
c2e2ac2e01
commit
ed00bfdbb9
@ -698,7 +698,7 @@ NS_DECLARE_FRAME_PROPERTY_DELETABLE(ShapeInvalidationDataProperty,
|
||||
ShapeInvalidationData)
|
||||
|
||||
bool BlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat) {
|
||||
MOZ_ASSERT(aFloat->GetParent() == mBlock);
|
||||
MOZ_ASSERT(aFloat->GetParent() == mBlock, "Float frame has wrong parent");
|
||||
|
||||
WritingMode wm = mReflowInput.GetWritingMode();
|
||||
// Save away the Y coordinate before placing the float. We will
|
||||
@ -741,8 +741,6 @@ bool BlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat) {
|
||||
LogicalRect adjustedAvailableSpace =
|
||||
mBlock->AdjustFloatAvailableSpace(*this, floatAvailableSpace.mRect);
|
||||
|
||||
NS_ASSERTION(aFloat->GetParent() == mBlock, "Float frame has wrong parent");
|
||||
|
||||
SizeComputationInput sizingInput(aFloat, mReflowInput.mRenderingContext, wm,
|
||||
mReflowInput.ComputedISize());
|
||||
|
||||
|
@ -6652,12 +6652,11 @@ void nsBlockFrame::ReflowFloat(BlockReflowState& aState,
|
||||
LogicalMargin& aFloatOffsets,
|
||||
bool aFloatPushedDown,
|
||||
nsReflowStatus& aReflowStatus) {
|
||||
MOZ_ASSERT(aReflowStatus.IsEmpty(),
|
||||
"Caller should pass a fresh reflow status!");
|
||||
MOZ_ASSERT(aFloat->HasAnyStateBits(NS_FRAME_OUT_OF_FLOW),
|
||||
"aFloat must be an out-of-flow frame");
|
||||
|
||||
// Reflow the float.
|
||||
aReflowStatus.Reset();
|
||||
|
||||
WritingMode wm = aState.mReflowInput.GetWritingMode();
|
||||
#ifdef NOISY_FLOAT
|
||||
printf("Reflow Float %p in parent %p, availSpace(%d,%d,%d,%d)\n", aFloat,
|
||||
|
Loading…
Reference in New Issue
Block a user