Bug 859377 (Part 2) - Make SVGImageContext more flexible. r=dholbert
authorSeth Fowler <seth@mozilla.com>
Thu, 25 Apr 2013 15:58:27 -0700
changeset 129989 ef02b23cf07eb9bbad2677a0cec0d2e1d733a31b
parent 129988 6a20e50fd0bed51ef01ab33de97e31a232de072d
child 129990 5a913ab3d2a5a3ade8e5f9dee7b4737379f82877
push id1552
push userttaubert@mozilla.com
push dateSat, 27 Apr 2013 15:33:29 +0000
treeherderfx-team@40dafc376794 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs859377
milestone23.0a1
Bug 859377 (Part 2) - Make SVGImageContext more flexible. r=dholbert
layout/svg/SVGImageContext.h
--- a/layout/svg/SVGImageContext.h
+++ b/layout/svg/SVGImageContext.h
@@ -8,26 +8,34 @@
 
 #include "SVGPreserveAspectRatio.h"
 
 namespace mozilla {
 
 // SVG image-specific rendering context. For imgIContainer::Draw.
 // Used to pass information about overridden attributes from an SVG <image>
 // element to the image's internal SVG document when it's drawn.
-class MOZ_STACK_CLASS SVGImageContext
+class SVGImageContext
 {
 public:
   SVGImageContext(SVGPreserveAspectRatio aPreserveAspectRatio)
     : mPreserveAspectRatio(aPreserveAspectRatio)
   { }
 
   const SVGPreserveAspectRatio& GetPreserveAspectRatio() const {
     return mPreserveAspectRatio;
   }
 
+  bool operator==(const SVGImageContext& aOther) const {
+    return mPreserveAspectRatio == aOther.mPreserveAspectRatio;
+  }
+
+  bool operator!=(const SVGImageContext& aOther) const {
+    return !(*this == aOther);
+  }
+
 private:
   const SVGPreserveAspectRatio mPreserveAspectRatio;
 };
 
 } // namespace mozilla
 
 #endif // MOZILLA_SVGCONTEXT_H_