mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibJS+LibWeb: Rename number_to_string to number_to_deprecated_string
This commit is contained in:
committed by
Linus Groh
parent
c79d20be58
commit
8a88d4434f
Notes:
sideshowbarker
2024-07-17 06:51:40 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/8a88d4434f Pull-request: https://github.com/SerenityOS/serenity/pull/17014 Reviewed-by: https://github.com/linusg ✅
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user