Bug 815648 - Correctly detect when we're going to use a shadow so we can measure the text's extents correctly. r=roc
authorJoe Drew <joe@drew.ca>
Tue, 18 Dec 2012 11:37:14 -0500
changeset 125507 f4e2a208826d21e7add2097faf2ba9ecb36a732d
parent 125506 39f604608cff27dd8e710c8b220ce48beeff66b3
child 125508 be49bceac581141e3e4d6235adb90cc88afecf16
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs815648
milestone20.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 815648 - Correctly detect when we're going to use a shadow so we can measure the text's extents correctly. r=roc
content/canvas/src/CanvasRenderingContext2D.cpp
--- a/content/canvas/src/CanvasRenderingContext2D.cpp
+++ b/content/canvas/src/CanvasRenderingContext2D.cpp
@@ -2543,17 +2543,17 @@ CanvasRenderingContext2D::DrawOrMeasureT
       *aWidth = 0;
     }
     return NS_OK;
   }
 
   const ContextState &state = CurrentState();
 
   // This is only needed to know if we can know the drawing bounding box easily.
-  bool doDrawShadow = aOp == TEXT_DRAW_OPERATION_FILL && NeedToDrawShadow();
+  bool doDrawShadow = NeedToDrawShadow();
 
   CanvasBidiProcessor processor;
 
   GetAppUnitsValues(&processor.mAppUnitsPerDevPixel, nullptr);
   processor.mPt = gfxPoint(aX, aY);
   processor.mThebes =
     new gfxContext(gfxPlatform::GetPlatform()->ScreenReferenceSurface());