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 75611 b727463566a158c1696fc0c464ab96a109032f09
parent 75610 1d2b61ed8e44fade21ceb70a88c77ae2743e66dd
child 75612 13010f8b9fe1d2920b5d77d305ae66983cd053d8
push id1369
push userdbaron@mozilla.com
push dateSun, 21 Aug 2011 01:37:01 +0000
treeherdermozilla-inbound@b727463566a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs403524, 680505
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);