Remove quirks mode check that should have been removed when standards-mode and quirks-mode text-decorations were merged in bug 403524, changeset 83b2648ee442. (Bug 680505, patch 2) r=roc
authorL. David Baron <dbaron@dbaron.org>
Sat, 20 Aug 2011 21:35:56 -0400
changeset 75614 b727463566a158c1696fc0c464ab96a109032f09
parent 75613 1d2b61ed8e44fade21ceb70a88c77ae2743e66dd
child 75615 13010f8b9fe1d2920b5d77d305ae66983cd053d8
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersroc
bugs403524, 680505
milestone9.0a1
Remove quirks mode check that should have been removed when standards-mode and quirks-mode text-decorations were merged in bug 403524, changeset 83b2648ee442. (Bug 680505, patch 2) r=roc This code is a little bit sketchy, but given that text-decoration drawing is the same across modes we shouldn't have a quirks mode check here (though there's a decent argument to be made that we shouldn't be checking text decorations at all).
layout/generic/nsTextFrameThebes.cpp
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -6623,18 +6623,17 @@ RoundOut(const gfxRect& aRect)
   r.width = NSToCoordCeil(aRect.XMost()) - r.x;
   r.height = NSToCoordCeil(aRect.YMost()) - r.y;
   return r;
 }
 
 nsRect
 nsTextFrame::ComputeTightBounds(gfxContext* aContext) const
 {
-  if ((GetStyleContext()->HasTextDecorationLines() &&
-       eCompatibility_NavQuirks == PresContext()->CompatibilityMode()) ||
+  if (GetStyleContext()->HasTextDecorationLines() ||
       (GetStateBits() & TEXT_HYPHEN_BREAK)) {
     // This is conservative, but OK.
     return GetVisualOverflowRect();
   }
 
   gfxSkipCharsIterator iter = const_cast<nsTextFrame*>(this)->EnsureTextRun();
   if (!mTextRun)
     return nsRect(0, 0, 0, 0);