зеркало из https://github.com/mozilla/gecko-dev.git
Bug 472909. Need to call FinishSettingProperties on nsTranformedTextRuns that we create as parts of other transformed textruns. r=smontagu
--HG-- extra : rebase_source : 38adef908b1ec8d6fcc97b1b6cb42690733ae752
This commit is contained in:
Родитель
523efb98ec
Коммит
f55e9aee2a
|
@ -88,7 +88,7 @@ nsTransformedTextRun::SetPotentialLineBreaks(PRUint32 aStart, PRUint32 aLength,
|
|||
return changed;
|
||||
}
|
||||
|
||||
gfxTextRun*
|
||||
nsTransformedTextRun*
|
||||
nsTransformingTextRunFactory::MakeTextRun(const PRUnichar* aString, PRUint32 aLength,
|
||||
const gfxTextRunFactory::Parameters* aParams,
|
||||
gfxFontGroup* aFontGroup, PRUint32 aFlags,
|
||||
|
@ -98,7 +98,7 @@ nsTransformingTextRunFactory::MakeTextRun(const PRUnichar* aString, PRUint32 aLe
|
|||
aString, aLength, aFlags, aStyles, aOwnsFactory);
|
||||
}
|
||||
|
||||
gfxTextRun*
|
||||
nsTransformedTextRun*
|
||||
nsTransformingTextRunFactory::MakeTextRun(const PRUint8* aString, PRUint32 aLength,
|
||||
const gfxTextRunFactory::Parameters* aParams,
|
||||
gfxFontGroup* aFontGroup, PRUint32 aFlags,
|
||||
|
@ -279,7 +279,7 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
|||
}
|
||||
|
||||
if ((i == length || runIsLowercase != isLowercase) && runStart < i) {
|
||||
nsAutoPtr<gfxTextRun> transformedChild;
|
||||
nsAutoPtr<nsTransformedTextRun> transformedChild;
|
||||
gfxTextRunCache::AutoTextRun cachedChild;
|
||||
gfxTextRun* child;
|
||||
|
||||
|
@ -301,6 +301,9 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
|||
"lost some break-before values?");
|
||||
child->SetPotentialLineBreaks(0, canBreakBeforeArray.Length(),
|
||||
canBreakBeforeArray.Elements(), aRefContext);
|
||||
if (transformedChild) {
|
||||
transformedChild->FinishSettingProperties(aRefContext);
|
||||
}
|
||||
aTextRun->CopyGlyphDataFrom(child, 0, child->GetLength(), runStart, PR_FALSE);
|
||||
|
||||
runStart = i;
|
||||
|
@ -388,7 +391,7 @@ nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
|||
GetParametersForInner(aTextRun, &flags, aRefContext);
|
||||
gfxFontGroup* fontGroup = aTextRun->GetFontGroup();
|
||||
|
||||
nsAutoPtr<gfxTextRun> transformedChild;
|
||||
nsAutoPtr<nsTransformedTextRun> transformedChild;
|
||||
gfxTextRunCache::AutoTextRun cachedChild;
|
||||
gfxTextRun* child;
|
||||
|
||||
|
@ -411,6 +414,9 @@ nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
|||
"Dropped characters or break-before values somewhere!");
|
||||
child->SetPotentialLineBreaks(0, canBreakBeforeArray.Length(),
|
||||
canBreakBeforeArray.Elements(), aRefContext);
|
||||
if (transformedChild) {
|
||||
transformedChild->FinishSettingProperties(aRefContext);
|
||||
}
|
||||
|
||||
if (extraCharsCount > 0) {
|
||||
// Now merge multiple characters into one multi-glyph character as required
|
||||
|
|
|
@ -48,11 +48,11 @@ public:
|
|||
virtual ~nsTransformingTextRunFactory() {}
|
||||
|
||||
// Default 8-bit path just transforms to Unicode and takes that path
|
||||
gfxTextRun* MakeTextRun(const PRUint8* aString, PRUint32 aLength,
|
||||
nsTransformedTextRun* MakeTextRun(const PRUint8* aString, PRUint32 aLength,
|
||||
const gfxFontGroup::Parameters* aParams,
|
||||
gfxFontGroup* aFontGroup, PRUint32 aFlags,
|
||||
nsStyleContext** aStyles, PRBool aOwnsFactory = PR_TRUE);
|
||||
gfxTextRun* MakeTextRun(const PRUnichar* aString, PRUint32 aLength,
|
||||
nsTransformedTextRun* MakeTextRun(const PRUnichar* aString, PRUint32 aLength,
|
||||
const gfxFontGroup::Parameters* aParams,
|
||||
gfxFontGroup* aFontGroup, PRUint32 aFlags,
|
||||
nsStyleContext** aStyles, PRBool aOwnsFactory = PR_TRUE);
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
== capitalize-2.html capitalize-ref.html
|
||||
== capitalize-3.html capitalize-3-ref.html
|
||||
== lowercase-1.html lowercase-ref.html
|
||||
== small-caps-1.html small-caps-1-ref.html
|
||||
== uppercase-1.html uppercase-ref.html
|
||||
== uppercase-szlig-1.html uppercase-szlig-ref.html
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body style="font-size:100px;">A<span style="font-size:80%">A</span></body>
|
||||
</html>
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body style="font-variant:small-caps; font-size:100px;">Aa</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче