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

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

Issue 1306283006: BackgroundImage incorrectly returns empty url() when created on-the-fly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/css/CSSMarkup.h ('k') | Source/core/css/ComputedStyleCSSValueMapping.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSMarkup.cpp
diff --git a/Source/core/css/CSSMarkup.cpp b/Source/core/css/CSSMarkup.cpp
index 03a3f8910f66615d3012fc57e9e9591d9bc987e8..c9945a2f527cfe71d92db131bd68255a5820ef6f 100644
--- a/Source/core/css/CSSMarkup.cpp
+++ b/Source/core/css/CSSMarkup.cpp
@@ -263,4 +263,21 @@ String serializeString(const String& string)
return builder.toString();
}
+String serializeStringWithoutQuotations(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();
+}
+
} // namespace blink
« no previous file with comments | « Source/core/css/CSSMarkup.h ('k') | Source/core/css/ComputedStyleCSSValueMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698