qtwebengine-icu68.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. diff --git a/third_party/libxml/src/encoding.c b/third_party/libxml/src/encoding.c
  2. index c34aca4..47be560 100644
  3. --- a/src/3rdparty/chromium/third_party/libxml/src/encoding.c
  4. +++ b/src/3rdparty/chromium/third_party/libxml/src/encoding.c
  5. @@ -1858,7 +1858,7 @@
  6. * @outlen: the length of @out
  7. * @in: a pointer to an array of input bytes
  8. * @inlen: the length of @in
  9. - * @flush: if true, indicates end of input
  10. + * @flush: if 1, indicates end of input
  11. *
  12. * Returns 0 if success, or
  13. * -1 by lack of space, or
  14. @@ -1898,7 +1898,7 @@
  15. *inlen = ucv_in - (const char*) in;
  16. *outlen = ucv_out - (char *) out;
  17. if (U_SUCCESS(err)) {
  18. - /* reset pivot buf if this is the last call for input (flush==TRUE) */
  19. + /* reset pivot buf if this is the last call for input (flush==1) */
  20. if (flush)
  21. cd->pivot_source = cd->pivot_target = cd->pivot_buf;
  22. return 0;
  23. @@ -2004,7 +2004,7 @@
  24. #ifdef LIBXML_ICU_ENABLED
  25. else if (handler->uconv_out != NULL) {
  26. ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
  27. - TRUE);
  28. + 1);
  29. }
  30. #endif /* LIBXML_ICU_ENABLED */
  31. else {
  32. From 9236b21c883360482bd2c06929bfdecbc47f186c Mon Sep 17 00:00:00 2001
  33. From: Allan Sandfeld Jensen <allan.jensen@qt.io>
  34. Date: Mon, 16 Nov 2020 13:16:13 +0100
  35. Subject: Fix build with system ICU 68
  36. MIME-Version: 1.0
  37. Content-Type: text/plain; charset=UTF-8
  38. Content-Transfer-Encoding: 8bit
  39. Fixes: QTBUG-88116
  40. Change-Id: I935babf51c2670fad7cc7950a2fe07eb2829c4cb
  41. Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
  42. ---
  43. chromium/base/i18n/string_compare.cc | 4 ++--
  44. chromium/base/i18n/time_formatting.cc | 2 +-
  45. .../components/autofill/core/common/autofill_regexes.cc | 8 ++++----
  46. .../spellcheck/renderer/spellcheck_worditerator.cc | 2 +-
  47. .../url_formatter/spoof_checks/idn_spoof_checker.cc | 4 ++--
  48. .../url_formatter/spoof_checks/skeleton_generator.cc | 2 +-
  49. chromium/services/service_manager/zygote/zygote_linux.cc | 2 +-
  50. .../blink/renderer/platform/text/locale_icu.cc | 4 ++--
  51. .../renderer/platform/text/text_break_iterator_icu.cc | 16 ++++++++--------
  52. .../blink/renderer/platform/text/unicode_utilities.cc | 2 +-
  53. .../blink/renderer/platform/wtf/text/text_codec_icu.cc | 2 +-
  54. chromium/ui/base/l10n/formatter.cc | 6 +++---
  55. 12 files changed, 27 insertions(+), 27 deletions(-)
  56. diff --git a/src/3rdparty/chromium/base/i18n/string_compare.cc b/src/3rdparty/chromium/base/i18n/string_compare.cc
  57. index 6cd59b98f49..a5fa502b53f 100644
  58. --- a/src/3rdparty/chromium/base/i18n/string_compare.cc
  59. +++ b/src/3rdparty/chromium/base/i18n/string_compare.cc
  60. @@ -18,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
  61. StringPiece16 rhs) {
  62. UErrorCode error = U_ZERO_ERROR;
  63. UCollationResult result = collator.compare(
  64. - icu::UnicodeString(FALSE, lhs.data(), static_cast<int>(lhs.length())),
  65. - icu::UnicodeString(FALSE, rhs.data(), static_cast<int>(rhs.length())),
  66. + icu::UnicodeString(false, lhs.data(), static_cast<int>(lhs.length())),
  67. + icu::UnicodeString(false, rhs.data(), static_cast<int>(rhs.length())),
  68. error);
  69. DCHECK(U_SUCCESS(error));
  70. return result;
  71. diff --git a/src/3rdparty/chromium/base/i18n/time_formatting.cc b/src/3rdparty/chromium/base/i18n/time_formatting.cc
  72. index 1a6c1389ba0..106dd0e5b47 100644
  73. --- a/src/3rdparty/chromium/base/i18n/time_formatting.cc
  74. +++ b/src/3rdparty/chromium/base/i18n/time_formatting.cc
  75. @@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const TimeDelta time,
  76. icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
  77. measure_format.formatMeasures(measures, 3, formatted, ignore, status);
  78. *out = i18n::UnicodeStringToString16(formatted);
  79. - return U_SUCCESS(status) == TRUE;
  80. + return U_SUCCESS(status) == true;
  81. }
  82. string16 DateIntervalFormat(const Time& begin_time,
  83. diff --git a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
  84. index b141cb2d0f6..a8a688d50c7 100644
  85. --- a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
  86. +++ b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
  87. @@ -43,7 +43,7 @@ class AutofillRegexes {
  88. icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) {
  89. auto it = matchers_.find(pattern);
  90. if (it == matchers_.end()) {
  91. - const icu::UnicodeString icu_pattern(FALSE, pattern.data(),
  92. + const icu::UnicodeString icu_pattern(false, pattern.data(),
  93. pattern.length());
  94. UErrorCode status = U_ZERO_ERROR;
  95. @@ -70,20 +70,20 @@ bool MatchesPattern(const base::string16& input,
  96. base::AutoLock lock(*g_lock);
  97. icu::RegexMatcher* matcher = g_autofill_regexes->GetMatcher(pattern);
  98. - icu::UnicodeString icu_input(FALSE, input.data(), input.length());
  99. + icu::UnicodeString icu_input(false, input.data(), input.length());
  100. matcher->reset(icu_input);
  101. UErrorCode status = U_ZERO_ERROR;
  102. UBool matched = matcher->find(0, status);
  103. DCHECK(U_SUCCESS(status));
  104. - if (matched == TRUE && match) {
  105. + if (matched == true && match) {
  106. icu::UnicodeString match_unicode = matcher->group(0, status);
  107. DCHECK(U_SUCCESS(status));
  108. *match = base::i18n::UnicodeStringToString16(match_unicode);
  109. }
  110. - return matched == TRUE;
  111. + return matched == true;
  112. }
  113. } // namespace autofill
  114. diff --git a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
  115. index 8fe8a6df381..e3a65580c08 100644
  116. --- a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
  117. +++ b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
  118. @@ -424,7 +424,7 @@ bool SpellcheckWordIterator::Normalize(size_t input_start,
  119. // spellchecker and we need manual normalization as well. The normalized
  120. // text does not have to be NUL-terminated since its characters are copied to
  121. // string16, which adds a NUL character when we need.
  122. - icu::UnicodeString input(FALSE, &text_[input_start],
  123. + icu::UnicodeString input(false, &text_[input_start],
  124. base::checked_cast<int32_t>(input_length));
  125. UErrorCode status = U_ZERO_ERROR;
  126. icu::UnicodeString output;
  127. diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
  128. index 1964793fd3e..c4e01026c38 100644
  129. --- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
  130. +++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
  131. @@ -347,7 +347,7 @@ bool IDNSpoofChecker::SafeToDisplayAsUnicode(
  132. if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS))
  133. return false;
  134. - icu::UnicodeString label_string(FALSE /* isTerminated */, label.data(),
  135. + icu::UnicodeString label_string(false /* isTerminated */, label.data(),
  136. base::checked_cast<int32_t>(label.size()));
  137. // A punycode label with 'xn--' prefix is not subject to the URL
  138. @@ -677,7 +677,7 @@ bool IDNSpoofChecker::IsWholeScriptConfusableAllowedForTLD(
  139. base::StringPiece tld,
  140. base::StringPiece16 tld_unicode) {
  141. icu::UnicodeString tld_string(
  142. - FALSE /* isTerminated */, tld_unicode.data(),
  143. + false /* isTerminated */, tld_unicode.data(),
  144. base::checked_cast<int32_t>(tld_unicode.size()));
  145. // Allow if the TLD contains any letter from the script, in which case it's
  146. // likely to be a TLD in that script.
  147. diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
  148. index 41485914007..b8c1c2f547a 100644
  149. --- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
  150. +++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
  151. @@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() = default;
  152. Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) {
  153. Skeletons skeletons;
  154. size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0);
  155. - icu::UnicodeString host(FALSE, hostname.data(), hostname_length);
  156. + icu::UnicodeString host(false, hostname.data(), hostname_length);
  157. // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-],
  158. // there is no point in getting rid of diacritics because combining marks
  159. // attached to non-LGC characters are already blocked.
  160. diff --git a/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc b/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
  161. index aa601ab28d7..920438e5b50 100644
  162. --- a/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
  163. +++ b/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
  164. @@ -564,7 +564,7 @@ base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter,
  165. if (!iter.ReadString16(&timezone_id))
  166. return -1;
  167. icu::TimeZone::adoptDefault(icu::TimeZone::createTimeZone(
  168. - icu::UnicodeString(FALSE, timezone_id.data(), timezone_id.length())));
  169. + icu::UnicodeString(false, timezone_id.data(), timezone_id.length())));
  170. if (!iter.ReadInt(&numfds))
  171. return -1;
  172. diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
  173. index abff1b1d809..57f1286d4e4 100644
  174. --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
  175. +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
  176. @@ -169,12 +169,12 @@ static String GetDateFormatPattern(const UDateFormat* date_format) {
  177. return g_empty_string;
  178. UErrorCode status = U_ZERO_ERROR;
  179. - int32_t length = udat_toPattern(date_format, TRUE, nullptr, 0, &status);
  180. + int32_t length = udat_toPattern(date_format, true, nullptr, 0, &status);
  181. if (status != U_BUFFER_OVERFLOW_ERROR || !length)
  182. return g_empty_string;
  183. StringBuffer<UChar> buffer(length);
  184. status = U_ZERO_ERROR;
  185. - udat_toPattern(date_format, TRUE, buffer.Characters(), length, &status);
  186. + udat_toPattern(date_format, true, buffer.Characters(), length, &status);
  187. if (U_FAILURE(status))
  188. return g_empty_string;
  189. return String::Adopt(buffer);
  190. diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
  191. index a257cd75ccf..898d0c47bb1 100644
  192. --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
  193. +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
  194. @@ -311,13 +311,13 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
  195. text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
  196. ? static_cast<int32_t>(offset)
  197. : 0;
  198. - is_accessible = TRUE;
  199. + is_accessible = true;
  200. return true;
  201. }
  202. if (native_index >= native_length &&
  203. text->chunkNativeLimit == native_length) {
  204. text->chunkOffset = text->chunkLength;
  205. - is_accessible = FALSE;
  206. + is_accessible = false;
  207. return true;
  208. }
  209. } else {
  210. @@ -330,12 +330,12 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
  211. text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
  212. ? static_cast<int32_t>(offset)
  213. : 0;
  214. - is_accessible = TRUE;
  215. + is_accessible = true;
  216. return true;
  217. }
  218. if (native_index <= 0 && !text->chunkNativeStart) {
  219. text->chunkOffset = 0;
  220. - is_accessible = FALSE;
  221. + is_accessible = false;
  222. return true;
  223. }
  224. }
  225. @@ -346,7 +346,7 @@ static UBool TextLatin1Access(UText* text,
  226. int64_t native_index,
  227. UBool forward) {
  228. if (!text->context)
  229. - return FALSE;
  230. + return false;
  231. int64_t native_length = TextNativeLength(text);
  232. UBool is_accessible;
  233. if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
  234. @@ -370,7 +370,7 @@ static UBool TextLatin1Access(UText* text,
  235. DCHECK_EQ(new_context, kPriorContext);
  236. TextLatin1SwitchToPriorContext(text, native_index, native_length, forward);
  237. }
  238. - return TRUE;
  239. + return true;
  240. }
  241. static const struct UTextFuncs kTextLatin1Funcs = {
  242. @@ -510,7 +510,7 @@ static void TextUTF16SwitchToPriorContext(UText* text,
  243. static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
  244. if (!text->context)
  245. - return FALSE;
  246. + return false;
  247. int64_t native_length = TextNativeLength(text);
  248. UBool is_accessible;
  249. if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
  250. @@ -532,7 +532,7 @@ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
  251. DCHECK_EQ(new_context, kPriorContext);
  252. TextUTF16SwitchToPriorContext(text, native_index, native_length, forward);
  253. }
  254. - return TRUE;
  255. + return true;
  256. }
  257. static const struct UTextFuncs kTextUTF16Funcs = {
  258. diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
  259. index 2cefd5390b6..b8c4515dc13 100644
  260. --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
  261. +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
  262. @@ -300,7 +300,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters,
  263. DCHECK(U_SUCCESS(status));
  264. int32_t input_length = static_cast<int32_t>(length);
  265. // copy-on-write.
  266. - icu::UnicodeString normalized(FALSE, characters, input_length);
  267. + icu::UnicodeString normalized(false, characters, input_length);
  268. // In the vast majority of cases, input is already NFC. Run a quick check
  269. // to avoid normalizing the entire input unnecessarily.
  270. int32_t normalized_prefix_length =
  271. diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
  272. index 810d1cd9181..9074b640fff 100644
  273. --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
  274. +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
  275. @@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() const {
  276. DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING)
  277. << "ICU ambiguous alias warning for encoding: " << encoding_.GetName();
  278. if (converter_icu_)
  279. - ucnv_setFallback(converter_icu_, TRUE);
  280. + ucnv_setFallback(converter_icu_, true);
  281. }
  282. int TextCodecICU::DecodeToBuffer(UChar* target,
  283. diff --git a/src/3rdparty/chromium/ui/base/l10n/formatter.cc b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
  284. index 486a3a029cb..d7a41724628 100644
  285. --- a/src/3rdparty/chromium/ui/base/l10n/formatter.cc
  286. +++ b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
  287. @@ -232,7 +232,7 @@ void Formatter::Format(Unit unit,
  288. int value,
  289. icu::UnicodeString* formatted_string) const {
  290. DCHECK(simple_format_[unit]);
  291. - DCHECK(formatted_string->isEmpty() == TRUE);
  292. + DCHECK(formatted_string->isEmpty() == true);
  293. UErrorCode error = U_ZERO_ERROR;
  294. FormatNumberInPlural(*simple_format_[unit],
  295. value, formatted_string, &error);
  296. @@ -248,7 +248,7 @@ void Formatter::Format(TwoUnits units,
  297. << "Detailed() not implemented for your (format, length) combination!";
  298. DCHECK(detailed_format_[units][1])
  299. << "Detailed() not implemented for your (format, length) combination!";
  300. - DCHECK(formatted_string->isEmpty() == TRUE);
  301. + DCHECK(formatted_string->isEmpty() == true);
  302. UErrorCode error = U_ZERO_ERROR;
  303. FormatNumberInPlural(*detailed_format_[units][0], value_1,
  304. formatted_string, &error);
  305. @@ -281,7 +281,7 @@ std::unique_ptr<icu::MessageFormat> Formatter::InitFormat(
  306. base::string16 pattern = l10n_util::GetStringUTF16(pluralities.id);
  307. UErrorCode error = U_ZERO_ERROR;
  308. std::unique_ptr<icu::MessageFormat> format(new icu::MessageFormat(
  309. - icu::UnicodeString(FALSE, pattern.data(), pattern.length()), error));
  310. + icu::UnicodeString(false, pattern.data(), pattern.length()), error));
  311. DCHECK(U_SUCCESS(error));
  312. if (format.get())
  313. return format;
  314. --
  315. cgit v1.2.1