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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserToken.h

Issue 2056593005: Move more helper methods out of CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698