Bug 1819335 Part 1 - Do not create a forced break for CSS named page change immediately before an nsPageBreakFrame. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D191710
This commit is contained in:
Emily McDonough
2023-10-30 20:06:19 +00:00
parent 56b1220f60
commit ddcdb3c978

View File

@@ -3082,7 +3082,7 @@ void nsBlockFrame::ReflowDirtyLines(BlockReflowState& aState) {
if (canBreakForPageNames && (!aState.mReflowInput.mFlags.mIsTopOfPage ||
!aState.IsAdjacentWithBStart())) {
const nsIFrame* const frame = line->mFirstChild;
if (!frame->IsPlaceholderFrame()) {
if (!frame->IsPlaceholderFrame() && !frame->IsPageBreakFrame()) {
nextPageName = frame->GetStartPageValue();
// Walk back to the last frame that isn't a placeholder.
const nsIFrame* prevFrame = frame->GetPrevSibling();