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:
@@ -175,8 +175,11 @@ nsTextControlFrame::CalcIntrinsicSize(gfxContext* aRenderingContext,
|
||||
nsLayoutUtils::GetFontMetricsForFrame(this, aFontSizeInflation);
|
||||
|
||||
lineHeight =
|
||||
ReflowInput::CalcLineHeight(GetContent(), Style(),
|
||||
NS_AUTOHEIGHT, aFontSizeInflation);
|
||||
ReflowInput::CalcLineHeight(GetContent(),
|
||||
Style(),
|
||||
PresContext(),
|
||||
NS_AUTOHEIGHT,
|
||||
aFontSizeInflation);
|
||||
charWidth = fontMet->AveCharWidth();
|
||||
charMaxAdvance = fontMet->MaxAdvance();
|
||||
|
||||
@@ -633,8 +636,11 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nscoord lineHeight = aReflowInput.ComputedBSize();
|
||||
float inflation = nsLayoutUtils::FontSizeInflationFor(this);
|
||||
if (!IsSingleLineTextControl()) {
|
||||
lineHeight = ReflowInput::CalcLineHeight(GetContent(), Style(),
|
||||
NS_AUTOHEIGHT, inflation);
|
||||
lineHeight = ReflowInput::CalcLineHeight(GetContent(),
|
||||
Style(),
|
||||
PresContext(),
|
||||
NS_AUTOHEIGHT,
|
||||
inflation);
|
||||
}
|
||||
RefPtr<nsFontMetrics> fontMet =
|
||||
nsLayoutUtils::GetFontMetricsForFrame(this, inflation);
|
||||
|
||||
Reference in New Issue
Block a user