OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CSSParserToken_h | 5 #ifndef CSSParserToken_h |
6 #define CSSParserToken_h | 6 #define CSSParserToken_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/parser/CSSParserString.h" | 10 #include "core/css/parser/CSSParserString.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 NumericValueType numericValueType() const; | 102 NumericValueType numericValueType() const; |
103 double numericValue() const; | 103 double numericValue() const; |
104 HashTokenType hashTokenType() const { ASSERT(m_type == HashToken); return m_ hashTokenType; } | 104 HashTokenType hashTokenType() const { ASSERT(m_type == HashToken); return m_ hashTokenType; } |
105 BlockType blockType() const { return static_cast<BlockType>(m_blockType); } | 105 BlockType blockType() const { return static_cast<BlockType>(m_blockType); } |
106 CSSPrimitiveValue::UnitType unitType() const { return static_cast<CSSPrimiti veValue::UnitType>(m_unit); } | 106 CSSPrimitiveValue::UnitType unitType() const { return static_cast<CSSPrimiti veValue::UnitType>(m_unit); } |
107 UChar32 unicodeRangeStart() const { ASSERT(m_type == UnicodeRangeToken); ret urn m_unicodeRange.start; } | 107 UChar32 unicodeRangeStart() const { ASSERT(m_type == UnicodeRangeToken); ret urn m_unicodeRange.start; } |
108 UChar32 unicodeRangeEnd() const { ASSERT(m_type == UnicodeRangeToken); retur n m_unicodeRange.end; } | 108 UChar32 unicodeRangeEnd() const { ASSERT(m_type == UnicodeRangeToken); retur n m_unicodeRange.end; } |
109 CSSValueID id() const; | 109 CSSValueID id() const; |
110 CSSValueID functionId() const; | 110 CSSValueID functionId() const; |
111 | 111 |
112 bool hasStringBacking() const; | |
113 | |
114 bool valueIs8Bit() const { return m_valueIs8Bit; } | |
Timothy Loh
2015/10/15 03:43:48
unused now I think?
| |
115 | |
112 CSSPropertyID parseAsUnresolvedCSSPropertyID() const; | 116 CSSPropertyID parseAsUnresolvedCSSPropertyID() const; |
113 | 117 |
114 void serialize(StringBuilder&) const; | 118 void serialize(StringBuilder&) const; |
115 | 119 |
120 CSSParserToken copyWithUpdatedString(CSSParserString&) const; | |
121 | |
116 private: | 122 private: |
117 void initValueFromCSSParserString(const CSSParserString& value) | 123 void initValueFromCSSParserString(const CSSParserString& value) |
118 { | 124 { |
119 m_valueLength = value.m_length; | 125 m_valueLength = value.m_length; |
120 m_valueIs8Bit = value.m_is8Bit; | 126 m_valueIs8Bit = value.m_is8Bit; |
121 m_valueDataCharRaw = value.m_data.charactersRaw; | 127 m_valueDataCharRaw = value.m_data.charactersRaw; |
122 } | 128 } |
123 unsigned m_type : 6; // CSSParserTokenType | 129 unsigned m_type : 6; // CSSParserTokenType |
124 unsigned m_blockType : 2; // BlockType | 130 unsigned m_blockType : 2; // BlockType |
125 unsigned m_numericValueType : 1; // NumericValueType | 131 unsigned m_numericValueType : 1; // NumericValueType |
(...skipping 23 matching lines...) Expand all Loading... | |
149 | 155 |
150 namespace WTF { | 156 namespace WTF { |
151 template <> | 157 template <> |
152 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { | 158 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { |
153 STATIC_ONLY(IsTriviallyMoveAssignable); | 159 STATIC_ONLY(IsTriviallyMoveAssignable); |
154 static const bool value = true; | 160 static const bool value = true; |
155 }; | 161 }; |
156 } | 162 } |
157 | 163 |
158 #endif // CSSSParserToken_h | 164 #endif // CSSSParserToken_h |
OLD | NEW |