Issue #1916 - Part 2: Add a flag to allow FinishReflowChild to handle relative positioning, and convert the caller for which this makes sense.

Backported from Mozilla bug 1547759.
This commit is contained in:
Job Bautista 2022-06-17 19:16:53 +08:00 committed by roytam1
commit 797ddb4d88
4 changed files with 27 additions and 14 deletions

View file

@ -448,16 +448,11 @@ nsBlockReflowContext::PlaceBlock(const ReflowInput& aReflowInput,
ConvertTo(frameWM, mWritingMode,
mContainerSize - mMetrics.PhysicalSize());
// ApplyRelativePositioning in right-to-left writing modes needs to
// know the updated frame width
mFrame->SetSize(mWritingMode, mMetrics.Size(mWritingMode));
aReflowInput.ApplyRelativePositioning(&logPos, mContainerSize);
// Now place the frame and complete the reflow process
nsContainerFrame::FinishReflowChild(mFrame, mPresContext, mMetrics,
&aReflowInput, frameWM, logPos,
mContainerSize,
nsIFrame::ReflowChildFlags::Default);
nsIFrame::ReflowChildFlags::ApplyRelativePositioning);
aOverflowAreas = mMetrics.mOverflowAreas + mFrame->GetPosition();