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/c/chromium/src/+/1773262 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by:Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#693074}
Showing
Please register or sign in to comment