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

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

Issue 1303153003: Change Counter to be a CSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase & removed dependent patchsets 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 | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/CSSCounterValue.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/Counter.h b/Source/core/css/CSSCounterValue.h
similarity index 65%
rename from Source/core/css/Counter.h
rename to Source/core/css/CSSCounterValue.h
index 177fc14c539b7325ed5fc08943a28be528c08569..154671d106935dbebf789df13c9ac6de2fabdfe7 100644
--- a/Source/core/css/Counter.h
+++ b/Source/core/css/CSSCounterValue.h
@@ -18,19 +18,20 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef Counter_h
-#define Counter_h
+#ifndef CSSCounterValue_h
+#define CSSCounterValue_h
#include "core/css/CSSPrimitiveValue.h"
+#include "core/css/CSSValue.h"
#include "wtf/text/WTFString.h"
namespace blink {
-class Counter : public RefCountedWillBeGarbageCollected<Counter> {
+class CSSCounterValue : public CSSValue {
public:
- static PassRefPtrWillBeRawPtr<Counter> create(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> identifier, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> separator)
+ static PassRefPtrWillBeRawPtr<CSSCounterValue> create(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> identifier, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> separator)
{
- return adoptRefWillBeNoop(new Counter(identifier, listStyle, separator));
+ return adoptRefWillBeNoop(new CSSCounterValue(identifier, listStyle, separator));
}
String identifier() const { return m_identifier ? m_identifier->getStringValue() : String(); }
@@ -39,22 +40,21 @@ public:
CSSValueID listStyleIdent() const { return m_listStyle ? m_listStyle->getValueID() : CSSValueInvalid; }
- void setIdentifier(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> identifier) { m_identifier = identifier; }
- void setListStyle(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle) { m_listStyle = listStyle; }
- void setSeparator(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> separator) { m_separator = separator; }
-
- bool equals(const Counter& other) const
+ bool equals(const CSSCounterValue& other) const
{
return identifier() == other.identifier()
&& listStyle() == other.listStyle()
&& separator() == other.separator();
}
- DECLARE_TRACE();
+ String customCSSText() const;
+
+ DECLARE_TRACE_AFTER_DISPATCH();
private:
- Counter(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> identifier, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> separator)
- : m_identifier(identifier)
+ CSSCounterValue(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> identifier, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> separator)
+ : CSSValue(CounterClass)
+ , m_identifier(identifier)
, m_listStyle(listStyle)
, m_separator(separator) { }
@@ -63,6 +63,8 @@ private:
RefPtrWillBeMember<CSSPrimitiveValue> m_separator; // string
};
+DEFINE_CSS_VALUE_TYPE_CASTS(CSSCounterValue, isCounterValue());
+
} // namespace blink
-#endif // Counter_h
+#endif // CSSCounterValue_h
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/CSSCounterValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698