From 51f6c2793adab2d864b3d2b360000ef8db1d3e92 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 10 Dec 2018 16:19:40 +0100 Subject: BASELINE: Update Chromium to 71.0.3578.93 Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor --- .../blink/renderer/platform/wtf/text/text_codec.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'chromium/third_party/blink/renderer/platform/wtf/text/text_codec.h') 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. -- cgit v1.2.1