WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99963
Introduce Localizer::standAloneMonthLabels
https://bugs.webkit.org/show_bug.cgi?id=99963
Summary
Introduce Localizer::standAloneMonthLabels
Kent Tamura
Reported
2012-10-22 00:24:25 PDT
We realized full stand-alone month names were necessary for input[type=month] UI in addition to short stand-alone month names.
Attachments
Patch
(22.91 KB, patch)
2012-10-22 00:52 PDT
,
Kent Tamura
haraken
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-10-22 00:52:05 PDT
Created
attachment 169841
[details]
Patch
Kentaro Hara
Comment 2
2012-10-22 05:53:19 PDT
Comment on
attachment 169841
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169841&action=review
> Source/WebCore/platform/text/LocaleICU.cpp:334 > + if (m_monthLabels)
This should be: if (!m_monthLabels.isEmpty())
> Source/WebCore/platform/text/LocaleICU.cpp:343 > + if (!initializeShortDateFormat()) { > + m_monthLabels = createFallbackMonthLabels(); > + return *m_monthLabels; > + } > + m_monthLabels = createLabelVector(m_shortDateFormat, UDAT_MONTHS, UCAL_JANUARY, 12); > + if (m_monthLabels) > + return *m_monthLabels; > + m_monthLabels = createFallbackMonthLabels();
Just like LocaleICU::standAloneMonthLabels(), I would prefer: if (initializeShortDateFormat()) { if (OwnPtr<Vector<String> > labels = createLabelVector(m_shortDateFormat, UDAT_MONTHS, UCAL_JANUARY, 12)) { m_monthLabels = labels; return *m_monthLabels; } } m_monthLabels = createFallbackMonthLabels();
Kent Tamura
Comment 3
2012-10-22 18:22:58 PDT
Committed
r132170
: <
http://trac.webkit.org/changeset/132170
>
Kent Tamura
Comment 4
2012-10-22 18:24:47 PDT
Comment on
attachment 169841
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169841&action=review
>> Source/WebCore/platform/text/LocaleICU.cpp:343 >> + m_monthLabels = createFallbackMonthLabels(); > > Just like LocaleICU::standAloneMonthLabels(), I would prefer: > > if (initializeShortDateFormat()) { > if (OwnPtr<Vector<String> > labels = createLabelVector(m_shortDateFormat, UDAT_MONTHS, UCAL_JANUARY, 12)) { > m_monthLabels = labels; > return *m_monthLabels; > } > } > m_monthLabels = createFallbackMonthLabels();
ok. Because m_monthLabels is OwnPtr and I'd like to minimize the change, I have changed this function as follows: { if (m_monthLabels) return *m_monthLabels; if (initializeShortDateFormat()) { m_monthLabels = createLabelVector(m_shortDateFormat, UDAT_MONTHS, UCAL_JANUARY, 12); if (m_monthLabels) return *m_monthLabels; } m_monthLabels = createFallbackMonthLabels(); return *m_monthLabels; }
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug