mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Implement popover beforetoggle and toggle events
This commit is contained in:
committed by
Andrew Kaster
parent
872a6a11a4
commit
fcf6cc27f2
@@ -6,10 +6,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/GlobalEventHandlers.h>
|
||||
#include <LibWeb/HTML/HTMLOrSVGElement.h>
|
||||
#include <LibWeb/HTML/ToggleTaskTracker.h>
|
||||
#include <LibWeb/HTML/TokenizedFeatures.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
@@ -127,8 +129,6 @@ public:
|
||||
WebIDL::ExceptionOr<void> show_popover(ThrowExceptions throw_exceptions, GC::Ptr<HTMLElement> invoker);
|
||||
WebIDL::ExceptionOr<void> hide_popover(FocusPreviousElement focus_previous_element, FireEvents fire_events, ThrowExceptions throw_exceptions);
|
||||
|
||||
WebIDL::ExceptionOr<bool> check_popover_validity(ExpectedToBeShowing expected_to_be_showing, ThrowExceptions throw_exceptions, GC::Ptr<DOM::Document>);
|
||||
|
||||
protected:
|
||||
HTMLElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
@@ -155,6 +155,10 @@ private:
|
||||
|
||||
GC::Ptr<DOM::NodeList> m_labels;
|
||||
|
||||
WebIDL::ExceptionOr<bool> check_popover_validity(ExpectedToBeShowing expected_to_be_showing, ThrowExceptions throw_exceptions, GC::Ptr<DOM::Document>);
|
||||
|
||||
void queue_a_popover_toggle_event_task(String old_state, String new_state);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/custom-elements.html#attached-internals
|
||||
GC::Ptr<ElementInternals> m_attached_internals;
|
||||
|
||||
@@ -174,6 +178,9 @@ private:
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/popover.html#popover-showing-or-hiding
|
||||
bool m_popover_showing_or_hiding { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute:toggle-task-tracker
|
||||
Optional<ToggleTaskTracker> m_popover_toggle_task_tracker;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user