Bug 213869

Summary: [JSC] Intl.Collator should set usage:"search" option through ICU locale
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 213425    
Attachments:
Description Flags
Patch
none
Patch
ross.kirsling: review+
Patch for landing
none
Patch for landing none

Description Yusuke Suzuki 2020-07-01 19:09:03 PDT
[JSC] Intl.Collator should set usage:"search" option through ICU locale
Comment 1 Yusuke Suzuki 2020-07-01 19:11:32 PDT
Created attachment 403337 [details]
Patch
Comment 2 Yusuke Suzuki 2020-07-01 19:23:38 PDT
Comment on attachment 403337 [details]
Patch

I'll add more handling for privateuse.
Comment 3 Yusuke Suzuki 2020-07-01 19:53:26 PDT
Created attachment 403339 [details]
Patch
Comment 4 Ross Kirsling 2020-07-01 19:55:57 PDT
Comment on attachment 403339 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=403339&action=review

LGTM

> JSTests/stress/intl-collator-co-extension.js:6
> +function shouldBeArray(actual, expected) {

I should do this more often...I've used JSON.stringify too much in our Intl tests, haha.
Comment 5 Yusuke Suzuki 2020-07-01 20:18:04 PDT
Comment on attachment 403339 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=403339&action=review

> Source/JavaScriptCore/runtime/IntlCollator.cpp:249
> +        dataLocaleWithExtensions = dataLocale.utf8();

I need to make it `m_locale.utf8()` since "co" option in usage:"sort" is effective.
Comment 6 Yusuke Suzuki 2020-07-01 20:21:21 PDT
Created attachment 403340 [details]
Patch for landing
Comment 7 Yusuke Suzuki 2020-07-01 20:49:01 PDT
Created attachment 403341 [details]
Patch for landing
Comment 8 Yusuke Suzuki 2020-07-01 22:56:19 PDT
ios and win failures are unrelated. Win failure is due to bad state of EWS (re-run of EWS is failing). ios thing is failing without this patch.
https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fcanvas%2F2d.gradient.radial.cone.bottom.html
Comment 9 Yusuke Suzuki 2020-07-01 23:00:44 PDT
Committed r263833: <https://trac.webkit.org/changeset/263833>
Comment 10 Radar WebKit Bug Importer 2020-07-01 23:01:23 PDT
<rdar://problem/65019917>