Bug 1027593 - Ensure RecordFrameMetrics populates the displayport margins as well. r=tn, a=2.0+
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 08 Jul 2014 18:01:02 -0400
changeset 207770 5a044ff7443cea4347d2e1e93739687293b91091
parent 207769 f56929d87253cbdf279c623743701644c431cc77
child 207771 818553f6e2dd0b2451cd159024ce4afc96f93835
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn, 2
bugs1027593
milestone32.0a2
Bug 1027593 - Ensure RecordFrameMetrics populates the displayport margins as well. r=tn, a=2.0+
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -659,16 +659,21 @@ static void RecordFrameMetrics(nsIFrame*
     if (nsLayoutUtils::GetDisplayPort(content, &dp)) {
       metrics.mDisplayPort = CSSRect::FromAppUnits(dp);
       nsLayoutUtils::LogTestDataForPaint(presShell, scrollId, "displayport",
           metrics.mDisplayPort);
     }
     if (nsLayoutUtils::GetCriticalDisplayPort(content, &dp)) {
       metrics.mCriticalDisplayPort = CSSRect::FromAppUnits(dp);
     }
+    DisplayPortMarginsPropertyData* marginsData =
+        static_cast<DisplayPortMarginsPropertyData*>(content->GetProperty(nsGkAtoms::DisplayPortMargins));
+    if (marginsData) {
+      metrics.SetDisplayPortMargins(marginsData->mMargins);
+    }
   }
 
   nsIScrollableFrame* scrollableFrame = nullptr;
   if (aScrollFrame)
     scrollableFrame = aScrollFrame->GetScrollTargetFrame();
 
   metrics.mScrollableRect = CSSRect::FromAppUnits(
     nsLayoutUtils::CalculateScrollableRectForFrame(scrollableFrame, aForFrame));