| 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 "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 CSSValueID functionId() const; | 112 CSSValueID functionId() const; |
| 113 | 113 |
| 114 bool hasStringBacking() const; | 114 bool hasStringBacking() const; |
| 115 | 115 |
| 116 CSSPropertyID parseAsUnresolvedCSSPropertyID() const; | 116 CSSPropertyID parseAsUnresolvedCSSPropertyID() const; |
| 117 | 117 |
| 118 void serialize(StringBuilder&) const; | 118 void serialize(StringBuilder&) const; |
| 119 | 119 |
| 120 CSSParserToken copyWithUpdatedString(const StringView&) const; | 120 CSSParserToken copyWithUpdatedString(const StringView&) const; |
| 121 | 121 |
| 122 static bool isValidNumericValue(double); |
| 123 bool isValidNumericValue() const; |
| 124 |
| 122 private: | 125 private: |
| 123 void initValueFromStringView(StringView string) | 126 void initValueFromStringView(StringView string) |
| 124 { | 127 { |
| 125 m_valueLength = string.length(); | 128 m_valueLength = string.length(); |
| 126 m_valueIs8Bit = string.is8Bit(); | 129 m_valueIs8Bit = string.is8Bit(); |
| 127 m_valueDataCharRaw = string.bytes(); | 130 m_valueDataCharRaw = string.bytes(); |
| 128 } | 131 } |
| 129 unsigned m_type : 6; // CSSParserTokenType | 132 unsigned m_type : 6; // CSSParserTokenType |
| 130 unsigned m_blockType : 2; // BlockType | 133 unsigned m_blockType : 2; // BlockType |
| 131 unsigned m_numericValueType : 1; // NumericValueType | 134 unsigned m_numericValueType : 1; // NumericValueType |
| (...skipping 25 matching lines...) Expand all Loading... |
| 157 | 160 |
| 158 namespace WTF { | 161 namespace WTF { |
| 159 template <> | 162 template <> |
| 160 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { | 163 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { |
| 161 STATIC_ONLY(IsTriviallyMoveAssignable); | 164 STATIC_ONLY(IsTriviallyMoveAssignable); |
| 162 static const bool value = true; | 165 static const bool value = true; |
| 163 }; | 166 }; |
| 164 } | 167 } |
| 165 | 168 |
| 166 #endif // CSSSParserToken_h | 169 #endif // CSSSParserToken_h |
| OLD | NEW |