| Index: Source/core/css/Rect.h
|
| diff --git a/Source/core/css/Rect.h b/Source/core/css/Rect.h
|
| index d8190b1293709b31c36dd945e73712e1f670b8fe..d4f14599ed1f70a481c544297e678aa7fb4bd5d0 100644
|
| --- a/Source/core/css/Rect.h
|
| +++ b/Source/core/css/Rect.h
|
| @@ -22,31 +22,31 @@
|
| #define Rect_h
|
|
|
| #include "core/CoreExport.h"
|
| -#include "core/css/CSSPrimitiveValue.h"
|
| +#include "core/css/CSSValue.h"
|
| #include "wtf/RefPtr.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| namespace blink {
|
|
|
| -class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollected<RectBase> {
|
| +class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollectedFinalized<RectBase> {
|
| DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase);
|
| public:
|
| - CSSPrimitiveValue* top() const { return m_top.get(); }
|
| - CSSPrimitiveValue* right() const { return m_right.get(); }
|
| - CSSPrimitiveValue* bottom() const { return m_bottom.get(); }
|
| - CSSPrimitiveValue* left() const { return m_left.get(); }
|
| + CSSPrimitiveValue top() const { return toCSSPrimitiveValue(m_top); }
|
| + CSSPrimitiveValue right() const { return toCSSPrimitiveValue(m_right); }
|
| + CSSPrimitiveValue bottom() const { return toCSSPrimitiveValue(m_bottom); }
|
| + CSSPrimitiveValue left() const { return toCSSPrimitiveValue(m_left); }
|
|
|
| - void setTop(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> top) { m_top = top; }
|
| - void setRight(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> right) { m_right = right; }
|
| - void setBottom(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; }
|
| - void setLeft(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> left) { m_left = left; }
|
| + void setTop(CSSPrimitiveValue top) { m_top = top; }
|
| + void setRight(CSSPrimitiveValue right) { m_right = right; }
|
| + void setBottom(CSSPrimitiveValue bottom) { m_bottom = bottom; }
|
| + void setLeft(CSSPrimitiveValue left) { m_left = left; }
|
|
|
| bool equals(const RectBase& other) const
|
| {
|
| - return compareCSSValuePtr(m_top, other.m_top)
|
| - && compareCSSValuePtr(m_right, other.m_right)
|
| - && compareCSSValuePtr(m_left, other.m_left)
|
| - && compareCSSValuePtr(m_bottom, other.m_bottom);
|
| + return m_top == other.m_top
|
| + && m_right == other.m_right
|
| + && m_left == other.m_left
|
| + && m_bottom == other.m_bottom;
|
| }
|
|
|
| DECLARE_TRACE();
|
| @@ -55,10 +55,10 @@ protected:
|
| RectBase() { }
|
|
|
| private:
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_top;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_right;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_bottom;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_left;
|
| + NullableCSSValue m_top;
|
| + NullableCSSValue m_right;
|
| + NullableCSSValue m_bottom;
|
| + NullableCSSValue m_left;
|
| };
|
|
|
| class Rect : public RectBase {
|
| @@ -67,7 +67,7 @@ public:
|
|
|
| String cssText() const
|
| {
|
| - return generateCSSString(top()->cssText(), right()->cssText(), bottom()->cssText(), left()->cssText());
|
| + return generateCSSString(top().cssText(), right().cssText(), bottom().cssText(), left().cssText());
|
| }
|
|
|
| private:
|
| @@ -88,7 +88,7 @@ public:
|
|
|
| String cssText() const
|
| {
|
| - return generateCSSString(top()->cssText(), right()->cssText(), bottom()->cssText(), left()->cssText());
|
| + return generateCSSString(top().cssText(), right().cssText(), bottom().cssText(), left().cssText());
|
| }
|
|
|
| private:
|
|
|