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

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodec.cpp

Issue 1709293002: Add support for CSS unicod encoding to the text codec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a unit test Created 4 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 | « third_party/WebKit/Source/wtf/text/TextCodec.h ('k') | third_party/WebKit/Source/wtf/text/TextCodecICU.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/TextCodec.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextCodec.cpp b/third_party/WebKit/Source/wtf/text/TextCodec.cpp
index 191ebb5689055add7eb204a4518e9cc21fad1ce9..b613f3583ecee3110f0155eb00cf5a7f43c0ace8 100644
--- a/third_party/WebKit/Source/wtf/text/TextCodec.cpp
+++ b/third_party/WebKit/Source/wtf/text/TextCodec.cpp
@@ -47,6 +47,10 @@ int TextCodec::getUnencodableReplacement(unsigned codePoint, UnencodableHandling
case URLEncodedEntitiesForUnencodables:
snprintf(replacement, sizeof(UnencodableReplacementArray), "%%26%%23%u%%3B", codePoint);
return static_cast<int>(strlen(replacement));
+
+ case CSSEncodedEntitiesForUnencodables:
+ snprintf(replacement, sizeof(UnencodableReplacementArray), "\\%x ", codePoint);
+ return static_cast<int>(strlen(replacement));
}
ASSERT_NOT_REACHED();
replacement[0] = 0;
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodec.h ('k') | third_party/WebKit/Source/wtf/text/TextCodecICU.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698