Bug 1293929 - Part 1. Treat unresolvable mask in svg frame as no-mask.
MozReview-Commit-ID: IdiV5w9OrNF
--- a/layout/svg/nsSVGIntegrationUtils.cpp
+++ b/layout/svg/nsSVGIntegrationUtils.cpp
@@ -700,18 +700,17 @@ nsSVGIntegrationUtils::PaintFramesWithEf
// For a HTML doc:
// According to css-masking spec, always create a mask surface when we
// have any item in maskFrame even if all of those items are
// non-resolvable <mask-sources> or <images>, we still need to create a
// transparent black mask layer under this condition.
// For a SVG doc:
// SVG 1.1 say that if we fail to resolve a mask, we should draw the
// object unmasked.
- nsIDocument* currentDoc = frame->PresContext()->Document();
- bool shouldGenerateMaskLayer = currentDoc->IsSVGDocument()
+ bool shouldGenerateMaskLayer = hasSVGLayout
? maskFrames.Length() == 1 && maskFrames[0]
: maskFrames.Length() > 0;
// These are used if we require a temporary surface for a custom blend mode.
RefPtr<gfxContext> target = &aParams.ctx;
IntPoint targetOffset;
bool complexEffects = false;