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

Unified Diff: third_party/WebKit/Source/core/css/CSSCustomIdentValue.cpp

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Rebase Created 5 years, 3 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
Index: third_party/WebKit/Source/core/css/CSSCustomIdentValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSCustomIdentValue.cpp b/third_party/WebKit/Source/core/css/CSSCustomIdentValue.cpp
index e9e3cf3bdc53a5d22a32d5addb6dcf33e797b681..a1a3661c28568e2eae72eec999eae4e668f4e259 100644
--- a/third_party/WebKit/Source/core/css/CSSCustomIdentValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSCustomIdentValue.cpp
@@ -12,10 +12,22 @@ namespace blink {
CSSCustomIdentValue::CSSCustomIdentValue(const String& str)
: CSSValue(CustomIdentClass)
- , m_string(str) { }
+ , m_string(str)
+ , m_propertyId(CSSPropertyInvalid) { }
+
+CSSCustomIdentValue::CSSCustomIdentValue(CSSPropertyID id)
+ : CSSValue(CustomIdentClass)
+ , m_string()
+ , m_propertyId(id)
+{
+ ASSERT(isKnownPropertyID());
+}
+
String CSSCustomIdentValue::customCSSText() const
{
+ if (isKnownPropertyID())
+ return getPropertyNameAtomicString(m_propertyId);
return quoteCSSStringIfNeeded(m_string);
}

Powered by Google App Engine
This is Rietveld 408576698