Index: Source/core/css/parser/CSSToken.cpp |
diff --git a/Source/platform/PlatformThreadData.cpp b/Source/core/css/parser/CSSToken.cpp |
similarity index 65% |
copy from Source/platform/PlatformThreadData.cpp |
copy to Source/core/css/parser/CSSToken.cpp |
index b23dbed9d8e0a82d135e81fc75b4aef15f82d420..b10d9a4d5793a046a0392290cd19b7139dda1507 100644 |
--- a/Source/platform/PlatformThreadData.cpp |
+++ b/Source/core/css/parser/CSSToken.cpp |
@@ -29,35 +29,54 @@ |
*/ |
#include "config.h" |
-#include "platform/PlatformThreadData.h" |
- |
-#include "platform/ThreadTimers.h" |
-#include "wtf/PassOwnPtr.h" |
-#include "wtf/ThreadSpecific.h" |
+#include "core/css/parser/CSSToken.h" |
namespace WebCore { |
-static ThreadSpecific<PlatformThreadData>* s_data; |
+CSSToken::CSSToken(CSSTokenType type) |
+ : m_type(type) |
+{ |
+} |
+ |
+// Just a helper used for Delim tokens. |
+CSSToken::CSSToken(CSSTokenType type, UChar c) |
+ : m_type(type) |
+ , m_delimeter(c) |
+{ |
+ ASSERT(m_type == DelimToken); |
+} |
+ |
+CSSToken::CSSToken(CSSTokenType type, String value) |
+ : m_type(type) |
+ , m_value(value) |
+{ |
+} |
-PlatformThreadData::PlatformThreadData() |
- : m_threadTimers(adoptPtr(new ThreadTimers)) |
+CSSToken::CSSToken(CSSTokenType type, String name, HashTokenType hashType) |
+ : m_type(type) |
+ , m_value(name) |
+ , m_hashTokenType(hashType) |
{ |
+ ASSERT(m_type == HashToken); |
} |
-PlatformThreadData::~PlatformThreadData() |
+CSSToken::CSSToken(CSSTokenType type, String value, double, NumericValueType) |
{ |
+ ASSERT(type == NumberToken); |
+ m_type = type; |
} |
-void PlatformThreadData::destroy() |
+void CSSToken::convertToDimensionWithUnit(String unit) |
{ |
- m_threadTimers.clear(); |
+ ASSERT(m_type == NumberToken); |
+ m_type = DimensionToken; |
+ m_unit = unit; |
} |
-PlatformThreadData& PlatformThreadData::current() |
+void CSSToken::convertToPercentage() |
{ |
- if (!s_data) |
- s_data = new ThreadSpecific<PlatformThreadData>; |
- return **s_data; |
+ ASSERT(m_type == NumberToken); |
+ m_type = PercentageToken; |
} |
} // namespace WebCore |