Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :( MozReview-Commit-ID: 2kTZ5McREUT
This commit is contained in:
@@ -231,7 +231,9 @@ nsMathMLFrame::CalcLength(nsPresContext* aPresContext,
|
||||
else if (eCSSUnit_XHeight == unit) {
|
||||
aPresContext->SetUsesExChUnits(true);
|
||||
RefPtr<nsFontMetrics> fm = nsLayoutUtils::
|
||||
GetFontMetricsForComputedStyle(aComputedStyle, aFontSizeInflation);
|
||||
GetFontMetricsForComputedStyle(aComputedStyle,
|
||||
aPresContext,
|
||||
aFontSizeInflation);
|
||||
nscoord xHeight = fm->XHeight();
|
||||
return NSToCoordRound(aCSSValue.GetFloatValue() * (float)xHeight);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user