Bug 1054161. Don't build display items for text with alpha=0. r=dbaron

--HG--
extra : rebase_source : 869a05a652a3bc6e8e122d34fb166ed9fbbdaa5c
This commit is contained in:
Robert O'Callahan 2014-08-23 00:08:12 +12:00
parent a4d83b7b42
commit 3de72b147b

View File

@ -4580,6 +4580,15 @@ nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DO_GLOBAL_REFLOW_COUNT_DSP("nsTextFrame");
if (NS_GET_A(StyleColor()->mColor) == 0 &&
!IsSVGText() && !IsSelected() && !StyleText()->HasTextShadow()) {
TextDecorations textDecs;
GetTextDecorations(PresContext(), eResolvedColors, textDecs);
if (!textDecs.HasDecorationLines()) {
return;
}
}
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayText(aBuilder, this));
}