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

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

Issue 1096963002: Make UseCounters work on aliased properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « Source/core/css/parser/CSSParserToken.h ('k') | Source/core/css/parser/CSSPropertyParser.h » ('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 #include "config.h" 5 #include "config.h"
6 #include "core/css/parser/CSSParserToken.h" 6 #include "core/css/parser/CSSParserToken.h"
7 7
8 #include "core/css/CSSMarkup.h" 8 #include "core/css/CSSMarkup.h"
9 #include "core/css/parser/CSSPropertyParser.h" 9 #include "core/css/parser/CSSPropertyParser.h"
10 #include "wtf/HashMap.h" 10 #include "wtf/HashMap.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 ASSERT(m_type == NumberToken || m_type == PercentageToken || m_type == Dimen sionToken); 98 ASSERT(m_type == NumberToken || m_type == PercentageToken || m_type == Dimen sionToken);
99 return static_cast<NumericValueType>(m_numericValueType); 99 return static_cast<NumericValueType>(m_numericValueType);
100 } 100 }
101 101
102 double CSSParserToken::numericValue() const 102 double CSSParserToken::numericValue() const
103 { 103 {
104 ASSERT(m_type == NumberToken || m_type == PercentageToken || m_type == Dimen sionToken); 104 ASSERT(m_type == NumberToken || m_type == PercentageToken || m_type == Dimen sionToken);
105 return m_numericValue; 105 return m_numericValue;
106 } 106 }
107 107
108 CSSPropertyID CSSParserToken::parseAsCSSPropertyID() const 108 CSSPropertyID CSSParserToken::parseAsUnresolvedCSSPropertyID() const
109 { 109 {
110 ASSERT(m_type == IdentToken); 110 ASSERT(m_type == IdentToken);
111 return cssPropertyID(m_value); 111 return unresolvedCSSPropertyID(m_value);
112 } 112 }
113 113
114 void CSSParserToken::serialize(StringBuilder& builder) const 114 void CSSParserToken::serialize(StringBuilder& builder) const
115 { 115 {
116 // This is currently only used for @supports CSSOM. To keep our implementati on 116 // This is currently only used for @supports CSSOM. To keep our implementati on
117 // simple we handle some of the edge cases incorrectly (see comments below). 117 // simple we handle some of the edge cases incorrectly (see comments below).
118 switch (type()) { 118 switch (type()) {
119 case IdentToken: 119 case IdentToken:
120 return serializeIdentifier(value(), builder); 120 return serializeIdentifier(value(), builder);
121 case FunctionToken: 121 case FunctionToken:
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return builder.append('}'); 194 return builder.append('}');
195 195
196 case EOFToken: 196 case EOFToken:
197 case CommentToken: 197 case CommentToken:
198 ASSERT_NOT_REACHED(); 198 ASSERT_NOT_REACHED();
199 return; 199 return;
200 } 200 }
201 } 201 }
202 202
203 } // namespace blink 203 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSParserToken.h ('k') | Source/core/css/parser/CSSPropertyParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698