Backout bug 472135 due to Linux test failure

This commit is contained in:
Robert O'Callahan
2009-01-17 23:59:37 +13:00
3 changed files with 23 additions and 44 deletions

View File

@@ -149,8 +149,6 @@
#endif #endif
#ifdef MOZ_SVG #ifdef MOZ_SVG
#include "nsSVGEffects.h" #include "nsSVGEffects.h"
#include "nsSVGUtils.h"
#include "nsSVGOuterSVGFrame.h"
#endif #endif
nsIFrame* nsIFrame*
@@ -9470,22 +9468,11 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
UpdateViewsForTree(aFrame, aViewManager, aFrameManager, aChange); UpdateViewsForTree(aFrame, aViewManager, aFrameManager, aChange);
// if frame has view, will already be invalidated // if frame has view, will already be invalidated
if (aChange & nsChangeHint_RepaintFrame) { if ((aChange & nsChangeHint_RepaintFrame) &&
if (aFrame->IsFrameOfType(nsIFrame::eSVG)) { !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()); aFrame->Invalidate(aFrame->GetOverflowRect());
} }
} }
}
} }
static void static void

View File

@@ -844,14 +844,6 @@ nsChangeHint nsStyleSVG::CalcDifference(const nsStyleSVG& aOther) const
NS_UpdateHint(hint, nsChangeHint_ReflowFrame); 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 || if (mFill != aOther.mFill ||
mStroke != aOther.mStroke) { mStroke != aOther.mStroke) {
NS_UpdateHint(hint, nsChangeHint_RepaintFrame); NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
@@ -863,7 +855,11 @@ nsChangeHint nsStyleSVG::CalcDifference(const nsStyleSVG& aOther) const
return hint; 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 || mStrokeWidth != aOther.mStrokeWidth ||
mFillOpacity != aOther.mFillOpacity || mFillOpacity != aOther.mFillOpacity ||

View File

@@ -221,14 +221,17 @@ nsSVGMarkerProperty::DoUpdate()
if (!mFrame) if (!mFrame)
return; return;
NS_ASSERTION(mFrame->IsFrameOfType(nsIFrame::eSVG), "SVG frame expected"); if (mFrame->IsFrameOfType(nsIFrame::eSVG)) {
if (!(mFrame->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
// Repaint asynchronously nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
nsChangeHint changeHint = if (outerSVGFrame) {
nsChangeHint(nsChangeHint_RepaintFrame | nsChangeHint_UpdateEffects); // marker changes can change the covered region
outerSVGFrame->UpdateAndInvalidateCoveredRegion(mFrame);
mFramePresShell->FrameConstructor()->PostRestyleEvent( }
mFrame->GetContent(), nsReStyleHint(0), changeHint); }
} else {
InvalidateAllContinuations(mFrame);
}
} }
void void
@@ -365,17 +368,10 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
// Ensure that the filter is repainted correctly // Ensure that the filter is repainted correctly
// We can't do that in DoUpdate as the referenced frame may not be valid // We can't do that in DoUpdate as the referenced frame may not be valid
GetEffectProperty(aFrame->GetStyleSVGReset()->mFilter, const nsStyleSVGReset *style = aFrame->GetStyleSVGReset();
aFrame, nsGkAtoms::filter, CreateFilterProperty); if (style->mFilter) {
GetEffectProperty(style->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);
} }
nsSVGFilterProperty * nsSVGFilterProperty *