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

Unified Diff: third_party/WebKit/Source/core/css/CSSMarkup.cpp

Issue 1363233003: Make sure <url>s are being serialized according to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix interpolation tests Created 5 years, 3 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
Index: third_party/WebKit/Source/core/css/CSSMarkup.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSMarkup.cpp b/third_party/WebKit/Source/core/css/CSSMarkup.cpp
index c9945a2f527cfe71d92db131bd68255a5820ef6f..7c5e890579db48b3c997dffb425a2d0530aeaaf0 100644
--- a/third_party/WebKit/Source/core/css/CSSMarkup.cpp
+++ b/third_party/WebKit/Source/core/css/CSSMarkup.cpp
@@ -263,21 +263,9 @@ String serializeString(const String& string)
return builder.toString();
}
-String serializeStringWithoutQuotations(const String& string)
+String serializeURI(const String& string)
{
- StringBuilder appendTo;
- unsigned index = 0;
- while (index < string.length()) {
- UChar32 c = string.characterStartingAt(index);
- index += U16_LENGTH(c);
- if (c <= 0x1f)
- serializeCharacterAsCodePoint(c, appendTo);
- else if (c == 0x22 || c == 0x5c)
- serializeCharacter(c, appendTo);
- else
- appendTo.append(c);
- }
- return appendTo.toString();
+ return "url(" + serializeString(string) + ")";
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSMarkup.h ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698