Bug 626602, part 7: Copy the impl of < and <= from nsIntSize to gfxIntSize. Sigh. sr=roc
authorChris Jones <jones.chris.g@gmail.com>
Wed, 16 Feb 2011 16:43:31 -0600
changeset 62703 e3a73d79b6cdaeca36ece3d3a02513058228843d
parent 62702 1a257991dd13409e81727746e8a8be3ca3f121ec
child 62704 53aad08fcb3b7b3dad86c8b2f5ed9fc74c42f669
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersroc
bugs626602
milestone2.0b12pre
Bug 626602, part 7: Copy the impl of < and <= from nsIntSize to gfxIntSize. Sigh. sr=roc
gfx/thebes/gfxPoint.h
--- a/gfx/thebes/gfxPoint.h
+++ b/gfx/thebes/gfxPoint.h
@@ -55,16 +55,23 @@ struct THEBES_API gfxIntSize {
     void SizeTo(PRInt32 _width, PRInt32 _height) {width = _width; height = _height;}
 
     int operator==(const gfxIntSize& s) const {
         return ((width == s.width) && (height == s.height));
     }
     int operator!=(const gfxIntSize& s) const {
         return ((width != s.width) || (height != s.height));
     }
+    bool operator<(const gfxIntSize& s) const {
+        return (operator<=(s) &&
+                (width < s.width || height < s.height));
+    }
+    bool operator<=(const gfxIntSize& s) const {
+        return (width <= s.width) && (height <= s.height);
+    }
     gfxIntSize operator+(const gfxIntSize& s) const {
         return gfxIntSize(width + s.width, height + s.height);
     }
     gfxIntSize operator-() const {
         return gfxIntSize(- width, - height);
     }
     gfxIntSize operator-(const gfxIntSize& s) const {
         return gfxIntSize(width - s.width, height - s.height);