| Index: Source/core/css/Pair.h
|
| diff --git a/Source/core/css/Pair.h b/Source/core/css/Pair.h
|
| index f9f20c2d757418469c2fa8fd117b6ca9ba7b0f09..d5569be80358e102fefad0a08579c2c9bc166c29 100644
|
| --- a/Source/core/css/Pair.h
|
| +++ b/Source/core/css/Pair.h
|
| @@ -37,31 +37,31 @@ class CORE_EXPORT Pair final : public RefCountedWillBeGarbageCollectedFinalized<
|
| public:
|
| enum IdenticalValuesPolicy { DropIdenticalValues, KeepIdenticalValues };
|
|
|
| - static PassRefPtrWillBeRawPtr<Pair> create(CSSPrimitiveValue first, CSSPrimitiveValue second,
|
| + static PassRefPtrWillBeRawPtr<Pair> create(const CSSPrimitiveValue& first, const CSSPrimitiveValue& second,
|
| IdenticalValuesPolicy identicalValuesPolicy)
|
| {
|
| return adoptRefWillBeNoop(new Pair(first, second, identicalValuesPolicy));
|
| }
|
|
|
| - NullableCSSValue first() const { return m_first; }
|
| - NullableCSSValue second() const { return m_second; }
|
| + 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 m_first == other.m_first
|
| - && m_second == other.m_second
|
| + return m_first.equals(other.m_first)
|
| + && m_second.equals(other.m_second)
|
| && m_identicalValuesPolicy == other.m_identicalValuesPolicy;
|
| }
|
|
|
| DECLARE_TRACE();
|
|
|
| private:
|
| - Pair(CSSPrimitiveValue first, 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;
|
| }
|
|
|
| - NullableCSSValue m_first;
|
| - NullableCSSValue m_second;
|
| + CSSValue m_first;
|
| + CSSValue m_second;
|
| IdenticalValuesPolicy m_identicalValuesPolicy;
|
| };
|
|
|
|
|