[Webkit-unassigned] [Bug 214223] New: Intl.Locale.maximize() and Intl.Locale.minimize() are not spec compliant on iOS 14 Beta 2
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jul 11 10:40:10 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=214223
Bug ID: 214223
Summary: Intl.Locale.maximize() and Intl.Locale.minimize() are
not spec compliant on iOS 14 Beta 2
Product: WebKit
Version: Safari Technology Preview
Hardware: iPhone / iPad
OS: Other
Status: NEW
Severity: Blocker
Priority: P2
Component: New Bugs
Assignee: webkit-unassigned at lists.webkit.org
Reporter: wopian at wopian.me
Created attachment 404057
--> https://bugs.webkit.org/attachment.cgi?id=404057&action=review
Spec compliant output of Intl.Locale implemented properties/methods
The functions implemented in the Intl.Locale class do not function as expected in the iOS 14 Beta 2 version of Safari.
When no property is accessed it returns the locale using the toString function instead of a Locale instance (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).
When you attempt to get a property from what should be a regular Locale instance, it instead returns undefined instead of the property's expected value.
I came across this bug as I was polyfilling Intl.Locale for browsers that didn't support Intl.Locale in a feature release and it was suddenly breaking (used maximize().region) with these undefined return values for iOS users using our staging pre-release builds.
Example:
const locale = new Intl.Locale('en')
const max = locale.maximize().baseName// undefined in iOS 14 Dev 2. Correct behaviour is 'en-Latn-US'
const min = locale.minimize().baseName// undefined in iOS 14 Dev 2. Correct behaviour is 'en'
Example 2:
const locale = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h23-kf-lower-co-emoji-nu-jpan')
const max = locale.maximize()
// Returns 'ja-Jpan-JP-u-ca-japanese-hc-h23-kf-lower-co-emoji-nu-jpan' in iOS 14 Dev 2.
// Correct behaviour is returning a Locale object
Live Demo:
https://6f6bm.csb.app/
Attached is the spec compliant output and the iOS 14 Dev 2 output. This is identical on:
- Edge 83,
- Edge 85 (Dev),
- Chrome 83
- Chrome 86 (Canary)
- Firefox 78
- Firefox 79 (Developer)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200711/2f5f78c3/attachment.htm>
More information about the webkit-unassigned
mailing list