Bug 1099298 - Add the pres shell resolution to the container layer parameters in nsDisplaySubDocument::ComputeFrameMetrics(). r=tn
authorBotond Ballo <botond@mozilla.com>
Fri, 21 Nov 2014 13:50:41 -0500
changeset 241323 a5271ded6fff270f4512e4c93747792a9bc6c603
parent 241322 05b7e79b688e936428dbca959537a2afc517d22e
child 241324 72a9b9b54acc3d27614f96647d0d00dfcc409758
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1099298
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1099298 - Add the pres shell resolution to the container layer parameters in nsDisplaySubDocument::ComputeFrameMetrics(). r=tn
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -3903,17 +3903,19 @@ nsDisplaySubDocument::ComputeFrameMetric
 {
   if (!(mFlags & GENERATE_SCROLLABLE_LAYER)) {
     return UniquePtr<FrameMetrics>(nullptr);
   }
 
   nsPresContext* presContext = mFrame->PresContext();
   nsIFrame* rootScrollFrame = presContext->PresShell()->GetRootScrollFrame();
   bool isRootContentDocument = presContext->IsRootContentDocument();
-  ContainerLayerParameters params = aContainerParameters;
+  nsIPresShell* presShell = presContext->PresShell();
+  ContainerLayerParameters params(presShell->GetXResolution(),
+      presShell->GetYResolution(), nsIntPoint(), aContainerParameters);
   if ((mFlags & GENERATE_SCROLLABLE_LAYER) &&
       rootScrollFrame->GetContent() &&
       nsLayoutUtils::GetCriticalDisplayPort(rootScrollFrame->GetContent(), nullptr)) {
     params.mInLowPrecisionDisplayPort = true;
   }
 
   nsRect viewport = mFrame->GetRect() -
                     mFrame->GetPosition() +