Bug 1159729 - Use the adjusted |offset| value in GetTextDecorationRectInternal, instead of ignoring it. r=smontagu
authorJonathan Kew <jkew@mozilla.com>
Mon, 11 May 2015 11:32:55 +0100
changeset 243345 e03d014c257f845bc3bfc31ff1f336c76bde1bcf
parent 243344 d5d2f6e45d70aa590a0e5942323994a1e5a5911c
child 243346 f4be5f25b35ad130b570505932cbe896a40732dc
push id28738
push usercbook@mozilla.com
push dateTue, 12 May 2015 14:11:31 +0000
treeherderautoland@bedce1b405a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1159729
milestone40.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
Bug 1159729 - Use the adjusted |offset| value in GetTextDecorationRectInternal, instead of ignoring it. r=smontagu
layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -4544,22 +4544,22 @@ nsCSSRendering::GetTextDecorationRectInt
       offset = aOffset - lineThickness + extra;
       break;
     }
     default:
       NS_ERROR("Invalid decoration value!");
   }
 
   if (aVertical) {
-    r.y = baseline + floor(aOffset + 0.5); // this will need updating when we
-                                           // support sideways-left orientation
+    r.y = baseline + floor(offset + 0.5); // this will need updating when we
+                                          // support sideways-left orientation
     Swap(r.x, r.y);
     Swap(r.width, r.height);
   } else {
-    r.y = baseline - floor(aOffset + 0.5);
+    r.y = baseline - floor(offset + 0.5);
   }
 
   return r;
 }
 
 // ------------------
 // ImageRenderer
 // ------------------