mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
![Emilio Cobos Álvarez](/assets/img/avatar_default.png)
Using the fast unlocalized parser first exposes a subtle difference between the ICU parser (which uses `double`), and Decimal::fromString (which has a larger range). Check for iee754 finiteness explicitly, matching our previous behavior, and the expectation of this subtest: https://searchfox.org/mozilla-central/rev/a3852ea8db25c759bc8b108aeec870d66c95452c/testing/web-platform/tests/html/semantics/forms/the-input-element/number.html#33 That check matches this Blink code: https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/blink/renderer/core/html/parser/html_parser_idioms.cc;l=103;drc=0d1bbe8de137aaae7c956a33249eb840a0191627 This patch avoids a bunch of number->string->number conversions in the common case where the value comes from the value attribute and thus parses fine without localization shenanigans. Differential Revision: https://phabricator.services.mozilla.com/D183254