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

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

Issue 2080723003: CSS Variable #0000ee is read as #\30 000ee (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated testcase Created 4 years, 5 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 | « third_party/WebKit/Source/core/css/CSSMarkup.cpp ('k') | no next file » | 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 "core/css/parser/CSSParserToken.h" 5 #include "core/css/parser/CSSParserToken.h"
6 6
7 #include "core/css/CSSMarkup.h" 7 #include "core/css/CSSMarkup.h"
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 serializeIdentifier(value().toString(), builder); 206 serializeIdentifier(value().toString(), builder);
207 break; 207 break;
208 case FunctionToken: 208 case FunctionToken:
209 serializeIdentifier(value().toString(), builder); 209 serializeIdentifier(value().toString(), builder);
210 return builder.append('('); 210 return builder.append('(');
211 case AtKeywordToken: 211 case AtKeywordToken:
212 builder.append('@'); 212 builder.append('@');
213 serializeIdentifier(value().toString(), builder); 213 serializeIdentifier(value().toString(), builder);
214 break; 214 break;
215 case HashToken: 215 case HashToken:
216 // This will always serialize as a hash-token with 'id' type instead of
217 // preserving the type of the input.
218 builder.append('#'); 216 builder.append('#');
219 serializeIdentifier(value().toString(), builder); 217 serializeIdentifier(value().toString(), builder, (getHashTokenType() == HashTokenUnrestricted));
220 break; 218 break;
221 case UrlToken: 219 case UrlToken:
222 builder.append("url("); 220 builder.append("url(");
223 serializeIdentifier(value().toString(), builder); 221 serializeIdentifier(value().toString(), builder);
224 return builder.append(")"); 222 return builder.append(")");
225 case DelimiterToken: 223 case DelimiterToken:
226 if (delimiter() == '\\') 224 if (delimiter() == '\\')
227 return builder.append("\\\n"); 225 return builder.append("\\\n");
228 return builder.append(delimiter()); 226 return builder.append(delimiter());
229 case NumberToken: 227 case NumberToken:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 return value >= -std::numeric_limits<float>::max() 293 return value >= -std::numeric_limits<float>::max()
296 && value <= std::numeric_limits<float>::max(); 294 && value <= std::numeric_limits<float>::max();
297 } 295 }
298 296
299 bool CSSParserToken::isValidNumericValue() const 297 bool CSSParserToken::isValidNumericValue() const
300 { 298 {
301 return isValidNumericValue(numericValue()); 299 return isValidNumericValue(numericValue());
302 } 300 }
303 301
304 } // namespace blink 302 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSMarkup.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698