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

Unified Diff: Source/core/css/parser/CSSParserToken.cpp

Issue 1253403005: Implement CSS.escape (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix final test Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/DOMWindowCSS.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSParserToken.cpp
diff --git a/Source/core/css/parser/CSSParserToken.cpp b/Source/core/css/parser/CSSParserToken.cpp
index 5ac3d2cbf4d2ed44fa1fa9fd95e8cbb01c671b86..851b965fd29a4a955728c61edbf2f6428f619289 100644
--- a/Source/core/css/parser/CSSParserToken.cpp
+++ b/Source/core/css/parser/CSSParserToken.cpp
@@ -116,18 +116,21 @@ void CSSParserToken::serialize(StringBuilder& builder) const
// simple we handle some of the edge cases incorrectly (see comments below).
switch (type()) {
case IdentToken:
- return serializeIdentifier(value(), builder);
+ serializeIdentifier(value(), builder);
+ break;
case FunctionToken:
serializeIdentifier(value(), builder);
return builder.append('(');
case AtKeywordToken:
builder.append('@');
- return serializeIdentifier(value(), builder);
+ serializeIdentifier(value(), builder);
+ break;
case HashToken:
// This will always serialize as a hash-token with 'id' type instead of
// preserving the type of the input.
builder.append('#');
- return serializeIdentifier(value(), builder);
+ serializeIdentifier(value(), builder);
+ break;
case UrlToken:
builder.append("url(");
serializeIdentifier(value(), builder);
@@ -145,7 +148,8 @@ void CSSParserToken::serialize(StringBuilder& builder) const
case DimensionToken:
// This will incorrectly serialize e.g. 4e3e2 as 4000e2
builder.appendNumber(numericValue());
- return serializeIdentifier(value(), builder);
+ serializeIdentifier(value(), builder);
+ break;
case UnicodeRangeToken:
return builder.append(String::format("U+%X-%X", unicodeRangeStart(), unicodeRangeEnd()));
case StringToken:
« no previous file with comments | « Source/core/css/DOMWindowCSS.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698