LibWeb: Selection toString focused text control delegation

Allows selected text in form controls to be copied to clipboard.
This commit is contained in:
Jonathan Gamble
2025-12-31 14:34:58 -06:00
committed by Shannon Booth
parent 451177f1f4
commit 7385569a02
Notes: github-actions[bot] 2026-01-02 17:41:12 +00:00
12 changed files with 140 additions and 4 deletions

View File

@@ -85,8 +85,9 @@ public:
WebIDL::ExceptionOr<void> set_value(Utf16String const&);
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-textarea/input-relevant-value
virtual Utf16String relevant_value() override { return value(); }
virtual Utf16String relevant_value() const override { return value(); }
WebIDL::ExceptionOr<void> set_relevant_value(Utf16String const& value) override { return set_value(value); }
virtual Optional<Utf16String> selected_text_for_stringifier() const override;
virtual void set_dirty_value_flag(bool flag) override { m_dirty_value = flag; }