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

View File

@@ -3160,8 +3160,7 @@ class nsIFrame : public nsQueryFrame {
void FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus,
bool aConstrainBSize = true);
nsReflowStatus& aStatus);
/**
* 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,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus,
bool aConstrainBSize = true);
nsReflowStatus& aStatus);
private:
nscoord ComputeISizeValueFromAspectRatio(

View File

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