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

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

Issue 646893003: CSS Tokenizer: Comprehensive unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git cl try Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserToken.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "wtf/text/WTFString.h" 9 #include "wtf/text/WTFString.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 CSSParserToken(CSSParserTokenType, double, NumericValueType); // for NumberT oken 53 CSSParserToken(CSSParserTokenType, double, NumericValueType); // for NumberT oken
54 54
55 // Converts NumberToken to DimensionToken. 55 // Converts NumberToken to DimensionToken.
56 void convertToDimensionWithUnit(String); 56 void convertToDimensionWithUnit(String);
57 57
58 // Converts NumberToken to PercentageToken. 58 // Converts NumberToken to PercentageToken.
59 void convertToPercentage(); 59 void convertToPercentage();
60 60
61 CSSParserTokenType type() const { return m_type; } 61 CSSParserTokenType type() const { return m_type; }
62 String value() const { return m_value; } 62 String value() const { return m_value; }
63 String textForUnitTests() const;
64 63
65 UChar delimiter() const; 64 UChar delimiter() const;
66 NumericValueType numericValueType() const; 65 NumericValueType numericValueType() const;
67 double numericValue() const; 66 double numericValue() const;
68 BlockType blockType() const { return m_blockType; } 67 BlockType blockType() const { return m_blockType; }
69 CSSPrimitiveValue::UnitType unitType() const { return m_unit; } 68 CSSPrimitiveValue::UnitType unitType() const { return m_unit; }
70 69
71 private: 70 private:
72 CSSParserTokenType m_type; 71 CSSParserTokenType m_type;
73 String m_value; 72 String m_value;
74 73
75 UChar m_delimiter; // Could be rolled into m_value? 74 UChar m_delimiter; // Could be rolled into m_value?
76 75
77 NumericValueType m_numericValueType; 76 NumericValueType m_numericValueType;
78 double m_numericValue; 77 double m_numericValue;
79 CSSPrimitiveValue::UnitType m_unit; 78 CSSPrimitiveValue::UnitType m_unit;
80 79
81 BlockType m_blockType; 80 BlockType m_blockType;
82 }; 81 };
83 82
84 typedef Vector<CSSParserToken>::iterator CSSParserTokenIterator; 83 typedef Vector<CSSParserToken>::iterator CSSParserTokenIterator;
85 84
86 } // namespace 85 } // namespace
87 86
88 #endif // MediaQueryToken_h 87 #endif // MediaQueryToken_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserToken.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698