зеркало из https://github.com/mozilla/gecko-dev.git
Bug 771042, part 1 - Fix invalidation of animateMotion. r=birtles.
This commit is contained in:
Родитель
bfff055672
Коммит
05947e196b
|
@ -154,6 +154,7 @@ public:
|
|||
// Only visible for nsSVGGraphicElement, so it's a no-op here, and that
|
||||
// subclass has the useful implementation.
|
||||
virtual void SetAnimateMotionTransform(const gfxMatrix* aMatrix) {/*no-op*/}
|
||||
virtual const gfxMatrix* GetAnimateMotionTransform() const { return nsnull; }
|
||||
|
||||
bool IsStringAnimatable(PRUint8 aAttrEnum) {
|
||||
return GetStringInfo().mStringInfo[aAttrEnum].mIsAnimatable;
|
||||
|
|
|
@ -152,7 +152,8 @@ nsSVGGraphicElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
|||
{
|
||||
nsChangeHint retval =
|
||||
nsSVGGraphicElementBase::GetAttributeChangeHint(aAttribute, aModType);
|
||||
if (aAttribute == nsGkAtoms::transform) {
|
||||
if (aAttribute == nsGkAtoms::transform ||
|
||||
aAttribute == nsGkAtoms::mozAnimateMotionDummyAttr) {
|
||||
// We add nsChangeHint_UpdateOverflow so that nsFrame::UpdateOverflow()
|
||||
// will be called on us and our ancestors.
|
||||
nsIFrame* frame =
|
||||
|
@ -226,6 +227,12 @@ nsSVGGraphicElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix,
|
|||
return result;
|
||||
}
|
||||
|
||||
const gfxMatrix*
|
||||
nsSVGGraphicElement::GetAnimateMotionTransform() const
|
||||
{
|
||||
return mAnimateMotionTransform.get();
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGGraphicElement::SetAnimateMotionTransform(const gfxMatrix* aMatrix)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
|
||||
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix,
|
||||
TransformTypes aWhich = eAllTransforms) const;
|
||||
virtual const gfxMatrix* GetAnimateMotionTransform() const;
|
||||
virtual void SetAnimateMotionTransform(const gfxMatrix* aMatrix);
|
||||
|
||||
virtual mozilla::SVGAnimatedTransformList* GetAnimatedTransformList();
|
||||
|
|
|
@ -163,7 +163,8 @@ nsSVGDisplayContainerFrame::IsSVGTransformed(gfxMatrix *aOwnTransform,
|
|||
|
||||
nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
|
||||
const SVGAnimatedTransformList *list = content->GetAnimatedTransformList();
|
||||
if (list && !list->GetAnimValue().IsEmpty()) {
|
||||
if ((list && !list->GetAnimValue().IsEmpty()) ||
|
||||
content->GetAnimateMotionTransform()) {
|
||||
if (aOwnTransform) {
|
||||
*aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
|
||||
nsSVGElement::eUserSpaceToParent);
|
||||
|
|
|
@ -93,7 +93,8 @@ nsSVGPathGeometryFrame::IsSVGTransformed(gfxMatrix *aOwnTransform,
|
|||
|
||||
nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
|
||||
const SVGAnimatedTransformList *list = content->GetAnimatedTransformList();
|
||||
if (list && !list->GetAnimValue().IsEmpty()) {
|
||||
if ((list && !list->GetAnimValue().IsEmpty()) ||
|
||||
content->GetAnimateMotionTransform()) {
|
||||
if (aOwnTransform) {
|
||||
*aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
|
||||
nsSVGElement::eUserSpaceToParent);
|
||||
|
|
Загрузка…
Ссылка в новой задаче