Issue #2355 - Apply self-transforms to the frame of top level <svg>

We previously didn't do this because we relied on our anonymous wrapper
to perform transforms. However, that resulted in only the children
transforming, and the frame's cliprect wouldn't be updated,
giving the impression of the z-ordering being wrong.

Also adds reftests from the relevant BZ bug found later.

Resolves #2355
This commit is contained in:
Moonchild 2023-10-22 09:33:22 +02:00 committed by roytam1
commit 0bcaa2ff90
9 changed files with 100 additions and 15 deletions

View file

@ -101,13 +101,9 @@ public:
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
}
virtual bool IsSVGTransformed(Matrix *aOwnTransform,
Matrix *aFromParentTransform) const override {
// Our anonymous wrapper performs the transforms. We simply
// return whether we are transformed here but don't apply the transforms
// themselves.
return PrincipalChildList().FirstChild()->IsSVGTransformed();
}
// Applies only to our own frame, see implementation note.
bool IsSVGTransformed(Matrix* aOwnTransform,
Matrix* aFromParentTransform) const override;
// nsISVGSVGFrame interface:
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;