[wpt-sync] Sync PR 18778 - Allow strings containing '.' after sign (ex: -.8) in Decimal::FromString.
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 18778 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/18778
Details from upstream follow.
Matthieu Rigolot <matthieu.rigolot@gmail.com> wrote:
Allow strings containing '.' after sign (ex: -.8) in Decimal::FromString.
Entering those strings in a \<input type=number> leads to validation messages not being displayed in certain cases:
- rangeUnderflow (bug985330)
- rangeOverflow
- stepMisMatch
This is due to Decimal::FromString not recognizing it as valid, hence returning NaN incorrectly. decimal.h and the spec:
https://html.spec.whatwg.org/#valid-floating-point-number say it should be supported.Fixes it and adds appropriate tests in wtf_unittests and in web_tests.
Bug: 985330
Change-Id: Ic3a3bb1ca855ebcc13f96aac16c31937a2cba0cd
Reviewed-on: https://chromium-review.googlesource.com/1773262
WPT-Export-Revision: 41867d780cca9251acafb7b0ac69edc7aa97d1f5
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Comment 3•6 years ago
|
||
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
Comment 8•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/900e5bcf83a2
https://hg.mozilla.org/mozilla-central/rev/a89d33b022f6
Description
•