Bug 1345052 - Remove EffectProperties::MightHaveNoneSVGMask. draft
authorcku <cku@mozilla.com>
Tue, 07 Mar 2017 17:01:31 +0800
changeset 494562 556205d70734aa23110e0f393d929332c0865e8a
parent 494263 b7e42143bbbc9dc3e5c05bd1e93b6485ce1d0ad4
child 548126 8d4d61bb37df6b8f868d2aa1442d2f67449068d9
push id48058
push userbmo:cku@mozilla.com
push dateTue, 07 Mar 2017 09:33:53 +0000
bugs1345052
milestone55.0a1
Bug 1345052 - Remove EffectProperties::MightHaveNoneSVGMask. MozReview-Commit-ID: 3WFAjwhBkDp
layout/svg/nsSVGEffects.cpp
layout/svg/nsSVGEffects.h
--- a/layout/svg/nsSVGEffects.cpp
+++ b/layout/svg/nsSVGEffects.cpp
@@ -668,34 +668,16 @@ nsSVGEffects::EffectProperties::GetMaskF
 
 bool
 nsSVGEffects::EffectProperties::HasNoOrValidEffects()
 {
   return HasNoOrValidClipPath() && HasNoOrValidMask() && HasNoOrValidFilter();
 }
 
 bool
-nsSVGEffects::EffectProperties::MightHaveNoneSVGMask() const
-{
-  if (!mMask) {
-    return false;
-  }
-
-  const nsTArray<RefPtr<nsSVGPaintingProperty>>& props = mMask->GetProps();
-  for (size_t i = 0; i < props.Length(); i++) {
-    if (!props[i] ||
-        !props[i]->GetReferencedFrame(nsGkAtoms::svgMaskFrame, nullptr)) {
-      return true;
-    }
-  }
-
-  return false;
-}
-
-bool
 nsSVGEffects::EffectProperties::HasNoOrValidClipPath()
 {
   if (mClipPath) {
     bool ok = true;
     nsSVGClipPathFrame *frame = static_cast<nsSVGClipPathFrame *>
       (mClipPath->GetReferencedFrame(nsGkAtoms::svgClipPathFrame, &ok));
     if (!ok || (frame && !frame->IsValid())) {
       return false;
--- a/layout/svg/nsSVGEffects.h
+++ b/layout/svg/nsSVGEffects.h
@@ -478,18 +478,16 @@ public:
      */
     nsSVGClipPathFrame* GetClipPathFrame();
 
     /**
      * @return an array which contains all SVG mask frames.
      */
     nsTArray<nsSVGMaskFrame*> GetMaskFrames();
 
-    bool MightHaveNoneSVGMask() const;
-
     /*
      * @return true if all effects we have are valid or we have no effect
      * at all.
      */
     bool HasNoOrValidEffects();
 
     /*
      * @return true if we have any invalid effect.