Bug 1173580 - Record content descriptions in APZ test data. r=kats

This commit is contained in:
Botond Ballo 2015-06-10 20:47:56 -04:00
parent dc49f253ba
commit a04e12e1a2

View File

@ -8422,11 +8422,13 @@ nsLayoutUtils::ComputeFrameMetrics(nsIFrame* aForFrame,
nsLayoutUtils::CalculateRootCompositionSize(aScrollFrame ? aScrollFrame : aForFrame,
isRootContentDocRootScrollFrame, metrics));
if (gfxPrefs::APZPrintTree()) {
if (gfxPrefs::APZPrintTree() || gfxPrefs::APZTestLoggingEnabled()) {
if (nsIContent* content = frameForCompositionBoundsCalculation->GetContent()) {
nsAutoString contentDescription;
content->Describe(contentDescription);
metrics.SetContentDescription(NS_LossyConvertUTF16toASCII(contentDescription));
nsLayoutUtils::LogTestDataForPaint(aLayer->Manager(), scrollId, "contentDescription",
metrics.GetContentDescription().get());
}
}