Bug 1402930 - Use the PresContext's override dppx value if set; r=bradwerth

MozReview-Commit-ID: 9DWQdVevIaz

--HG--
extra : rebase_source : 03e184c107e8356c0b8c15a1bfc3d53c092e413a
This commit is contained in:
ZER0 2017-09-25 20:01:22 +02:00
parent 8de001a07d
commit 0c0d4ccc04

View File

@ -373,6 +373,11 @@ ResponsiveImageSelector::SelectImage(bool aReselect)
}
double displayDensity = pctx->CSSPixelsToDevPixels(1.0f);
double overrideDPPX = pctx->GetOverrideDPPX();
if (overrideDPPX > 0) {
displayDensity = overrideDPPX;
}
// Per spec, "In a UA-specific manner, choose one image source"
// - For now, select the lowest density greater than displayDensity, otherwise