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

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

Issue 1307673003: Made CSSPrimitiveValue::getString() only work for String types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@split_out_pair
Patch Set: Rebase and review feedback Created 5 years, 4 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 | « no previous file | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCounterValue.h
diff --git a/Source/core/css/CSSCounterValue.h b/Source/core/css/CSSCounterValue.h
index 154671d106935dbebf789df13c9ac6de2fabdfe7..b7eb49ffbd7d3092bc1cffe557d8d566a18f7be0 100644
--- a/Source/core/css/CSSCounterValue.h
+++ b/Source/core/css/CSSCounterValue.h
@@ -34,11 +34,11 @@ public:
return adoptRefWillBeNoop(new CSSCounterValue(identifier, listStyle, separator));
}
- String identifier() const { return m_identifier ? m_identifier->getStringValue() : String(); }
- String listStyle() const { return m_listStyle ? m_listStyle->getStringValue() : String(); }
- String separator() const { return m_separator ? m_separator->getStringValue() : String(); }
+ String identifier() const { return m_identifier->getStringValue(); }
+ String listStyle() const { return m_listStyle->cssText(); }
+ String separator() const { return m_separator->getStringValue(); }
- CSSValueID listStyleIdent() const { return m_listStyle ? m_listStyle->getValueID() : CSSValueInvalid; }
+ CSSValueID listStyleIdent() const { return m_listStyle->getValueID(); }
bool equals(const CSSCounterValue& other) const
{
@@ -56,7 +56,12 @@ private:
: CSSValue(CounterClass)
, m_identifier(identifier)
, m_listStyle(listStyle)
- , m_separator(separator) { }
+ , m_separator(separator)
+ {
+ ASSERT(m_identifier->isCustomIdent());
+ ASSERT(m_listStyle->isValueID());
+ ASSERT(m_separator->isCustomIdent());
+ }
RefPtrWillBeMember<CSSPrimitiveValue> m_identifier; // string
RefPtrWillBeMember<CSSPrimitiveValue> m_listStyle; // ident
« no previous file with comments | « no previous file | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698