diff options
author | Pawel Hajdan, Jr <phajdan.jr@gentoo.org> | 2017-04-13 13:59:14 +0000 |
---|---|---|
committer | Pawel Hajdan, Jr <phajdan.jr@gentoo.org> | 2017-04-13 21:17:10 +0200 |
commit | f2345c0af633116a69051239ab10d858d5aea69a (patch) | |
tree | 19092f2cb80485b8c4616b36639e7c3be954e2d3 /www-client/chromium/files | |
parent | sys-apps/baselayout-prefix: remove use-flag from metadata.xml, up to haubi to... (diff) | |
download | gentoo-f2345c0af633116a69051239ab10d858d5aea69a.tar.gz gentoo-f2345c0af633116a69051239ab10d858d5aea69a.tar.bz2 gentoo-f2345c0af633116a69051239ab10d858d5aea69a.zip |
www-client/chromium: dev channel bump (59.0.3067.0)
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r-- | www-client/chromium/files/chromium-system-icu-r1.patch | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-system-icu-r1.patch b/www-client/chromium/files/chromium-system-icu-r1.patch new file mode 100644 index 000000000000..6356467c21c7 --- /dev/null +++ b/www-client/chromium/files/chromium-system-icu-r1.patch @@ -0,0 +1,224 @@ +Index: third_party/WebKit/Source/platform/text/CharacterEmoji.cpp +diff --git a/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp b/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp +index af051b46589bed421afd1da1e44623820c8f9136..60059d25dd808a0a55481d9bec3020b95175e45c 100644 +--- a/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp ++++ b/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp +@@ -192,26 +192,26 @@ static void applyPatternAndFreeze(icu::UnicodeSet* unicodeSet, + DCHECK_EQ(err, U_ZERO_ERROR); + } + +-bool Character::isEmoji(UChar32 ch) { +- return Character::isEmojiTextDefault(ch) || +- Character::isEmojiEmojiDefault(ch); ++bool Character::IsEmoji(UChar32 ch) { ++ return Character::IsEmojiTextDefault(ch) || ++ Character::IsEmojiEmojiDefault(ch); + } + +-bool Character::isEmojiTextDefault(UChar32 ch) { ++bool Character::IsEmojiTextDefault(UChar32 ch) { + DEFINE_STATIC_LOCAL(icu::UnicodeSet, emojiTextSet, ()); + if (emojiTextSet.isEmpty()) + applyPatternAndFreeze(&emojiTextSet, kEmojiTextPattern); +- return emojiTextSet.contains(ch) && !isEmojiEmojiDefault(ch); ++ return emojiTextSet.contains(ch) && !IsEmojiEmojiDefault(ch); + } + +-bool Character::isEmojiEmojiDefault(UChar32 ch) { ++bool Character::IsEmojiEmojiDefault(UChar32 ch) { + DEFINE_STATIC_LOCAL(icu::UnicodeSet, emojiEmojiSet, ()); + if (emojiEmojiSet.isEmpty()) + applyPatternAndFreeze(&emojiEmojiSet, kEmojiEmojiPattern); + return emojiEmojiSet.contains(ch); + } + +-bool Character::isEmojiModifierBase(UChar32 ch) { ++bool Character::IsEmojiModifierBase(UChar32 ch) { + DEFINE_STATIC_LOCAL(icu::UnicodeSet, emojieModifierBaseSet, ()); + if (emojieModifierBaseSet.isEmpty()) + applyPatternAndFreeze(&emojieModifierBaseSet, kEmojiModifierBasePattern); +Index: third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp +diff --git a/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp b/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp +index 55c4d36e8c217680da9131aac063e38ad3b1fe3d..f3000190d4473daf39f0bc7fe5c262c21ecca4a0 100644 +--- a/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp ++++ b/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp +@@ -20,7 +20,7 @@ + namespace blink { + + #if defined(USING_SYSTEM_ICU) +-static void generate(FILE*) {} ++static void Generate(FILE*) {} + #else + + const UChar32 kMaxCodepoint = 0x10FFFF; +Index: third_party/WebKit/Source/platform/wtf/text/TextCodecICU.cpp +diff --git a/third_party/WebKit/Source/platform/wtf/text/TextCodecICU.cpp b/third_party/WebKit/Source/platform/wtf/text/TextCodecICU.cpp +index 6d6f6f10e73dd6a413221d1e7f2d1e2a2d674e8b..ddf01cd9e2207bace2a0c4cab461750e86e0bf0d 100644 +--- a/third_party/WebKit/Source/platform/wtf/text/TextCodecICU.cpp ++++ b/third_party/WebKit/Source/platform/wtf/text/TextCodecICU.cpp +@@ -63,16 +63,16 @@ void TextCodecICU::RegisterEncodingNames(EncodingNameRegistrar registrar) { + // apart; ICU treats these names as synonyms. + registrar("ISO-8859-8-I", "ISO-8859-8-I"); + +- int32_t num_encodings = ucnv_countAvailable(); +- for (int32_t i = 0; i < num_encodings; ++i) { ++ int32_t nuencoding_s = ucnv_countAvailable(); ++ for (int32_t i = 0; i < nuencoding_s; ++i) { + const char* name = ucnv_getAvailableName(i); + UErrorCode error = U_ZERO_ERROR; + #if !defined(USING_SYSTEM_ICU) + const char* primary_standard = "HTML"; + const char* secondary_standard = "MIME"; + #else +- const char* primaryStandard = "MIME"; +- const char* secondaryStandard = "IANA"; ++ const char* primary_standard = "MIME"; ++ const char* secondary_standard = "IANA"; + #endif + const char* standard_name = + ucnv_getStandardName(name, primary_standard, &error); +@@ -94,20 +94,21 @@ void TextCodecICU::RegisterEncodingNames(EncodingNameRegistrar registrar) { + // encoding for encoding GB_2312-80 and several others. So, we need to + // override this behavior, too. + #if defined(USING_SYSTEM_ICU) +- if (!strcmp(standardName, "GB2312") || !strcmp(standardName, "GB_2312-80")) +- standardName = "GBK"; ++ if (!strcmp(standard_name, "GB2312") || !strcmp(standard_name, "GB_2312-80")) { ++ standard_name = "GBK"; + // Similarly, EUC-KR encodings all map to an extended version, but + // per HTML5, the canonical name still should be EUC-KR. +- else if (!strcmp(standardName, "EUC-KR") || +- !strcmp(standardName, "KSC_5601") || +- !strcmp(standardName, "cp1363")) +- standardName = "EUC-KR"; ++ } else if (!strcmp(standard_name, "EUC-KR") || ++ !strcmp(standard_name, "KSC_5601") || ++ !strcmp(standard_name, "cp1363")) { ++ standard_name = "EUC-KR"; + // And so on. +- else if (!strcasecmp(standardName, "iso-8859-9")) ++ } else if (!strcasecmp(standard_name, "iso-8859-9")) { + // This name is returned in different case by ICU 3.2 and 3.6. +- standardName = "windows-1254"; +- else if (!strcmp(standardName, "TIS-620")) +- standardName = "windows-874"; ++ standard_name = "windows-1254"; ++ } else if (!strcmp(standard_name, "TIS-620")) { ++ standard_name = "windows-874"; ++ } + #endif + + registrar(standard_name, standard_name); +@@ -229,8 +230,8 @@ void TextCodecICU::RegisterCodecs(TextCodecRegistrar registrar) { + // See comment above in registerEncodingNames. + registrar("ISO-8859-8-I", Create, 0); + +- int32_t num_encodings = ucnv_countAvailable(); +- for (int32_t i = 0; i < num_encodings; ++i) { ++ int32_t nuencoding_s = ucnv_countAvailable(); ++ for (int32_t i = 0; i < nuencoding_s; ++i) { + const char* name = ucnv_getAvailableName(i); + UErrorCode error = U_ZERO_ERROR; + const char* standard_name = ucnv_getStandardName(name, "MIME", &error); +@@ -272,7 +273,7 @@ void TextCodecICU::CreateICUConverter() const { + DCHECK(!converter_icu_); + + #if defined(USING_SYSTEM_ICU) +- const char* name = m_encoding.name(); ++ const char* name = encoding_.GetName(); + m_needsGBKFallbacks = + name[0] == 'G' && name[1] == 'B' && name[2] == 'K' && !name[3]; + #endif +@@ -393,16 +394,16 @@ String TextCodecICU::Decode(const char* bytes, + // Chrome's copy of ICU does not have the issue described below. + return result.ToString(); + #else +- String resultString = result.toString(); ++ String resultString = result.ToString(); + + // <http://bugs.webkit.org/show_bug.cgi?id=17014> + // Simplified Chinese pages use the code A3A0 to mean "full-width space", but + // ICU decodes it as U+E5E5. +- if (!strcmp(m_encoding.name(), "GBK")) { +- if (!strcasecmp(m_encoding.name(), "gb18030")) +- resultString.replace(0xE5E5, ideographicSpaceCharacter); ++ if (!strcmp(encoding_.GetName(), "GBK")) { ++ if (!strcasecmp(encoding_.GetName(), "gb18030")) ++ resultString.Replace(0xE5E5, ideographicSpaceCharacter); + // Make GBK compliant to the encoding spec and align with GB18030 +- resultString.replace(0x01F9, 0xE7C8); ++ resultString.Replace(0x01F9, 0xE7C8); + // FIXME: Once https://www.w3.org/Bugs/Public/show_bug.cgi?id=28740#c3 + // is resolved, add U+1E3F => 0xE7C7. + } +@@ -506,7 +507,7 @@ static void gbkCallbackEscape(const void* context, + ucnv_cbFromUWriteUChars(fromUArgs, &source, source + 1, 0, err); + return; + } +- numericEntityCallback(context, fromUArgs, codeUnits, length, codePoint, ++ NumericEntityCallback(context, fromUArgs, codeUnits, length, codePoint, + reason, err); + } + +@@ -525,7 +526,7 @@ static void gbkCssEscapedEntityCallack(const void* context, + ucnv_cbFromUWriteUChars(fromUArgs, &source, source + 1, 0, err); + return; + } +- cssEscapedEntityCallback(context, fromUArgs, codeUnits, length, codePoint, ++ CssEscapedEntityCallback(context, fromUArgs, codeUnits, length, codePoint, + reason, err); + return; + } +@@ -548,7 +549,7 @@ static void gbkUrlEscapedEntityCallack(const void* context, + ucnv_cbFromUWriteUChars(fromUArgs, &source, source + 1, 0, err); + return; + } +- urlEscapedEntityCallback(context, fromUArgs, codeUnits, length, codePoint, ++ UrlEscapedEntityCallback(context, fromUArgs, codeUnits, length, codePoint, + reason, err); + return; + } +@@ -622,7 +623,7 @@ CString TextCodecICU::EncodeInternal(const TextCodecInput& input, + 0, 0, &err); + #else + ucnv_setFromUCallBack( +- m_converterICU, m_needsGBKFallbacks ? gbkCallbackSubstitute ++ converter_icu_, m_needsGBKFallbacks ? gbkCallbackSubstitute + : UCNV_FROM_U_CALLBACK_SUBSTITUTE, + 0, 0, 0, &err); + #endif +@@ -633,8 +634,8 @@ CString TextCodecICU::EncodeInternal(const TextCodecInput& input, + &err); + #else + ucnv_setFromUCallBack( +- m_converterICU, +- m_needsGBKFallbacks ? gbkCallbackEscape : numericEntityCallback, 0, 0, ++ converter_icu_, ++ m_needsGBKFallbacks ? gbkCallbackEscape : NumericEntityCallback, 0, 0, + 0, &err); + #endif + break; +@@ -643,9 +644,9 @@ CString TextCodecICU::EncodeInternal(const TextCodecInput& input, + ucnv_setFromUCallBack(converter_icu_, UrlEscapedEntityCallback, 0, 0, 0, + &err); + #else +- ucnv_setFromUCallBack(m_converterICU, ++ ucnv_setFromUCallBack(converter_icu_, + m_needsGBKFallbacks ? gbkUrlEscapedEntityCallack +- : urlEscapedEntityCallback, ++ : UrlEscapedEntityCallback, + 0, 0, 0, &err); + #endif + break; +@@ -654,9 +655,9 @@ CString TextCodecICU::EncodeInternal(const TextCodecInput& input, + ucnv_setFromUCallBack(converter_icu_, CssEscapedEntityCallback, 0, 0, 0, + &err); + #else +- ucnv_setFromUCallBack(m_converterICU, ++ ucnv_setFromUCallBack(converter_icu_, + m_needsGBKFallbacks ? gbkCssEscapedEntityCallack +- : cssEscapedEntityCallback, ++ : CssEscapedEntityCallback, + 0, 0, 0, &err); + #endif + break; |