LibWeb: Add HTMLElement::uses_button_layout()

This suits the spec a bit better, and exposes the fact that we were
allowing `::ImageButton` to use the button layout although it is never
specified that it should do so. Tests were rebaselined for this.
This commit is contained in:
Jelle Raaijmakers 2025-08-15 09:42:52 +02:00 committed by Sam Atkins
commit ff5f80a196
Notes: github-actions[bot] 2025-08-18 10:05:59 +00:00
8 changed files with 112 additions and 99 deletions

View file

@ -87,6 +87,9 @@ public:
GC::Ptr<DOM::Element> command_for_element() { return m_command_for_element; }
void set_command_for_element(GC::Ptr<DOM::Element> value) { m_command_for_element = value; }
// https://html.spec.whatwg.org/multipage/rendering.html#the-button-element-2:button-layout-2
virtual bool uses_button_layout() const override { return true; }
private:
virtual void visit_edges(Visitor&) override;