LibWeb: Allow keyboard input to alter email inputs

Previously, the`HTMLInputElement.selectinStart` and
`HTMLInputElement.selectionEnd` IDL setters, and the
`setRangeText()` IDL method were used when updating an input's value
on keyboard input. These methods can't be used for this purpose,
since selection doesn't apply to email type inputs. Therefore, this
change introduces internal-use only methods that don't check whether
selection applies to the given input.
This commit is contained in:
Tim Ledbetter 2024-12-27 17:03:16 +00:00 committed by Andreas Kling
parent 79da6d48c1
commit db24440403
Notes: github-actions[bot] 2024-12-30 10:05:12 +00:00
8 changed files with 83 additions and 40 deletions

View file

@ -328,22 +328,22 @@ WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_rows(WebIDL::UnsignedLong row
WebIDL::UnsignedLong HTMLTextAreaElement::selection_start_binding() const
{
return selection_start().value();
return FormAssociatedTextControlElement::selection_start_binding().value();
}
WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_selection_start_binding(WebIDL::UnsignedLong const& value)
{
return set_selection_start(value);
return FormAssociatedTextControlElement::set_selection_start_binding(value);
}
WebIDL::UnsignedLong HTMLTextAreaElement::selection_end_binding() const
{
return selection_end().value();
return FormAssociatedTextControlElement::selection_end_binding().value();
}
WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_selection_end_binding(WebIDL::UnsignedLong const& value)
{
return set_selection_end(value);
return FormAssociatedTextControlElement::set_selection_end_binding(value);
}
String HTMLTextAreaElement::selection_direction_binding() const