Bug 874865 - Stop nsSVGOuterSVGFrame::AttributeChanged from calling ChildrenOnlyTransformChanged for transform attribute changes. r=longsonr

This commit is contained in:
Jonathan Watt 2013-05-23 08:04:21 +01:00
parent b34211cc84
commit 481319b784
2 changed files with 13 additions and 1 deletions

View File

@ -134,6 +134,16 @@ SVGTransformableElement::SetAnimateMotionTransform(const gfxMatrix* aMatrix)
}
mAnimateMotionTransform = aMatrix ? new gfxMatrix(*aMatrix) : nullptr;
DidAnimateTransformList();
nsIFrame* frame = GetPrimaryFrame();
if (frame) {
// If the result of this transform and any other transforms on this frame
// is the identity matrix, then DoApplyRenderingChangeToTree won't handle
// our nsChangeHint_UpdateTransformLayer hint since aFrame->IsTransformed()
// will return false. That's fine, but we still need to schedule a repaint,
// and that won't otherwise happen. Since it's cheap to call SchedulePaint,
// we don't bother to check IsTransformed().
frame->SchedulePaint();
}
}
nsSVGAnimatedTransformList*

View File

@ -667,7 +667,9 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID,
aAttribute == nsGkAtoms::viewBox ?
TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED : TRANSFORM_CHANGED);
static_cast<SVGSVGElement*>(mContent)->ChildrenOnlyTransformChanged();
if (aAttribute != nsGkAtoms::transform) {
static_cast<SVGSVGElement*>(mContent)->ChildrenOnlyTransformChanged();
}
} else if (aAttribute == nsGkAtoms::width ||
aAttribute == nsGkAtoms::height) {