Skip to content

Commit

Permalink
LibWeb: Fix typo: covert_number_to_string => convert_number_to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Apr 3, 2024
1 parent ffac32d commit fb263e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ Optional<double> HTMLInputElement::convert_string_to_number(StringView input) co
}

// https://html.spec.whatwg.org/multipage/input.html#concept-input-value-string-number
String HTMLInputElement::covert_number_to_string(double input) const
String HTMLInputElement::convert_number_to_string(double input) const
{
// https://html.spec.whatwg.org/multipage/input.html#number-state-(type=number):concept-input-value-number-string
if (type_state() == TypeAttributeState::Number)
Expand All @@ -1591,7 +1591,7 @@ String HTMLInputElement::covert_number_to_string(double input) const
if (type_state() == TypeAttributeState::Range)
return MUST(String::number(input));

dbgln("HTMLInputElement::covert_number_to_string() not implemented for input type {}", type());
dbgln("HTMLInputElement::convert_number_to_string() not implemented for input type {}", type());
return {};
}

Expand Down Expand Up @@ -1841,7 +1841,7 @@ WebIDL::ExceptionOr<void> HTMLInputElement::set_value_as_number(double value)
}

// Otherwise, run the algorithm to convert a number to a string, as defined for that state, on the new value, and set the value of the element to the resulting string.
TRY(set_value(covert_number_to_string(value)));
TRY(set_value(convert_number_to_string(value)));
return {};
}

Expand Down Expand Up @@ -1932,7 +1932,7 @@ WebIDL::ExceptionOr<void> HTMLInputElement::step_up_or_down(bool is_down, WebIDL

// 11. Let value as string be the result of running the algorithm to convert a number to a string,
// as defined for the input element's type attribute's current state, on value.
auto value_as_string = covert_number_to_string(value);
auto value_as_string = convert_number_to_string(value);

// 12. Set the value of the element to value as string.
TRY(set_value(value_as_string));
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/HTML/HTMLInputElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class HTMLInputElement final
virtual void visit_edges(Cell::Visitor&) override;

Optional<double> convert_string_to_number(StringView input) const;
String covert_number_to_string(double input) const;
String convert_number_to_string(double input) const;

WebIDL::ExceptionOr<JS::GCPtr<JS::Date>> convert_string_to_date(StringView input) const;
String covert_date_to_string(JS::NonnullGCPtr<JS::Date> input) const;
Expand Down

0 comments on commit fb263e2

Please sign in to comment.