1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 11:34:59 +00:00

LibJS+LibWeb: Rename number_to_string to number_to_deprecated_string

This commit is contained in:
Timothy Flynn 2023-01-13 11:43:01 -05:00 committed by Linus Groh
parent c79d20be58
commit 8a88d4434f
5 changed files with 8 additions and 8 deletions

View file

@ -728,7 +728,7 @@ DeprecatedString HTMLInputElement::value_sanitization_algorithm(DeprecatedString
// https://html.spec.whatwg.org/multipage/input.html#range-state-(type=range):value-sanitization-algorithm
auto maybe_double = value.to_double(TrimWhitespace::Yes);
if (!maybe_double.has_value() || !isfinite(maybe_double.value()))
return JS::number_to_string(maybe_double.value_or(0));
return JS::number_to_deprecated_string(maybe_double.value_or(0));
} else if (type_state() == HTMLInputElement::TypeAttributeState::Color) {
// https://html.spec.whatwg.org/multipage/input.html#color-state-(type=color):value-sanitization-algorithm
// If the value of the element is a valid simple color, then set it to the value of the element converted to ASCII lowercase;