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

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

Issue 1783693006: Use <string> serialization rules for computed value of reference filter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 9 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 b9c1fecf146a1dfe96fc1c1d1b5aad5db5625ba0..07be456caebb7868d6a06c65666479fc61dd39b3 100644
--- a/third_party/WebKit/Source/core/css/CSSMarkup.cpp
+++ b/third_party/WebKit/Source/core/css/CSSMarkup.cpp
@@ -69,46 +69,6 @@ static bool isCSSTokenizerIdentifier(const String& string)
}
template <typename CharacterType>
-static inline bool isCSSTokenizerURL(const CharacterType* characters, unsigned length)
-{
- const CharacterType* end = characters + length;
-
- for (; characters != end; ++characters) {
- CharacterType c = characters[0];
- switch (c) {
- case '!':
- case '#':
- case '$':
- case '%':
- case '&':
- break;
- default:
- if (c < '*')
- return false;
- if (c <= '~')
- break;
- if (c < 128)
- return false;
- }
- }
-
- return true;
-}
-
-// "url" from the CSS tokenizer, minus backslash-escape sequences
-static bool isCSSTokenizerURL(const String& string)
-{
- unsigned length = string.length();
-
- if (!length)
- return true;
-
- if (string.is8Bit())
- return isCSSTokenizerURL(string.characters8(), length);
- return isCSSTokenizerURL(string.characters16(), length);
-}
-
-template <typename CharacterType>
static inline String quoteCSSStringInternal(const CharacterType* characters, unsigned length)
{
// For efficiency, we first pre-calculate the length of the quoted string, then we build the actual one.
@@ -181,11 +141,6 @@ String quoteCSSStringIfNeeded(const String& string)
return isCSSTokenizerIdentifier(string) ? string : quoteCSSString(string);
}
-String quoteCSSURLIfNeeded(const String& string)
-{
- return isCSSTokenizerURL(string) ? string : quoteCSSString(string);
-}
-
static void serializeCharacter(UChar32 c, StringBuilder& appendTo)
{
appendTo.append('\\');
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSMarkup.h ('k') | third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698