зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1763783 - Part 10: Remove no longer needed workarounds for ICU-21154 and ICU-21155. r=platform-i18n-reviewers,jfkthame
ICU-21154 and ICU-21155 have been fixed in ICU 71, so we can remove this workaround. Depends on D143282 Differential Revision: https://phabricator.services.mozilla.com/D143283
This commit is contained in:
Родитель
7ba32fa08e
Коммит
86c5ec0c11
|
@ -419,8 +419,7 @@ class DateTimeFormat final {
|
|||
* plan to remove it.
|
||||
*/
|
||||
template <typename B>
|
||||
ICUResult GetOriginalSkeleton(B& aBuffer,
|
||||
Maybe<HourCycle> aHourCycle = Nothing()) {
|
||||
ICUResult GetOriginalSkeleton(B& aBuffer) {
|
||||
static_assert(std::is_same_v<typename B::CharType, char16_t>);
|
||||
if (mOriginalSkeleton.length() == 0) {
|
||||
// Generate a skeleton from the resolved pattern, there was no originally
|
||||
|
@ -436,10 +435,6 @@ class DateTimeFormat final {
|
|||
if (!FillBuffer(mOriginalSkeleton, aBuffer)) {
|
||||
return Err(ICUError::OutOfMemory);
|
||||
}
|
||||
if (aHourCycle) {
|
||||
DateTimeFormat::ReplaceHourSymbol(Span(aBuffer.data(), aBuffer.length()),
|
||||
*aHourCycle);
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -1335,9 +1335,7 @@ static mozilla::intl::DateIntervalFormat* NewDateIntervalFormat(
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// Determine the hour cycle used in the resolved pattern. This is needed to
|
||||
// workaround <https://unicode-org.atlassian.net/browse/ICU-21154> and
|
||||
// <https://unicode-org.atlassian.net/browse/ICU-21155>.
|
||||
// Determine the hour cycle used in the resolved pattern.
|
||||
mozilla::Maybe<mozilla::intl::DateTimeFormat::HourCycle> hcPattern =
|
||||
mozilla::intl::DateTimeFormat::HourCycleFromPattern(pattern);
|
||||
|
||||
|
@ -1357,7 +1355,7 @@ static mozilla::intl::DateIntervalFormat* NewDateIntervalFormat(
|
|||
mozilla::Span<const char16_t> timeZoneChars = timeZone.twoByteRange();
|
||||
|
||||
FormatBuffer<char16_t, intl::INITIAL_CHAR_BUFFER_SIZE> skeleton(cx);
|
||||
auto skelResult = mozDtf.GetOriginalSkeleton(skeleton, hcPattern);
|
||||
auto skelResult = mozDtf.GetOriginalSkeleton(skeleton);
|
||||
if (skelResult.isErr()) {
|
||||
intl::ReportInternalError(cx, skelResult.unwrapErr());
|
||||
return nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче