Clean up API (and its callers) for getting style data: remove unneeded null checks and switch to new inline member functions (one for each struct) that return values. b=197205 r+sr=roc a=brendan
git-svn-id: svn://10.0.0.236/trunk@142488 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -166,10 +166,8 @@ nsMathMLmsubFrame::PlaceSubScript (nsIPresContext* aPresContext,
|
||||
nscoord xHeight = 0;
|
||||
nsCOMPtr<nsIFontMetrics> fm;
|
||||
|
||||
const nsStyleFont* font;
|
||||
baseFrame->GetStyleData(eStyleStruct_Font, (const nsStyleStruct *&)font);
|
||||
|
||||
aPresContext->GetMetricsFor (font->mFont, getter_AddRefs(fm));
|
||||
aPresContext->GetMetricsFor (baseFrame->GetStyleFont()->mFont,
|
||||
getter_AddRefs(fm));
|
||||
fm->GetXHeight (xHeight);
|
||||
nscoord minShiftFromXHeight = (nscoord)
|
||||
(bmSubScript.ascent - (4.0f/5.0f) * xHeight);
|
||||
|
||||
Reference in New Issue
Block a user