mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Add PopOverInvokerElement and use it in HTMLButtonElement
The popoverTargetElement seems to be one of the only cases of a reflected Element? attribute in the HTML spec, the behaviour of which is specified in section 2.6.1. Buttons can't actually toggle popovers yet because showing/hiding popovers is not implemented yet.
This commit is contained in:
committed by
Tim Ledbetter
parent
158acabd21
commit
a276cf2d5e
Notes:
github-actions[bot]
2024-12-12 17:12:26 +00:00
Author: https://github.com/nbvdkamp Commit: https://github.com/LadybirdBrowser/ladybird/commit/a276cf2d5e8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2542 Reviewed-by: https://github.com/tcl3 ✅
@@ -9,6 +9,7 @@
|
||||
#include <LibWeb/ARIA/Roles.h>
|
||||
#include <LibWeb/HTML/FormAssociatedElement.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
#include <LibWeb/HTML/PopoverInvokerElement.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
@@ -19,7 +20,8 @@ namespace Web::HTML {
|
||||
|
||||
class HTMLButtonElement final
|
||||
: public HTMLElement
|
||||
, public FormAssociatedElement {
|
||||
, public FormAssociatedElement
|
||||
, public PopoverInvokerElement {
|
||||
WEB_PLATFORM_OBJECT(HTMLButtonElement, HTMLElement);
|
||||
GC_DECLARE_ALLOCATOR(HTMLButtonElement);
|
||||
FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLButtonElement)
|
||||
@@ -73,6 +75,8 @@ public:
|
||||
virtual void activation_behavior(DOM::Event const&) override;
|
||||
|
||||
private:
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
virtual bool is_html_button_element() const override { return true; }
|
||||
|
||||
HTMLButtonElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
Reference in New Issue
Block a user