qt5-webengine-icu-68.patch 15 KB

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