Bug 1293929 - Part 1. Treat unresolvable mask in svg frame as no-mask. r=mstange a=lizzard
authorcku <cku@mozilla.com>
Wed, 10 Aug 2016 15:52:38 +0800
changeset 347645 d8937d3097cb76ac35d8ef62a421b08b6241865c
parent 347644 5783870130eeb0bea2280c84a15b0e2494edcfea
child 347646 50153501e96e8cb48d63f09c83ace1a129f3fa73
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, lizzard
bugs1293929
milestone50.0a2
Bug 1293929 - Part 1. Treat unresolvable mask in svg frame as no-mask. r=mstange a=lizzard MozReview-Commit-ID: IdiV5w9OrNF
layout/svg/nsSVGIntegrationUtils.cpp
--- 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;