LibWeb: Support :placeholder-shown pseudo-class for textarea elements

Previously only input elements were matched. Add placeholder_value()
to HTMLTextAreaElement mirroring the HTMLInputElement API and update
both selector matching code paths to handle textarea.
This commit is contained in:
Praise-Garfield
2026-02-11 12:49:25 +00:00
committed by Jelle Raaijmakers
parent 933eee8284
commit ebd312689e
Notes: github-actions[bot] 2026-02-11 15:12:26 +00:00
6 changed files with 72 additions and 12 deletions

View File

@@ -135,6 +135,11 @@ public:
// https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element:concept-fe-mutable
virtual bool is_mutable() const override;
GC::Ptr<DOM::Element> placeholder_element() { return m_placeholder_element; }
GC::Ptr<DOM::Element const> placeholder_element() const { return m_placeholder_element; }
Optional<String> placeholder_value() const;
private:
HTMLTextAreaElement(DOM::Document&, DOM::QualifiedName);