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

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

Issue 1060583011: Make quoteCSSString an internal helper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 8 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/CSSPrimitiveValue.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 c5326afa96418b42b3f9dff642fbb05c7018365b..69764aa7de4ee7133cfc73a53fab16c7e1403bb3 100644
--- a/Source/core/css/CSSMarkup.cpp
+++ b/Source/core/css/CSSMarkup.cpp
@@ -159,7 +159,7 @@ static inline String quoteCSSStringInternal(const CharacterType* characters, uns
}
// We use single quotes for now because markup.cpp uses double quotes.
-String quoteCSSString(const String& string)
+static String quoteCSSString(const String& string)
{
// This function expands each character to at most 3 characters ('\u0010' -> '\' '1' '0') as well as adds
// 2 quote characters (before and after). Make sure the resulting size (3 * length + 2) will not overflow unsigned.
@@ -248,4 +248,11 @@ void serializeString(const String& string, StringBuilder& appendTo)
appendTo.append('\"');
}
+String serializeString(const String& string)
+{
+ StringBuilder builder;
+ serializeString(string, builder);
+ return builder.toString();
+}
+
} // namespace blink
« no previous file with comments | « Source/core/css/CSSMarkup.h ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698