mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Ignore DOM state when hiding removed popovers
Using https://github.com/whatwg/html/pull/9457 (with some changes made to catch up with the current spec) to fix a spec bug and a crash when removing a visible popover.
This commit is contained in:
parent
108f3a9aac
commit
e670caeb0c
Notes:
github-actions[bot]
2025-01-30 22:49:36 +00:00
Author: https://github.com/Gingeh
Commit: e670caeb0c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3285
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
5 changed files with 51 additions and 32 deletions
|
@ -60,6 +60,11 @@ enum class ExpectedToBeShowing {
|
|||
No,
|
||||
};
|
||||
|
||||
enum class IgnoreDomState {
|
||||
Yes,
|
||||
No,
|
||||
};
|
||||
|
||||
class HTMLElement
|
||||
: public DOM::Element
|
||||
, public HTML::GlobalEventHandlers
|
||||
|
@ -131,9 +136,9 @@ public:
|
|||
WebIDL::ExceptionOr<void> hide_popover_for_bindings();
|
||||
WebIDL::ExceptionOr<bool> toggle_popover(TogglePopoverOptionsOrForceBoolean const&);
|
||||
|
||||
WebIDL::ExceptionOr<bool> check_popover_validity(ExpectedToBeShowing expected_to_be_showing, ThrowExceptions throw_exceptions, GC::Ptr<DOM::Document>);
|
||||
WebIDL::ExceptionOr<bool> check_popover_validity(ExpectedToBeShowing expected_to_be_showing, ThrowExceptions throw_exceptions, GC::Ptr<DOM::Document>, IgnoreDomState ignore_dom_state);
|
||||
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<void> hide_popover(FocusPreviousElement focus_previous_element, FireEvents fire_events, ThrowExceptions throw_exceptions, IgnoreDomState ignore_dom_state);
|
||||
|
||||
protected:
|
||||
HTMLElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue