Skip to content

Commit

Permalink
Bug 1054161. Don't build display items for text with alpha=0. r=dbaron
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 869a05a652a3bc6e8e122d34fb166ed9fbbdaa5c
  • Loading branch information
rocallahan committed Aug 22, 2014
1 parent 3236b7a commit 41cde90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layout/generic/nsTextFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 41cde90

Please sign in to comment.