<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>185714</bug_id>
          
          <creation_ts>2018-05-17 01:15:21 -0700</creation_ts>
          <short_desc>[GTK][WPE] Enable Intl API additions</short_desc>
          <delta_ts>2018-07-26 21:40:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ms2ger (he/him; ⌚ UTC+1/+2)">Ms2ger</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andy</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1424636</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger (he/him; ⌚ UTC+1/+2)">Ms2ger</who>
    <bug_when>2018-05-17 01:15:21 -0700</bug_when>
    <thetext>In particular:

* ENABLE_INTL_NUMBER_FORMAT_TO_PARTS
* ENABLE_INTL_PLURAL_RULES</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424725</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-05-17 08:22:58 -0700</bug_when>
    <thetext>Why are there build flags for these...?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1424729</commentid>
    <comment_count>2</comment_count>
    <who name="Ms2ger (he/him; ⌚ UTC+1/+2)">Ms2ger</who>
    <bug_when>2018-05-17 08:25:24 -0700</bug_when>
    <thetext>I&apos;m not sure, but possibly they require relatively new ICU APIs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1425431</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-05-19 09:19:33 -0700</bug_when>
    <thetext>(In reply to Ms2ger from comment #2)
&gt; I&apos;m not sure, but possibly they require relatively new ICU APIs.

Sounds like this is the case. It&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1425644</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-05-21 07:54:08 -0700</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445429</commentid>
    <comment_count>5</comment_count>
    <who name="Andy VanWagoner">andy</who>
    <bug_when>2018-07-26 08:45:12 -0700</bug_when>
    <thetext>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 &gt;= 59)
#define JSC_ICU_HAS_PLURALRULES_KEYWORDS (U_ICU_VERSION_MAJOR_NUM &gt;= 59)
#define JSC_ICU_HAS_PLURALRULES_WITH_FORMAT (U_ICU_VERSION_MAJOR_NUM &gt;= 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) &amp;&amp; (!PLATFORM(COCOA) || ENABLE(EXPERIMENTAL_FEATURES))
#if ENABLE(INTL_PLURAL_RULES) &amp;&amp; (!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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445651</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-07-26 21:40:28 -0700</bug_when>
    <thetext>Not enabling them quite yet, but after bug #188081, there&apos;s no longer anything GTK/WPE-specific needed to enable them, just two #if ENABLE(EXPERIMENTAL_FEATURES) guards that need to be removed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>