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 |
112 CSSPropertyID parseAsUnresolvedCSSPropertyID() const; | 114 CSSPropertyID parseAsUnresolvedCSSPropertyID() const; |
113 | 115 |
114 void serialize(StringBuilder&) const; | 116 void serialize(StringBuilder&) const; |
115 | 117 |
| 118 CSSParserToken copyWithUpdatedString(const CSSParserString&) const; |
| 119 |
116 private: | 120 private: |
117 void initValueFromCSSParserString(const CSSParserString& value) | 121 void initValueFromCSSParserString(const CSSParserString& value) |
118 { | 122 { |
119 m_valueLength = value.m_length; | 123 m_valueLength = value.m_length; |
120 m_valueIs8Bit = value.m_is8Bit; | 124 m_valueIs8Bit = value.m_is8Bit; |
121 m_valueDataCharRaw = value.m_data.charactersRaw; | 125 m_valueDataCharRaw = value.m_data.charactersRaw; |
122 } | 126 } |
123 unsigned m_type : 6; // CSSParserTokenType | 127 unsigned m_type : 6; // CSSParserTokenType |
124 unsigned m_blockType : 2; // BlockType | 128 unsigned m_blockType : 2; // BlockType |
125 unsigned m_numericValueType : 1; // NumericValueType | 129 unsigned m_numericValueType : 1; // NumericValueType |
(...skipping 23 matching lines...) Expand all Loading... |
149 | 153 |
150 namespace WTF { | 154 namespace WTF { |
151 template <> | 155 template <> |
152 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { | 156 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { |
153 STATIC_ONLY(IsTriviallyMoveAssignable); | 157 STATIC_ONLY(IsTriviallyMoveAssignable); |
154 static const bool value = true; | 158 static const bool value = true; |
155 }; | 159 }; |
156 } | 160 } |
157 | 161 |
158 #endif // CSSSParserToken_h | 162 #endif // CSSSParserToken_h |
OLD | NEW |