Bug 1689789 part 1 - Ensure we don't have any overflow areas for pdf.js content. r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D103608
This commit is contained in:
Mats Palmgren 2021-02-05 19:39:31 +00:00
Родитель 2097a84f83
Коммит 6b588acfa8
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -108,6 +108,13 @@ void nsPageContentFrame::Reflow(nsPresContext* aPresContext,
MOZ_ASSERT(ratio >= 0.0 && ratio < 1.0);
mPD->mShrinkToFitRatio = std::min(mPD->mShrinkToFitRatio, ratio);
}
// pdf.js pages should never overflow given the scaling above.
// nsPrintJob::SetupToPrintContent ignores some ratios close to 1.0
// though and doesn't reflow us again in that case, so we need to clear
// the overflow area here in case that happens. (bug 1689789)
frame->ClearOverflowRects();
kidReflowOutput.mOverflowAreas = aReflowOutput.mOverflowAreas;
}
}