Bug 1964120: Remove unneeded aConstrainBSize flag in FinishReflowWithAbsoluteFrames and ReflowAbsoluteFrames. r=layout-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D248268
This commit is contained in:
David Shin
2025-05-13 18:20:39 +00:00
committed by dshin@mozilla.com
parent 32d9e4cfc6
commit 20c44d3414
3 changed files with 9 additions and 16 deletions

View File

@@ -7375,10 +7375,8 @@ void nsIFrame::DidReflow(nsPresContext* aPresContext,
void nsIFrame::FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext, void nsIFrame::FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,
nsReflowStatus& aStatus, nsReflowStatus& aStatus) {
bool aConstrainBSize) { ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowInput, aStatus);
ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowInput, aStatus,
aConstrainBSize);
FinishAndStoreOverflow(&aDesiredSize, aReflowInput.mStyleDisplay); FinishAndStoreOverflow(&aDesiredSize, aReflowInput.mStyleDisplay);
} }
@@ -7386,8 +7384,7 @@ void nsIFrame::FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext,
void nsIFrame::ReflowAbsoluteFrames(nsPresContext* aPresContext, void nsIFrame::ReflowAbsoluteFrames(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,
nsReflowStatus& aStatus, nsReflowStatus& aStatus) {
bool aConstrainBSize) {
if (HasAbsolutelyPositionedChildren()) { if (HasAbsolutelyPositionedChildren()) {
nsAbsoluteContainingBlock* absoluteContainer = GetAbsoluteContainingBlock(); nsAbsoluteContainingBlock* absoluteContainer = GetAbsoluteContainingBlock();
@@ -7406,10 +7403,8 @@ void nsIFrame::ReflowAbsoluteFrames(nsPresContext* aPresContext,
nsRect containingBlock(0, 0, containingBlockWidth, containingBlockHeight); nsRect containingBlock(0, 0, containingBlockWidth, containingBlockHeight);
AbsPosReflowFlags flags = AbsPosReflowFlags flags =
AbsPosReflowFlags::CBWidthAndHeightChanged; // XXX could be optimized AbsPosReflowFlags::CBWidthAndHeightChanged | // XXX could be optimized
if (aConstrainBSize) { AbsPosReflowFlags::ConstrainHeight;
flags |= AbsPosReflowFlags::ConstrainHeight;
}
absoluteContainer->Reflow(container, aPresContext, aReflowInput, aStatus, absoluteContainer->Reflow(container, aPresContext, aReflowInput, aStatus,
containingBlock, flags, containingBlock, flags,
&aDesiredSize.mOverflowAreas); &aDesiredSize.mOverflowAreas);

View File

@@ -3160,8 +3160,7 @@ class nsIFrame : public nsQueryFrame {
void FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext, void FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,
nsReflowStatus& aStatus, nsReflowStatus& aStatus);
bool aConstrainBSize = true);
/** /**
* Updates the overflow areas of the frame. This can be called if an * Updates the overflow areas of the frame. This can be called if an
@@ -4564,8 +4563,7 @@ class nsIFrame : public nsQueryFrame {
void ReflowAbsoluteFrames(nsPresContext* aPresContext, void ReflowAbsoluteFrames(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,
nsReflowStatus& aStatus, nsReflowStatus& aStatus);
bool aConstrainBSize = true);
private: private:
nscoord ComputeISizeValueFromAspectRatio( nscoord ComputeISizeValueFromAspectRatio(

View File

@@ -1862,8 +1862,8 @@ void nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
// FIXME: Unconditionally using NS_UNCONSTRAINEDSIZE for the bsize and // FIXME: Unconditionally using NS_UNCONSTRAINEDSIZE for the bsize and
// ignoring any change to the reflow status aren't correct. We'll never // ignoring any change to the reflow status aren't correct. We'll never
// paginate absolutely positioned frames. // paginate absolutely positioned frames.
positionedPart->FinishReflowWithAbsoluteFrames( positionedPart->FinishReflowWithAbsoluteFrames(PresContext(), desiredSize,
PresContext(), desiredSize, reflowInput, reflowStatus, true); reflowInput, reflowStatus);
// FinishReflowWithAbsoluteFrames has updated overflow on // FinishReflowWithAbsoluteFrames has updated overflow on
// |positionedPart|. We need to make sure that update propagates // |positionedPart|. We need to make sure that update propagates