WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
185714
[GTK][WPE] Enable Intl API additions
https://bugs.webkit.org/show_bug.cgi?id=185714
Summary
[GTK][WPE] Enable Intl API additions
Ms2ger (he/him; ⌚ UTC+1/+2)
Reported
2018-05-17 01:15:21 PDT
In particular: * ENABLE_INTL_NUMBER_FORMAT_TO_PARTS * ENABLE_INTL_PLURAL_RULES
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2018-05-17 08:22:58 PDT
Why are there build flags for these...?
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 2
2018-05-17 08:25:24 PDT
I'm not sure, but possibly they require relatively new ICU APIs.
Michael Catanzaro
Comment 3
2018-05-19 09:19:33 PDT
(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.
Michael Catanzaro
Comment 4
2018-05-21 07:54:08 PDT
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?
Andy VanWagoner
Comment 5
2018-07-26 08:45:12 PDT
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) #if HAVE(ICU_FORMAT_DOUBLE_FOR_FIELDS) #if JSC_ICU_HAS_PLURALRULES_KEYWORDS #if JSC_ICU_HAS_PLURALRULES_WITH_FORMAT 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.
Michael Catanzaro
Comment 6
2018-07-26 21:40:28 PDT
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.
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