Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: Source/core/css/Pair.h

Issue 1225553002: CSSValue Immediates: Make CSSPrimitiveValue a container (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
Patch Set: Rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/css/Rect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/Pair.h
diff --git a/Source/core/css/Pair.h b/Source/core/css/Pair.h
index 4df5efec58f714f5d1a0436552a52558d82b5d55..f9f20c2d757418469c2fa8fd117b6ca9ba7b0f09 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,18 +33,18 @@ 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(CSSPrimitiveValue first, 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(); }
+ NullableCSSValue first() const { return m_first; }
+ NullableCSSValue second() const { return m_second; }
String cssText() const
{
@@ -53,15 +53,15 @@ public:
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(CSSPrimitiveValue first, 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;
+ NullableCSSValue m_first;
+ NullableCSSValue m_second;
IdenticalValuesPolicy m_identicalValuesPolicy;
};
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/css/Rect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698