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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSMarkup.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, 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 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 appendTo.append(c); 75 appendTo.append(c);
76 } 76 }
77 77
78 static void serializeCharacterAsCodePoint(UChar32 c, StringBuilder& appendTo) 78 static void serializeCharacterAsCodePoint(UChar32 c, StringBuilder& appendTo)
79 { 79 {
80 appendTo.append('\\'); 80 appendTo.append('\\');
81 appendUnsignedAsHex(c, appendTo, Lowercase); 81 appendUnsignedAsHex(c, appendTo, Lowercase);
82 appendTo.append(' '); 82 appendTo.append(' ');
83 } 83 }
84 84
85 void serializeIdentifier(const String& identifier, StringBuilder& appendTo) 85 void serializeIdentifier(const String& identifier, StringBuilder& appendTo, bool skipStartChecks)
86 { 86 {
87 bool isFirst = true; 87 bool isFirst = !skipStartChecks;
88 bool isSecond = false; 88 bool isSecond = false;
89 bool isFirstCharHyphen = false; 89 bool isFirstCharHyphen = false;
90 unsigned index = 0; 90 unsigned index = 0;
91 while (index < identifier.length()) { 91 while (index < identifier.length()) {
92 UChar32 c = identifier.characterStartingAt(index); 92 UChar32 c = identifier.characterStartingAt(index);
93 if (c == 0) { 93 if (c == 0) {
94 // Check for lone surrogate which characterStartingAt does not retur n. 94 // Check for lone surrogate which characterStartingAt does not retur n.
95 c = identifier[index]; 95 c = identifier[index];
96 } 96 }
97 97
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 { 149 {
150 return "url(" + serializeString(string) + ")"; 150 return "url(" + serializeString(string) + ")";
151 } 151 }
152 152
153 String serializeFontFamily(const String& string) 153 String serializeFontFamily(const String& string)
154 { 154 {
155 return isCSSTokenizerIdentifier(string) ? string : serializeString(string); 155 return isCSSTokenizerIdentifier(string) ? string : serializeString(string);
156 } 156 }
157 157
158 } // namespace blink 158 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSMarkup.h ('k') | third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698