| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "core/CoreExport.h" | 24 #include "core/CoreExport.h" |
| 25 #include "core/css/CSSValue.h" | 25 #include "core/css/CSSValue.h" |
| 26 #include "wtf/RefPtr.h" | 26 #include "wtf/RefPtr.h" |
| 27 #include "wtf/text/StringBuilder.h" | 27 #include "wtf/text/StringBuilder.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollectedFinalized<Re
ctBase> { | 31 class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollectedFinalized<Re
ctBase> { |
| 32 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase); | 32 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase); |
| 33 public: | 33 public: |
| 34 CSSPrimitiveValue top() const { return toCSSPrimitiveValue(*m_top); } | 34 const CSSPrimitiveValue& top() const { return toCSSPrimitiveValue(*m_top); } |
| 35 CSSPrimitiveValue right() const { return toCSSPrimitiveValue(*m_right); } | 35 const CSSPrimitiveValue& right() const { return toCSSPrimitiveValue(*m_right
); } |
| 36 CSSPrimitiveValue bottom() const { return toCSSPrimitiveValue(*m_bottom); } | 36 const CSSPrimitiveValue& bottom() const { return toCSSPrimitiveValue(*m_bott
om); } |
| 37 CSSPrimitiveValue left() const { return toCSSPrimitiveValue(*m_left); } | 37 const CSSPrimitiveValue& left() const { return toCSSPrimitiveValue(*m_left);
} |
| 38 | 38 |
| 39 void setTop(CSSPrimitiveValue top) { m_top = top; } | 39 void setTop(const CSSPrimitiveValue& top) { m_top = top; } |
| 40 void setRight(CSSPrimitiveValue right) { m_right = right; } | 40 void setRight(const CSSPrimitiveValue& right) { m_right = right; } |
| 41 void setBottom(CSSPrimitiveValue bottom) { m_bottom = bottom; } | 41 void setBottom(const CSSPrimitiveValue& bottom) { m_bottom = bottom; } |
| 42 void setLeft(CSSPrimitiveValue left) { m_left = left; } | 42 void setLeft(const CSSPrimitiveValue& left) { m_left = left; } |
| 43 | 43 |
| 44 bool equals(const RectBase& other) const | 44 bool equals(const RectBase& other) const |
| 45 { | 45 { |
| 46 return m_top == other.m_top | 46 return m_top == other.m_top |
| 47 && m_right == other.m_right | 47 && m_right == other.m_right |
| 48 && m_left == other.m_left | 48 && m_left == other.m_left |
| 49 && m_bottom == other.m_bottom; | 49 && m_bottom == other.m_bottom; |
| 50 } | 50 } |
| 51 | 51 |
| 52 DECLARE_TRACE(); | 52 DECLARE_TRACE(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 // NOTE: If adding fields to this class please make the RectBase trace | 117 // NOTE: If adding fields to this class please make the RectBase trace |
| 118 // method virtual and add a trace method in this subclass tracing the new | 118 // method virtual and add a trace method in this subclass tracing the new |
| 119 // fields. | 119 // fields. |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace blink | 122 } // namespace blink |
| 123 | 123 |
| 124 #endif // Rect_h | 124 #endif // Rect_h |
| OLD | NEW |