#142562 problem with <td align=right or align=center
We are observing langGroup in some place while ignor it in others. This patch make all font metrics call consistent. nsIRenderingContext API is change to make things neat. r=rbs, sr=waterson git-svn-id: svn://10.0.0.236/trunk@122131 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -601,15 +601,9 @@ nsInlineFrame::ReflowFrames(nsIPresContext* aPresContext,
|
||||
aMetrics.width += aReflowState.mComputedBorderPadding.right;
|
||||
}
|
||||
|
||||
SetFontFromStyle(aReflowState.rendContext, mStyleContext);
|
||||
nsCOMPtr<nsIFontMetrics> fm;
|
||||
const nsStyleFont* font;
|
||||
GetStyleData(eStyleStruct_Font, (const nsStyleStruct*&)font);
|
||||
if (font) {
|
||||
aReflowState.rendContext->SetFont(font->mFont);
|
||||
aReflowState.rendContext->GetFontMetrics(*getter_AddRefs(fm));
|
||||
} else {
|
||||
NS_WARNING("No font retrieved from style context - sorry but font metrics are not available");
|
||||
}
|
||||
aReflowState.rendContext->GetFontMetrics(*getter_AddRefs(fm));
|
||||
|
||||
if (fm) {
|
||||
// Compute final height of the frame.
|
||||
@@ -640,6 +634,8 @@ nsInlineFrame::ReflowFrames(nsIPresContext* aPresContext,
|
||||
// little hack lets us override that behavior to allow for more
|
||||
// precise layout in the face of imprecise fonts.
|
||||
if (nsHTMLReflowState::UseComputedHeight()) {
|
||||
const nsStyleFont* font;
|
||||
GetStyleData(eStyleStruct_Font, (const nsStyleStruct*&)font);
|
||||
aMetrics.height = font->mFont.size +
|
||||
aReflowState.mComputedBorderPadding.top +
|
||||
aReflowState.mComputedBorderPadding.bottom;
|
||||
|
||||
Reference in New Issue
Block a user