LibWeb: Send InputEvent with right .inputType on insert and delete

Applies to `<input>` and `<textarea>`. Editing commands in
`contenteditable` already sent the right events and input types.

Fixes #7668
This commit is contained in:
Jelle Raaijmakers
2026-01-29 09:54:27 +01:00
committed by Jelle Raaijmakers
parent c9108a2ad5
commit e05503dbcb
Notes: github-actions[bot] 2026-02-06 10:55:26 +00:00
12 changed files with 133 additions and 58 deletions

View File

@@ -234,7 +234,7 @@ public:
Optional<String> selection_direction_binding() { return selection_direction(); }
// ^FormAssociatedTextControlElement
virtual void did_edit_text_node() override;
virtual void did_edit_text_node(FlyString const& input_type) override;
virtual GC::Ptr<DOM::Text> form_associated_element_to_text_node() override { return m_text_node; }
// https://html.spec.whatwg.org/multipage/input.html#has-a-periodic-domain/
@@ -329,7 +329,7 @@ private:
void handle_maxlength_attribute();
WebIDL::ExceptionOr<void> handle_src_attribute(String const& value);
void user_interaction_did_change_input_value();
void user_interaction_did_change_input_value(FlyString const& input_type = {});
// https://html.spec.whatwg.org/multipage/input.html#value-sanitization-algorithm
Utf16String value_sanitization_algorithm(Utf16String const&) const;