Don't try to include the selection area in our text-decoration overflow if we're not selected. Bug 429595, r+sr=roc, a=beltzner

This commit is contained in:
bzbarsky@mit.edu 2008-04-21 20:28:14 -07:00
parent 0a13ac092b
commit 8be35ebcab

View File

@ -3689,7 +3689,8 @@ nsTextFrame::UnionTextDecorationOverflow(nsPresContext* aPresContext,
// When this frame is not selected, the text-decoration area must be in
// frame bounds.
float ratio;
if (!HasSelectionOverflowingDecorations(aPresContext, &ratio))
if (!(GetStateBits() & NS_FRAME_SELECTED_CONTENT) ||
!HasSelectionOverflowingDecorations(aPresContext, &ratio))
return;
nsLineLayout::CombineTextDecorations(aPresContext,