chromium-icu72.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. From 2c4d3c61aa33f3169e7923ea3433c71e3df0952f Mon Sep 17 00:00:00 2001
  2. From: Frank Tang <ftang@chromium.org>
  3. Date: Mon, 7 Nov 2022 22:08:05 +0000
  4. Subject: [PATCH 1/2] Prepare for ICU72 landing
  5. The date format may output U+202F Narrow SPACE between time
  6. and AM/PM. So switch to use UTF8 and not restrict to ASCII which
  7. will break when the output is not only ASCII.
  8. Bug: 1371208
  9. Change-Id: I05f9daadfba5c45d618f15ae23340da373f2f36a
  10. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4007076
  11. Reviewed-by: Daniel Rubery <drubery@chromium.org>
  12. Commit-Queue: Frank Tang <ftang@chromium.org>
  13. Cr-Commit-Position: refs/heads/main@{#1068343}
  14. (cherry picked from commit ce2ffed84b95e2b7c068d6f066d86cd034212425)
  15. ---
  16. .../safe_browsing/content/browser/web_ui/safe_browsing_ui.cc | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. diff --git a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc
  19. index 92597a9d3a4..e6e7514a082 100644
  20. --- a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc
  21. +++ b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc
  22. @@ -457,7 +457,7 @@ namespace {
  23. std::string UserReadableTimeFromMillisSinceEpoch(int64_t time_in_milliseconds) {
  24. base::Time time =
  25. base::Time::UnixEpoch() + base::Milliseconds(time_in_milliseconds);
  26. - return base::UTF16ToASCII(base::TimeFormatShortDateAndTime(time));
  27. + return base::UTF16ToUTF8(base::TimeFormatShortDateAndTime(time));
  28. }
  29. void AddStoreInfo(const DatabaseManagerInfo::DatabaseInfo::StoreInfo store_info,
  30. From 8ba9d96da703978655cddf07d58b0a15f0a43a10 Mon Sep 17 00:00:00 2001
  31. From: Frank Tang <ftang@chromium.org>
  32. Date: Tue, 8 Nov 2022 00:13:16 +0000
  33. Subject: [PATCH 2/2] Prepare the landing of ICU72/Unicode 15
  34. See
  35. https://www.unicode.org/emoji/charts-15.0/emoji-released.html
  36. https://www.unicode.org/charts/PDF/U1F680.pdf
  37. https://www.unicode.org/charts/PDF/U1FA70.pdf
  38. for the newly added emoji to
  39. Transport and Map Symbols
  40. Symbols and Pictographs Extended-A blocks.
  41. Update the kIsCJKIdeographOrSymbolRanges to Unicode 15
  42. Needed to avoid test breakage of
  43. CharacterTest.HammerEmojiVsCJKIdeographOrSymbol
  44. Bug: 1371208
  45. Change-Id: Ic7b319ba18f3aded46b252d8b484e3b1bc43eff4
  46. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4007098
  47. Reviewed-by: Stephen Chenney <schenney@chromium.org>
  48. Commit-Queue: Frank Tang <ftang@chromium.org>
  49. Cr-Commit-Position: refs/heads/main@{#1068422}
  50. (cherry picked from commit d93a774bf6fac8ddaaa1041ea6ad2dd8e5ff4539)
  51. ---
  52. .../platform/text/character_property_data.h | 24 +++++++++----------
  53. 1 file changed, 12 insertions(+), 12 deletions(-)
  54. diff --git a/third_party/blink/renderer/platform/text/character_property_data.h b/third_party/blink/renderer/platform/text/character_property_data.h
  55. index 9005c20a379..ee690563c28 100644
  56. --- a/third_party/blink/renderer/platform/text/character_property_data.h
  57. +++ b/third_party/blink/renderer/platform/text/character_property_data.h
  58. @@ -107,7 +107,7 @@ static const UChar32 kIsCJKIdeographOrSymbolRanges[] = {
  59. 0x1F3FB, 0x1F3FF,
  60. // Transport
  61. - 0x1F6DD, 0x1F6DF,
  62. + 0x1F6DC, 0x1F6DF,
  63. // Colored circles and squares for use with emoji.
  64. 0x1F7E0, 0x1F7EB,
  65. @@ -118,25 +118,25 @@ static const UChar32 kIsCJKIdeographOrSymbolRanges[] = {
  66. 0x1F900, 0x1F90F,
  67. // ZIPPER-MOUTH FACE...SIGN OF THE HORNS
  68. 0x1F910, 0x1F918, 0x1F919, 0x1F97F, 0x1F980, 0x1F9BF, 0x1F9C0, 0x1F9FF,
  69. - // Clothing
  70. - 0x1FA70, 0x1FA74,
  71. - // Medical symbols
  72. - 0x1FA78, 0x1FA7C,
  73. + // Clothing, heart and Medical symbols
  74. + 0x1FA70, 0x1FA7C,
  75. // Toys and sport symbols
  76. - 0x1FA80, 0x1FA86,
  77. + 0x1FA80, 0x1FA88,
  78. // Miscellaneous objects
  79. - 0x1FA90, 0x1FAAC,
  80. // Animals and nature
  81. - 0x1FAB0, 0x1FABA,
  82. + 0x1FA90, 0x1FABD,
  83. + // Animal
  84. // Body parts
  85. // People
  86. - 0x1FAC0, 0x1FAC5,
  87. + 0x1FABF, 0x1FAC5,
  88. + // animal-mammal
  89. + 0x1FACE, 0x1FACF,
  90. // Food and drink
  91. - 0x1FAD0, 0x1FAD9,
  92. + 0x1FAD0, 0x1FADB,
  93. // Face
  94. - 0x1FAE0, 0x1FAE7,
  95. + 0x1FAE0, 0x1FAE8,
  96. // Hand
  97. - 0x1FAF0, 0x1FAF6,
  98. + 0x1FAF0, 0x1FAF8,
  99. };
  100. // https://html.spec.whatwg.org/C/#prod-potentialcustomelementname