backout 0f4a08fb2e8e to see if it caused random orange (Bug 756122 - Clean up nsSVGUtils::PaintFrameWithEffects a little).
authorJonathan Watt <jwatt@jwatt.org>
Fri, 18 May 2012 12:21:24 +0100
changeset 94353 21508fb7cac80af86d00a1dcf27a0faa194ee088
parent 94352 f3289b7a57a587d0c5c99042775d4c191155ae0d
child 94355 1d43642295b1d2a70433b6a044a52495c7e4da1f
push id22709
push useremorley@mozilla.com
push dateFri, 18 May 2012 17:44:33 +0000
treeherdermozilla-central@17422a2d0c70 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs756122
milestone15.0a1
backs out0f4a08fb2e8e1d53a3234d7bb096a2c1193f4c95
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
backout 0f4a08fb2e8e to see if it caused random orange (Bug 756122 - Clean up nsSVGUtils::PaintFrameWithEffects a little).
layout/svg/base/src/nsSVGUtils.cpp
--- a/layout/svg/base/src/nsSVGUtils.cpp
+++ b/layout/svg/base/src/nsSVGUtils.cpp
@@ -1161,16 +1161,25 @@ nsSVGUtils::PaintFrameWithEffects(nsRend
     return;
 
   const nsIContent* content = aFrame->GetContent();
   if (content->IsSVG() &&
       !static_cast<const nsSVGElement*>(content)->HasValidDimensions()) {
     return;
   }
 
+  /* Properties are added lazily and may have been removed by a restyle,
+     so make sure all applicable ones are set again. */
+
+  nsSVGEffects::EffectProperties effectProperties =
+    nsSVGEffects::GetEffectProperties(aFrame);
+
+  bool isOK = true;
+  nsSVGFilterFrame *filterFrame = effectProperties.GetFilterFrame(&isOK);
+
   if (aDirtyRect &&
       !(aFrame->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
     // Here we convert aFrame's paint bounds to outer-<svg> device space,
     // compare it to aDirtyRect, and return early if they don't intersect.
     // We don't do this optimization for nondisplay SVG since nondisplay
     // SVG doesn't maintain bounds/overflow rects.
     nsRect overflowRect = aFrame->GetVisualOverflowRectRelativeToSelf();
     if (aFrame->IsFrameOfType(nsIFrame::eSVGGeometry)) {
@@ -1213,33 +1222,25 @@ nsSVGUtils::PaintFrameWithEffects(nsRend
    */
 
   if (opacity != 1.0f && CanOptimizeOpacity(aFrame))
     opacity = 1.0f;
 
   gfxContext *gfx = aContext->ThebesContext();
   bool complexEffects = false;
 
-  /* Properties are added lazily and may have been removed by a restyle,
-   so make sure all applicable ones are set again. */
-
-  nsSVGEffects::EffectProperties effectProperties =
-    nsSVGEffects::GetEffectProperties(aFrame);
-
-  bool isOK = true;
-  nsSVGFilterFrame *filterFrame = effectProperties.GetFilterFrame(&isOK);
   nsSVGClipPathFrame *clipPathFrame = effectProperties.GetClipPathFrame(&isOK);
   nsSVGMaskFrame *maskFrame = effectProperties.GetMaskFrame(&isOK);
 
+  bool isTrivialClip = clipPathFrame ? clipPathFrame->IsTrivial() : true;
+
   if (!isOK) {
     // Some resource is invalid. We shouldn't paint anything.
     return;
   }
-
-  bool isTrivialClip = clipPathFrame ? clipPathFrame->IsTrivial() : true;
   
   gfxMatrix matrix;
   if (clipPathFrame || maskFrame)
     matrix = GetCanvasTM(aFrame);
 
   /* Check if we need to do additional operations on this child's
    * rendering, which necessitates rendering into another surface. */
   if (opacity != 1.0f || maskFrame || (clipPathFrame && !isTrivialClip)) {