diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index c3a2d7c9446b..21a62b7f4405 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -1597,6 +1597,16 @@ HasTerminalNewline(const nsTextFrame* aFrame) return frag->CharAt(aFrame->GetContentEnd() - 1) == '\n'; } +static gfxFont::Metrics +GetFirstFontMetrics(gfxFontGroup* aFontGroup, bool aVerticalMetrics) +{ + if (!aFontGroup) + return gfxFont::Metrics(); + gfxFont* font = aFontGroup->GetFirstValidFont(); + return font->GetMetrics(aVerticalMetrics ? gfxFont::eVertical + : gfxFont::eHorizontal); +} + static nscoord LetterSpacing(nsIFrame* aFrame, const nsStyleText* aStyleText = nullptr) { @@ -1826,16 +1836,6 @@ GetHyphenTextRun(gfxTextRun* aTextRun, gfxContext* aContext, nsTextFrame* aTextF MakeHyphenTextRun(ctx, aTextRun->GetAppUnitsPerDevUnit()); } -static gfxFont::Metrics -GetFirstFontMetrics(gfxFontGroup* aFontGroup, bool aVerticalMetrics) -{ - if (!aFontGroup) - return gfxFont::Metrics(); - gfxFont* font = aFontGroup->GetFirstValidFont(); - return font->GetMetrics(aVerticalMetrics ? gfxFont::eVertical - : gfxFont::eHorizontal); -} - PR_STATIC_ASSERT(NS_STYLE_WHITESPACE_NORMAL == 0); PR_STATIC_ASSERT(NS_STYLE_WHITESPACE_PRE == 1); PR_STATIC_ASSERT(NS_STYLE_WHITESPACE_NOWRAP == 2);