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
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

@ -60,11 +60,11 @@ interface HTMLInputElement : HTMLElement {
readonly attribute NodeList? labels;
undefined select();
attribute unsigned long? selectionStart;
attribute unsigned long? selectionEnd;
[ImplementedAs=selection_start_binding] attribute unsigned long? selectionStart;
[ImplementedAs=selection_end_binding] attribute unsigned long? selectionEnd;
[ImplementedAs=selection_direction_binding] attribute DOMString? selectionDirection;
undefined setRangeText(DOMString replacement);
undefined setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
[ImplementedAs=set_range_text_binding] undefined setRangeText(DOMString replacement);
[ImplementedAs=set_range_text_binding] undefined setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
undefined showPicker();