mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
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:
parent
bb656856b6
commit
0bcaa2ff90
9 changed files with 100 additions and 15 deletions
|
|
@ -721,6 +721,32 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
nsSVGOuterSVGFrame::IsSVGTransformed(Matrix* aOwnTransform,
|
||||
Matrix* aFromParentTransform) const
|
||||
{
|
||||
// The HasChildrenOnlyTransform() implementation of our anonymous child makes sure
|
||||
// our transforms are applied to our children as-appropriate. So, we only care
|
||||
// about self-transforms on our own frame, here.
|
||||
|
||||
bool hasTransform = false;
|
||||
|
||||
SVGSVGElement* content = static_cast<SVGSVGElement*>(mContent);
|
||||
nsSVGAnimatedTransformList* animatedTransformList = content->GetAnimatedTransformList();
|
||||
if ((animatedTransformList && animatedTransformList->HasTransform()) ||
|
||||
content->GetAnimateMotionTransform()) {
|
||||
if (aOwnTransform) {
|
||||
// Apply transform
|
||||
*aOwnTransform = gfx::ToMatrix(
|
||||
content->PrependLocalTransformsTo(
|
||||
gfxMatrix(), eUserSpaceToParent));
|
||||
}
|
||||
hasTransform = true;
|
||||
}
|
||||
|
||||
return hasTransform;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// painting
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue