Backout bug 472135 due to Linux test failure
authorRobert O'Callahan <robert@ocallahan.org>
Sat, 17 Jan 2009 23:59:37 +1300
changeset 23865 5d383a2924988d14dde276a881345150d191573c
parent 23863 361a930d2c4bc73deafce3652e31ad1421217c9c (current diff)
parent 23864 87a549e52a9a14c1db740aec4479c028ee03d489 (diff)
child 23866 184eadf4e185335241577a1774ffae4c8e39e4d2
push id4761
push userrocallahan@mozilla.com
push dateSat, 17 Jan 2009 10:59:52 +0000
treeherdermozilla-central@5d383a292498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs472135
milestone1.9.2a1pre
Backout bug 472135 due to Linux test failure
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -144,18 +144,16 @@
 
 #undef NOISY_FIRST_LETTER
 
 #ifdef MOZ_MATHML
 #include "nsMathMLParts.h"
 #endif
 #ifdef MOZ_SVG
 #include "nsSVGEffects.h"
-#include "nsSVGUtils.h"
-#include "nsSVGOuterSVGFrame.h"
 #endif
 
 nsIFrame*
 NS_NewHTMLCanvasFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 #if defined(MOZ_MEDIA)
 nsIFrame*
 NS_NewHTMLVideoFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
@@ -9465,30 +9463,19 @@ DoApplyRenderingChangeToTree(nsIFrame* a
   for ( ; aFrame; aFrame = nsLayoutUtils::GetNextContinuationOrSpecialSibling(aFrame)) {
     // Get view if this frame has one and trigger an update. If the
     // frame doesn't have a view, find the nearest containing view
     // (adjusting r's coordinate system to reflect the nesting) and
     // update there.
     UpdateViewsForTree(aFrame, aViewManager, aFrameManager, aChange);
 
     // if frame has view, will already be invalidated
-    if (aChange & nsChangeHint_RepaintFrame) {
-      if (aFrame->IsFrameOfType(nsIFrame::eSVG)) {
-#ifdef MOZ_SVG
-        if (!(aFrame->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
-          nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(aFrame);
-          if (outerSVGFrame) {
-            // marker changes can change the covered region
-            outerSVGFrame->UpdateAndInvalidateCoveredRegion(aFrame);
-          }
-        }
-#endif
-      } else {
-        aFrame->Invalidate(aFrame->GetOverflowRect());
-      }
+    if ((aChange & nsChangeHint_RepaintFrame) &&
+        !aFrame->IsFrameOfType(nsIFrame::eSVG)) {
+      aFrame->Invalidate(aFrame->GetOverflowRect());
     }
   }
 }
 
 static void
 ApplyRenderingChangeToTree(nsPresContext* aPresContext,
                            nsIFrame* aFrame,
                            nsChangeHint aChange)
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -839,36 +839,32 @@ nsChangeHint nsStyleSVG::CalcDifference(
   nsChangeHint hint = nsChangeHint(0);
 
   if (mTextRendering != aOther.mTextRendering) {
     NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
     // May be needed for non-svg frames
     NS_UpdateHint(hint, nsChangeHint_ReflowFrame);
   }
 
-  if (!EqualURIs(mMarkerEnd, aOther.mMarkerEnd) ||
-      !EqualURIs(mMarkerMid, aOther.mMarkerMid) ||
-      !EqualURIs(mMarkerStart, aOther.mMarkerStart)) {
-    NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
-    NS_UpdateHint(hint, nsChangeHint_UpdateEffects);
-    return hint;
-  }
-
   if (mFill != aOther.mFill ||
       mStroke != aOther.mStroke) {
     NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
     if (PaintURIChanged(mFill, aOther.mFill) ||
         PaintURIChanged(mStroke, aOther.mStroke)) {
       NS_UpdateHint(hint, nsChangeHint_UpdateEffects);
     }
     // Nothing more to do, below we can only set "repaint"
     return hint;
   }
 
-  if ( mStrokeDashoffset      != aOther.mStrokeDashoffset      ||
+  if ( !EqualURIs(mMarkerEnd, aOther.mMarkerEnd)               ||
+       !EqualURIs(mMarkerMid, aOther.mMarkerMid)               ||
+       !EqualURIs(mMarkerStart, aOther.mMarkerStart)           ||
+
+       mStrokeDashoffset      != aOther.mStrokeDashoffset      ||
        mStrokeWidth           != aOther.mStrokeWidth           ||
 
        mFillOpacity           != aOther.mFillOpacity           ||
        mStrokeMiterlimit      != aOther.mStrokeMiterlimit      ||
        mStrokeOpacity         != aOther.mStrokeOpacity         ||
 
        mClipRule              != aOther.mClipRule              ||
        mColorInterpolation    != aOther.mColorInterpolation    ||
--- a/layout/svg/base/src/nsSVGEffects.cpp
+++ b/layout/svg/base/src/nsSVGEffects.cpp
@@ -216,24 +216,27 @@ nsSVGFilterProperty::DoUpdate()
 
 void
 nsSVGMarkerProperty::DoUpdate()
 {
   nsSVGRenderingObserver::DoUpdate();
   if (!mFrame)
     return;
 
-  NS_ASSERTION(mFrame->IsFrameOfType(nsIFrame::eSVG), "SVG frame expected");
-
-  // Repaint asynchronously
-  nsChangeHint changeHint =
-    nsChangeHint(nsChangeHint_RepaintFrame | nsChangeHint_UpdateEffects);
-
-  mFramePresShell->FrameConstructor()->PostRestyleEvent(
-    mFrame->GetContent(), nsReStyleHint(0), changeHint);
+  if (mFrame->IsFrameOfType(nsIFrame::eSVG)) {
+    if (!(mFrame->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
+      nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
+      if (outerSVGFrame) {
+        // marker changes can change the covered region
+        outerSVGFrame->UpdateAndInvalidateCoveredRegion(mFrame);
+      }
+    }
+  } else {
+    InvalidateAllContinuations(mFrame);
+  }
 }
 
 void
 nsSVGTextPathProperty::DoUpdate()
 {
   nsSVGRenderingObserver::DoUpdate();
   if (!mFrame)
     return;
@@ -360,27 +363,20 @@ nsSVGEffects::UpdateEffects(nsIFrame *aF
   aFrame->DeleteProperty(nsGkAtoms::marker_mid);
   aFrame->DeleteProperty(nsGkAtoms::marker_end);
 
   aFrame->DeleteProperty(nsGkAtoms::stroke);
   aFrame->DeleteProperty(nsGkAtoms::fill);
 
   // Ensure that the filter is repainted correctly
   // We can't do that in DoUpdate as the referenced frame may not be valid
-  GetEffectProperty(aFrame->GetStyleSVGReset()->mFilter,
-                    aFrame, nsGkAtoms::filter, CreateFilterProperty);
-
-  // Set marker properties here to avoid reference loops
-  const nsStyleSVG *style = aFrame->GetStyleSVG();
-  GetEffectProperty(style->mMarkerStart, aFrame, nsGkAtoms::marker_start,
-                    CreateMarkerProperty);
-  GetEffectProperty(style->mMarkerMid, aFrame, nsGkAtoms::marker_mid,
-                    CreateMarkerProperty);
-  GetEffectProperty(style->mMarkerEnd, aFrame, nsGkAtoms::marker_end,
-                    CreateMarkerProperty);
+  const nsStyleSVGReset *style = aFrame->GetStyleSVGReset();
+  if (style->mFilter) {
+    GetEffectProperty(style->mFilter, aFrame, nsGkAtoms::filter, CreateFilterProperty);
+  }
 }
 
 nsSVGFilterProperty *
 nsSVGEffects::GetFilterProperty(nsIFrame *aFrame)
 {
   NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame should be first continuation");
 
   if (!aFrame->GetStyleSVGReset()->mFilter)