Bug 1720621 - Adjust display list building rect for page scale transform within nsPageContentFrame. r=miko
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 20 Jul 2021 01:21:31 +0000
changeset 586084 d71ea8ccda7bdd3d2d6968a05a65716e39bd62bb
parent 586083 db260f2962f4bbbfe0f10a27d260ade433d9f5f2
child 586085 2e16fa5f0a1f474a064e7e14fbd5b13fce1a19f7
push id38625
push userarchaeopteryx@coole-files.de
push dateTue, 20 Jul 2021 09:46:04 +0000
treeherdermozilla-central@d71ea8ccda7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiko
bugs1720621
milestone92.0a1
first release with
nightly linux32
d71ea8ccda7b / 92.0a1 / 20210720094604 / files
nightly linux64
d71ea8ccda7b / 92.0a1 / 20210720094604 / files
nightly mac
d71ea8ccda7b / 92.0a1 / 20210720094604 / files
nightly win32
d71ea8ccda7b / 92.0a1 / 20210720094604 / files
nightly win64
d71ea8ccda7b / 92.0a1 / 20210720094604 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1720621 - Adjust display list building rect for page scale transform within nsPageContentFrame. r=miko Differential Revision: https://phabricator.services.mozilla.com/D120127
layout/generic/nsPageContentFrame.cpp
--- a/layout/generic/nsPageContentFrame.cpp
+++ b/layout/generic/nsPageContentFrame.cpp
@@ -345,16 +345,21 @@ void nsPageContentFrame::BuildDisplayLis
     clipState.ClipContentDescendants(clipRect);
 
     if (StaticPrefs::layout_display_list_improve_fragmentation() &&
         pageNum <= 255) {
       nsDisplayListBuilder::AutoPageNumberSetter p(aBuilder, pageNum);
       BuildPreviousPageOverflow(aBuilder, pageFrame, this, set);
     }
 
+    nsRect visible = aBuilder->GetVisibleRect();
+    visible.ScaleInverseRoundOut(PresContext()->GetPageScale());
+
+    nsDisplayListBuilder::AutoBuildingDisplayList buildingForChild(
+       aBuilder, this, visible, visible);
     mozilla::ViewportFrame::BuildDisplayList(aBuilder, set);
 
     set.SerializeWithCorrectZOrder(&content, GetContent());
 
     // We may need to paint out-of-flow frames whose placeholders are on other
     // pages. Add those pages to our display list. Note that out-of-flow frames
     // can't be placed after their placeholders so
     // we don't have to process earlier pages. The display lists for