Bug 1298318 - Add mIsPaintingSVGImageElement to operator==() and Hash() in SVGImageContext. r=dholbert, a=ritu
authorKevin Chen <kechen@mozilla.com>
Mon, 29 Aug 2016 01:11:03 -0700
changeset 347944 3a0e91dee1c6e7326ec695ab72b1c1ea0c3fad1d
parent 347943 ca23401297492d3ccc01f237158c22582aed9f66
child 347945 822036786a92c7674231836ceeb73e2140fcdb15
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)
reviewersdholbert, ritu
bugs1298318
milestone50.0a2
Bug 1298318 - Add mIsPaintingSVGImageElement to operator==() and Hash() in SVGImageContext. r=dholbert, a=ritu MozReview-Commit-ID: Ji5tM02ykAp
layout/svg/SVGImageContext.h
--- a/layout/svg/SVGImageContext.h
+++ b/layout/svg/SVGImageContext.h
@@ -50,28 +50,30 @@ public:
 
   bool IsPaintingForSVGImageElement() const {
     return mIsPaintingSVGImageElement;
   }
 
   bool operator==(const SVGImageContext& aOther) const {
     return mViewportSize == aOther.mViewportSize &&
            mPreserveAspectRatio == aOther.mPreserveAspectRatio &&
-           mGlobalOpacity == aOther.mGlobalOpacity;
+           mGlobalOpacity == aOther.mGlobalOpacity &&
+           mIsPaintingSVGImageElement == aOther.mIsPaintingSVGImageElement;
   }
 
   bool operator!=(const SVGImageContext& aOther) const {
     return !(*this == aOther);
   }
 
   uint32_t Hash() const {
     return HashGeneric(mViewportSize.width,
                        mViewportSize.height,
                        mPreserveAspectRatio.map(HashPAR).valueOr(0),
-                       HashBytes(&mGlobalOpacity, sizeof(gfxFloat)));
+                       HashBytes(&mGlobalOpacity, sizeof(gfxFloat)),
+                       mIsPaintingSVGImageElement);
   }
 
 private:
   static uint32_t HashPAR(const SVGPreserveAspectRatio& aPAR) {
     return aPAR.Hash();
   }
 
   CSSIntSize                    mViewportSize;