LibWeb: Follow spec steps to set the selectionDirection attribute value

(cherry picked from commit d0b97873d421d092eb41e3b7a7d8959347b3b436)
This commit is contained in:
Tim Ledbetter
2024-10-04 12:12:39 +01:00
committed by Nico Weber
parent 48ce92598d
commit 05e8835555
10 changed files with 68 additions and 4 deletions

View File

@@ -329,9 +329,10 @@ String HTMLTextAreaElement::selection_direction_binding() const
return selection_direction().value();
}
void HTMLTextAreaElement::set_selection_direction_binding(String direction)
void HTMLTextAreaElement::set_selection_direction_binding(String const& direction)
{
set_selection_direction(direction);
// NOTE: The selectionDirection setter never returns an error for textarea elements.
MUST(static_cast<FormAssociatedTextControlElement&>(*this).set_selection_direction_binding(direction));
}
void HTMLTextAreaElement::create_shadow_tree_if_needed()