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

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: Small fix 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') | Source/web/WebAXObject.cpp » ('J')
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..50bb0513596f4c8991de5fffbc75249332bb30d4 100644
--- a/Source/core/css/CSSCounterValue.h
+++ b/Source/core/css/CSSCounterValue.h
@@ -34,9 +34,9 @@ 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 getValueName(m_listStyle->getValueID()); }
Timothy Loh 2015/08/27 01:30:09 We should probably just remove this function and u
sashab 2015/08/27 06:30:16 Which function are you talking about? I updated th
Timothy Loh 2015/08/27 06:38:49 listStyle(); I think it should just be inlined int
sashab 2015/08/27 06:53:38 Oh I see. Yeah OK, I'll do this in a separate patc
+ String separator() const { return m_separator->getStringValue(); }
CSSValueID listStyleIdent() const { return m_listStyle ? m_listStyle->getValueID() : CSSValueInvalid; }
@@ -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') | Source/web/WebAXObject.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698