From e60052ea65f29165822eb03f4129bde6d8d20a7f Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Mon, 21 Apr 2014 17:09:30 -0400 Subject: [PATCH] Bug 961289 - Log displayports on client side for APZ testing. r=kats --HG-- extra : source : 18b0cdfc97633c46f609dbd84a52af6472d4edd4 --- layout/base/nsDisplayList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index ed039261af8c..bc799a64bc5e 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -645,10 +645,13 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, resolution.scale, resolution.scale, auPerDevPixel); aRoot->SetVisibleRegion(visible); + nsIPresShell* presShell = presContext->GetPresShell(); FrameMetrics metrics; metrics.mViewport = CSSRect::FromAppUnits(aViewport); if (aDisplayPort) { metrics.mDisplayPort = CSSRect::FromAppUnits(*aDisplayPort); + nsLayoutUtils::LogTestDataForPaint(presShell, aScrollId, "displayport", + metrics.mDisplayPort); if (aCriticalDisplayPort) { metrics.mCriticalDisplayPort = CSSRect::FromAppUnits(*aCriticalDisplayPort); } @@ -679,7 +682,6 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, // Only the root scrollable frame for a given presShell should pick up // the presShell's resolution. All the other frames are 1.0. - nsIPresShell* presShell = presContext->GetPresShell(); if (aScrollFrame == presShell->GetRootScrollFrame()) { metrics.mResolution = ParentLayerToLayerScale(presShell->GetXResolution(), presShell->GetYResolution());