Bug 620413 useless check of stopFrame in nsSVGGradientFrame::GetStopInformation
authortimeless@mozdev.org
Tue, 15 Feb 2011 23:53:02 -0800
changeset 62654 7a6f85f6891e76477c641e74f08c2a8eea031a05
parent 62653 79bbe4072e69e75c355e037c1bbfb53e64348028
child 62655 b41a6a2499d14d116fe807b7094420008acb8af8
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
bugs620413
milestone2.0b12pre
Bug 620413 useless check of stopFrame in nsSVGGradientFrame::GetStopInformation r=longsonr a=dbaron
layout/svg/base/src/nsSVGGradientFrame.cpp
--- a/layout/svg/base/src/nsSVGGradientFrame.cpp
+++ b/layout/svg/base/src/nsSVGGradientFrame.cpp
@@ -123,30 +123,18 @@ nsSVGGradientFrame::GetStopInformation(P
 
     aNum->GetAnimVal(aOffset);
     if (*aOffset < 0.0f)
       *aOffset = 0.0f;
     else if (*aOffset > 1.0f)
       *aOffset = 1.0f;
   }
 
-  if (stopFrame) {
-    *aStopColor   = stopFrame->GetStyleSVGReset()->mStopColor;
-    *aStopOpacity = stopFrame->GetStyleSVGReset()->mStopOpacity;
-  }
-#ifdef DEBUG
-  // One way or another we have an implementation problem if we get here
-  else if (stopElement) {
-    NS_WARNING("We *do* have a stop but can't use it because it doesn't have "
-               "a frame - we need frame free gradients and stops!");
-  }
-  else {
-    NS_ERROR("Don't call me with an invalid stop index!");
-  }
-#endif
+  *aStopColor   = stopFrame->GetStyleSVGReset()->mStopColor;
+  *aStopOpacity = stopFrame->GetStyleSVGReset()->mStopOpacity;
 }
 
 gfxMatrix
 nsSVGGradientFrame::GetGradientTransform(nsIFrame *aSource,
                                          const gfxRect *aOverrideBounds)
 {
   gfxMatrix bboxMatrix;