Skip to content
Snippets Groups Projects
Commit 2306e954 authored by Robert Longson's avatar Robert Longson
Browse files

Bug 1825756 - Minor improvements to SVGClipPathFrame::ApplyClipPath r=emilio

parent ea211eda
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,9 @@ NS_IMPL_FRAMEARENA_HELPERS(SVGClipPathFrame)
void SVGClipPathFrame::ApplyClipPath(gfxContext& aContext,
nsIFrame* aClippedFrame,
const gfxMatrix& aMatrix) {
MOZ_ASSERT(IsTrivial(), "Caller needs to use GetClipMask");
ISVGDisplayableFrame* singleClipPathChild = nullptr;
DebugOnly<bool> trivial = IsTrivial(&singleClipPathChild);
MOZ_ASSERT(trivial, "Caller needs to use GetClipMask");
const DrawTarget* drawTarget = aContext.GetDrawTarget();
......@@ -47,13 +49,10 @@ void SVGClipPathFrame::ApplyClipPath(gfxContext& aContext,
// don't reference another clip path.
// Restore current transform after applying clip path:
gfxContextMatrixAutoSaveRestore autoRestore(&aContext);
gfxContextMatrixAutoSaveRestore autoRestoreTransform(&aContext);
RefPtr<Path> clipPath;
ISVGDisplayableFrame* singleClipPathChild = nullptr;
IsTrivial(&singleClipPathChild);
if (singleClipPathChild) {
SVGGeometryFrame* pathFrame = do_QueryFrame(singleClipPathChild);
if (pathFrame && pathFrame->StyleVisibility()->IsVisible()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment