Bug 1529182 - Recalculate context scale when inflating mRect of SVG text. r=longsonr
☠☠ backed out by ca0ea512f874 ☠ ☠
authorAlex Henrie <alexhenrie24@gmail.com>
Thu, 21 Feb 2019 09:06:28 -0700
changeset 518439 27284783216cf774b8efdd3283620c669c58c40a
parent 518438 02aebe5267552208953599fbdf2879030227a2c6
child 518440 739201563949300a8fe729d07a49e7b634231922
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs1529182
milestone67.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 1529182 - Recalculate context scale when inflating mRect of SVG text. r=longsonr
layout/svg/SVGTextFrame.cpp
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -3515,17 +3515,18 @@ void SVGTextFrame::ReflowSVG() {
     mRect.SetEmpty();
   } else {
     mRect = nsLayoutUtils::RoundGfxRectToAppRect(r.ToThebesRect(),
                                                  AppUnitsPerCSSPixel());
 
     // Due to rounding issues when we have a transform applied, we sometimes
     // don't include an additional row of pixels.  For now, just inflate our
     // covered region.
-    mRect.Inflate(ceil(presContext->AppUnitsPerDevPixel() / mLastContextScale));
+    double contextScale = GetContextScale(GetCanvasTM());
+    mRect.Inflate(ceil(presContext->AppUnitsPerDevPixel() / contextScale));
   }
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
     // Make sure we have our filter property (if any) before calling
     // FinishAndStoreOverflow (subsequent filter changes are handled off
     // nsChangeHint_UpdateEffects):
     SVGObserverUtils::UpdateEffects(this);
   }