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

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

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
Index: third_party/WebKit/Source/wtf/text/TextCodec.h
diff --git a/third_party/WebKit/Source/wtf/text/TextCodec.h b/third_party/WebKit/Source/wtf/text/TextCodec.h
index 27e312858bd7bfe9743e3c32e96927c96b1946b3..28f547c5144eb917353a5e7910c67277ae8e21b6 100644
--- a/third_party/WebKit/Source/wtf/text/TextCodec.h
+++ b/third_party/WebKit/Source/wtf/text/TextCodec.h
@@ -50,7 +50,11 @@ enum UnencodableHandling {
// Encodes the character as en entity as above, but escaped
// non-alphanumeric characters. This is used in URLs.
// For example, U+6DE would be "%26%231758%3B".
- URLEncodedEntitiesForUnencodables
+ URLEncodedEntitiesForUnencodables,
+
+ // Encodes the character as a CSS entity. For example U+06DE
+ // would be \06de. See: https://www.w3.org/TR/css-syntax-3/#escaping
+ CSSEncodedEntitiesForUnencodables,
};
typedef char UnencodableReplacementArray[32];
@@ -70,8 +74,7 @@ static_assert(!DoNotFlush, "DoNotFlush should be falsy");
static_assert(FetchEOF, "FetchEOF should be truthy");
static_assert(DataEOF, "DataEOF should be truthy");
-
-class TextCodec {
+class WTF_EXPORT TextCodec {
WTF_MAKE_NONCOPYABLE(TextCodec); USING_FAST_MALLOC(TextCodec);
public:
TextCodec() { }
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameSerializer.cpp ('k') | third_party/WebKit/Source/wtf/text/TextCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698