Bug 688382 - Add some logic for text-transform checking to avoid merging the first-letter text-frame with the rest. r=roc

This commit is contained in:
Yu-Sian (Thomasy) Liu 2012-09-07 16:23:01 -04:00
parent a65ee05be3
commit 3ca4f03c02
4 changed files with 19 additions and 0 deletions

View File

@ -1554,6 +1554,7 @@ BuildTextRunsScanner::ContinueTextRunAcrossFrames(nsTextFrame* aFrame1, nsTextFr
}
nsStyleContext* sc2 = aFrame2->GetStyleContext();
const nsStyleText* textStyle2 = sc2->GetStyleText();
if (sc1 == sc2)
return true;
@ -1563,6 +1564,7 @@ BuildTextRunsScanner::ContinueTextRunAcrossFrames(nsTextFrame* aFrame1, nsTextFr
nscoord letterSpacing2 = LetterSpacing(aFrame2);
return fontStyle1->mFont.BaseEquals(fontStyle2->mFont) &&
sc1->GetStyleFont()->mLanguage == sc2->GetStyleFont()->mLanguage &&
textStyle1->mTextTransform == textStyle2->mTextTransform &&
nsLayoutUtils::GetTextRunFlagsForStyle(sc1, fontStyle1, letterSpacing1) ==
nsLayoutUtils::GetTextRunFlagsForStyle(sc2, fontStyle2, letterSpacing2);
}

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<p>Blah Blah</p>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<style>
p:first-letter { text-transform: uppercase; }
p { text-transform: capitalize }
</style>
<body>
<p>blah blah</p>
</body>
</html>

View File

@ -4,6 +4,7 @@
== capitalize-4.html capitalize-4-ref.html
== capitalize-5.html capitalize-5-ref.html
== capitalize-6.html capitalize-6-ref.html
== capitalize-7.html capitalize-7-ref.html
== lowercase-1.html lowercase-ref.html
== lowercase-sigma-1.html lowercase-sigma-1-ref.html
== small-caps-1.html small-caps-1-ref.html