Bug 928798 - Check nsSVGTextFrame2 for dirtiness when gettings it bounding box contribution. r=roc a=abillings
authorCameron McCormack <cam@mcc.id.au>
Sun, 03 Nov 2013 11:19:18 +1100
changeset 166351 27d0165a1097d1dab32e45bf0fb03a55be446129
parent 166350 dbef6344229b4b72a18729943c030582f4916308
child 166352 8f6d7f3350c3e3cfcd1c6799be7925f5d770ab1b
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, abillings
bugs928798
milestone27.0a2
Bug 928798 - Check nsSVGTextFrame2 for dirtiness when gettings it bounding box contribution. r=roc a=abillings
layout/svg/nsSVGTextFrame2.cpp
--- a/layout/svg/nsSVGTextFrame2.cpp
+++ b/layout/svg/nsSVGTextFrame2.cpp
@@ -3805,19 +3805,18 @@ TextRenderedRunFlagsForBBoxContribution(
 
 SVGBBox
 nsSVGTextFrame2::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace,
                                      uint32_t aFlags)
 {
   NS_ASSERTION(GetFirstPrincipalChild(), "must have a child frame");
 
   SVGBBox bbox;
-  nsIFrame* kid = GetFirstPrincipalChild();
-  if (kid && NS_SUBTREE_DIRTY(kid)) {
-    // Return an empty bbox if our kid's subtree is dirty. This may be called
+  if (NS_SUBTREE_DIRTY(this)) {
+    // Return an empty bbox if this frame's subtree is dirty. This may be called
     // in that situation, e.g. when we're building a display list after an
     // interrupted reflow. This can also be called during reflow before we've
     // been reflowed, e.g. if an earlier sibling is calling FinishAndStoreOverflow and
     // needs our parent's perspective matrix, which depends on the SVG bbox
     // contribution of this frame. In the latter situation, when all siblings have
     // been reflowed, the parent will compute its perspective and rerun
     // FinishAndStoreOverflow for all its children.
     return bbox;