Why are there build flags for these...?
I'm not sure, but possibly they require relatively new ICU APIs.
(In reply to Ms2ger from comment #2)
> I'm not sure, but possibly they require relatively new ICU APIs.
Sounds like this is the case. It's OK to enable the new stuff when a new ICU is available at build time, but we have to continue supporting older ICU as well.
I suggest ENABLE_INTL_NUMBER_FORMAT_TO_PARTS and ENABLE_INTL_PLURAL_RULES should be removed and replaced with appropriate ICU_MAJOR_VERSION checks. I assume we surely want these enabled if ICU is new enough, right?
Because these are new web-visible APIs, I was told they need to be behind flags. There are some additional guards around ICU version like:
#define HAVE_ICU_FORMAT_DOUBLE_FOR_FIELDS (U_ICU_VERSION_MAJOR_NUM >= 59)
#define JSC_ICU_HAS_PLURALRULES_KEYWORDS (U_ICU_VERSION_MAJOR_NUM >= 59)
#define JSC_ICU_HAS_PLURALRULES_WITH_FORMAT (U_ICU_VERSION_MAJOR_NUM >= 59)
Looking at them, the pluralrules ones should have been like the format_double one.
The default enabling looks like:
#if ENABLE(INTL_NUMBER_FORMAT_TO_PARTS) && (!PLATFORM(COCOA) || ENABLE(EXPERIMENTAL_FEATURES))
#if ENABLE(INTL_PLURAL_RULES) && (!PLATFORM(COCOA) || ENABLE(EXPERIMENTAL_FEATURES))
Because the additional guards are in place, I think GTK could enable the INTL_ flags. NumberFormat.formatToParts will only be available if compiled with newer ICU, and PluralRules will only work in basic use cases without newer ICU.
Not enabling them quite yet, but after bug #188081, there's no longer anything GTK/WPE-specific needed to enable them, just two #if ENABLE(EXPERIMENTAL_FEATURES) guards that need to be removed.