summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:19:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:01:50 +0000
commit51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch)
tree835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h
parent6036726eb981b6c4b42047513b9d3f4ac865daac (diff)
downloadqtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h')
-rw-r--r--chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h b/chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h
index e13cad7df69..d1316dda10d 100644
--- a/chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h
+++ b/chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h
@@ -32,6 +32,7 @@
#include "third_party/blink/renderer/platform/wtf/forward.h"
#include "third_party/blink/renderer/platform/wtf/text/unicode.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
+#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
namespace WTF {
@@ -52,6 +53,10 @@ enum UnencodableHandling {
// Encodes the character as a CSS entity. For example U+06DE
// would be \06de. See: https://www.w3.org/TR/css-syntax-3/#escaping
kCSSEncodedEntitiesForUnencodables,
+
+ // Used when all characters can be encoded in the character set. Only
+ // applicable to UTF-N encodings.
+ kNoUnencodables,
};
typedef char UnencodableReplacementArray[32];
@@ -76,19 +81,23 @@ class WTF_EXPORT TextCodec {
virtual ~TextCodec();
String Decode(const char* str,
- size_t length,
+ wtf_size_t length,
FlushBehavior flush = FlushBehavior::kDoNotFlush) {
bool ignored;
return Decode(str, length, flush, false, ignored);
}
virtual String Decode(const char*,
- size_t length,
+ wtf_size_t length,
FlushBehavior,
bool stop_on_error,
bool& saw_error) = 0;
- virtual CString Encode(const UChar*, size_t length, UnencodableHandling) = 0;
- virtual CString Encode(const LChar*, size_t length, UnencodableHandling) = 0;
+ virtual CString Encode(const UChar*,
+ wtf_size_t length,
+ UnencodableHandling) = 0;
+ virtual CString Encode(const LChar*,
+ wtf_size_t length,
+ UnencodableHandling) = 0;
// Fills a null-terminated string representation of the given
// unencodable character into the given replacement buffer.