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
#ifdef MOZ_SVG
#include "nsSVGEffects.h"
#include "nsSVGUtils.h"
#include "nsSVGOuterSVGFrame.h"
#endif
nsIFrame*
@@ -9470,23 +9468,12 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
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 {
if ((aChange & nsChangeHint_RepaintFrame) &&
!aFrame->IsFrameOfType(nsIFrame::eSVG)) {
aFrame->Invalidate(aFrame->GetOverflowRect());
}
}
}
}
static void
ApplyRenderingChangeToTree(nsPresContext* aPresContext,

View File

@@ -844,14 +844,6 @@ nsChangeHint nsStyleSVG::CalcDifference(const nsStyleSVG& aOther) const
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);
@@ -863,7 +855,11 @@ nsChangeHint nsStyleSVG::CalcDifference(const nsStyleSVG& aOther) const
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 ||

View File

@@ -221,14 +221,17 @@ nsSVGMarkerProperty::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
@@ -365,17 +368,10 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
// 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 *