mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1038663 (part 2) - Move GetFirstFontMetrics() up. r=heycam.
This is necessary for a subsequent patch.
This commit is contained in:
parent
d6ab162415
commit
a64f843399
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user