We realized full stand-alone month names were necessary for input[type=month] UI in addition to short stand-alone month names.
Created attachment 169841 [details] Patch
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();
Committed r132170: <http://trac.webkit.org/changeset/132170>
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; }