LibWeb: Clear textarea with empty string for WebDriver

The WebDriver clear handler for textarea elements sets the raw
value to child_text_content() instead of an empty string. This
is a copy-paste from the adjacent reset handler, which correctly
uses child_text_content() per its own spec. The clear spec says
"set the raw value of element to an empty string".
This commit is contained in:
Praise-Garfield
2026-02-13 09:58:21 +00:00
committed by Tim Flynn
parent 4a5746db10
commit 56287ca90f
Notes: github-actions[bot] 2026-02-13 20:30:29 +00:00
6 changed files with 30 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ void HTMLTextAreaElement::clear_algorithm()
m_dirty_value = false;
// and set the raw value of element to an empty string.
set_raw_value(child_text_content());
set_raw_value({});
// Unlike their associated reset algorithms, changes made to form controls as part of these algorithms do count as
// changes caused by the user (and thus, e.g. do cause input events to fire).