Closed Bug 1715892 Opened 4 years ago Closed 4 years ago

Unify the intl/locale/DateTimeFormat API into the intl/components/DateTimeFormat

Categories

(Core :: Internationalization, task, P2)

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

Details

(Whiteboard: [i18n-unification])

Attachments

(4 files)

Currently there is an existing implementation of a DateTimeFormat API here:

https://searchfox.org/mozilla-central/source/intl/locale/DateTimeFormat.cpp

However the new unified API is here:

https://searchfox.org/mozilla-central/source/intl/components/src/DateTimeFormat.h

The intl/locale API should be migrated to use the unified component.

Blocks: 1719664

I'm setting this as depends on Bug 1719696, since it'll be easier to write the new components bag abstraction first, rather than migrate it here too.

Depends on: 1719696

Here are a list of the call sites:

  layout/build/nsLayoutStatics.cpp
      DateTimeFormat::Shutdown();

  layout/generic/nsPageSequenceFrame.cpp
      DateTimeFormat::FormatPRTime (length bag)

  netwerk/streamconv/converters/nsIndexedToHTML.cpp
      DateTimeFormat::FormatPRExplodedTime (length bag)

  security/manager/ssl/TransportSecurityInfo.cpp
      Unused import

  security/manager/ssl/X509CertValidity.h
  security/manager/ssl/X509CertValidity.cpp
      DateTimeFormat::FormatPRExplodedTime

  security/manager/ssl/nsNSSCertHelper.cpp
      Unused import

  toolkit/components/places/nsNavHistory.cpp
      DateTimeFormat::GetCalendarSymbol - (components bag)
      DateTimeFormat::FormatDateTime - (components bag)
Blocks: 1722542
No longer blocks: 1719664
Depends on: 1719462
Whiteboard: [i18n-unification]
Assignee: nobody → gtatum

I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Depends on D131670

Attachment #9251638 - Attachment description: WIP: Bug 1715892 - Add a buffer adapter for nsTString → Bug 1715892 - Add a buffer adapter for nsTString
Attachment #9251638 - Attachment description: Bug 1715892 - Add a buffer adapter for nsTString → WIP: Bug 1715892 - Add a buffer adapter for nsTString
Attachment #9251638 - Attachment description: WIP: Bug 1715892 - Add a buffer adapter for nsTString → Bug 1715892 - Add a buffer adapter for nsTString; r?#platform-i18n-reviewers!

This will not build, but will provide a better diff for the changes.

Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c328b84285f Add a buffer adapter for nsTString; r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/4c15d1a24ccd Naively rename intl/locale/DateTimeFormat to AppDateTimeFormat; r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/9105fe01c025 Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/196952bd8c9c Add thread safety notice and asserts for AppDateTimeFormat; r=platform-i18n-reviewers,dminor

Backed out 6 changesets (Bug 1715892, Bug 1719735) for causing bc test failures.
Backout link
Push with failures
Failure Log

Flags: needinfo?(gtatum)
Flags: needinfo?(gtatum)
Backout by mlaza@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/15c1262d6e8f Backed out 6 changesets (bug 1715892, bug 1719735) for causing bc test failures. CLOSED TREE
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/203d028cf6cd Add a buffer adapter for nsTString; r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/feb36495c198 Naively rename intl/locale/DateTimeFormat to AppDateTimeFormat; r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/b7eb41176fd5 Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/602bc2679cb9 Add thread safety notice and asserts for AppDateTimeFormat; r=platform-i18n-reviewers,dminor
Blocks: 1743929
Regressions: 1749017
Regressions: 1752223
Regressions: 1754217
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: