| Index: Source/core/css/Pair.h
|
| diff --git a/Source/core/css/Pair.h b/Source/core/css/Pair.h
|
| index 4df5efec58f714f5d1a0436552a52558d82b5d55..f552cde11b89644aa0c971bc7ca376db19acffe8 100644
|
| --- a/Source/core/css/Pair.h
|
| +++ b/Source/core/css/Pair.h
|
| @@ -22,7 +22,7 @@
|
| #define Pair_h
|
|
|
| #include "core/CoreExport.h"
|
| -#include "core/css/CSSPrimitiveValue.h"
|
| +#include "core/css/CSSValue.h"
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/text/StringBuilder.h"
|
| @@ -33,35 +33,35 @@ namespace blink {
|
| // and border-spacing (all of which are space-separated sets of two values). At the moment we are only using it for
|
| // border-radius and background-size, but (FIXME) border-spacing and background-position could be converted over to use
|
| // it (eliminating some extra -webkit- internal properties).
|
| -class CORE_EXPORT Pair final : public RefCountedWillBeGarbageCollected<Pair> {
|
| +class CORE_EXPORT Pair final : public RefCountedWillBeGarbageCollectedFinalized<Pair> {
|
| public:
|
| enum IdenticalValuesPolicy { DropIdenticalValues, KeepIdenticalValues };
|
|
|
| - static PassRefPtrWillBeRawPtr<Pair> create(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> first, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> second,
|
| + static PassRefPtrWillBeRawPtr<Pair> create(const CSSPrimitiveValue& first, const CSSPrimitiveValue& second,
|
| IdenticalValuesPolicy identicalValuesPolicy)
|
| {
|
| return adoptRefWillBeNoop(new Pair(first, second, identicalValuesPolicy));
|
| }
|
|
|
| - CSSPrimitiveValue* first() const { return m_first.get(); }
|
| - CSSPrimitiveValue* second() const { return m_second.get(); }
|
| + const CSSPrimitiveValue& first() const { return toCSSPrimitiveValue(m_first); }
|
| + const CSSPrimitiveValue& second() const { return toCSSPrimitiveValue(m_second); }
|
|
|
| String cssText() const
|
| {
|
| - return generateCSSString(first()->cssText(), second()->cssText(), m_identicalValuesPolicy);
|
| + return generateCSSString(first().cssText(), second().cssText(), m_identicalValuesPolicy);
|
| }
|
|
|
| bool equals(const Pair& other) const
|
| {
|
| - return compareCSSValuePtr(m_first, other.m_first)
|
| - && compareCSSValuePtr(m_second, other.m_second)
|
| + return m_first == other.m_first
|
| + && m_second == other.m_second
|
| && m_identicalValuesPolicy == other.m_identicalValuesPolicy;
|
| }
|
|
|
| DECLARE_TRACE();
|
|
|
| private:
|
| - Pair(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> first, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy)
|
| + Pair(const CSSPrimitiveValue& first, const CSSPrimitiveValue& second, IdenticalValuesPolicy identicalValuesPolicy)
|
| : m_first(first)
|
| , m_second(second)
|
| , m_identicalValuesPolicy(identicalValuesPolicy) { }
|
| @@ -73,8 +73,8 @@ private:
|
| return first + ' ' + second;
|
| }
|
|
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_first;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_second;
|
| + CSSValue m_first;
|
| + CSSValue m_second;
|
| IdenticalValuesPolicy m_identicalValuesPolicy;
|
| };
|
|
|
|
|