mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Implement the ToggleEvent.source attribute
See: https://github.com/whatwg/html/pull/11186
This commit is contained in:
Notes:
github-actions[bot]
2025-06-07 03:07:15 +00:00
Author: https://github.com/Gingeh Commit: https://github.com/LadybirdBrowser/ladybird/commit/fc35229dabc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5002 Reviewed-by: https://github.com/tcl3 ✅ Reviewed-by: https://github.com/trflynn89
@@ -223,9 +223,9 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
||||
// 9. If command is in the Hide Popover state:
|
||||
if (command == "hide-popover") {
|
||||
// 1. If the result of running check popover validity given target, true, false, and null is true,
|
||||
// then run the hide popover algorithm given target, true, true, and false.
|
||||
// then run the hide popover algorithm given target, true, true, false, and element.
|
||||
if (MUST(target->check_popover_validity(ExpectedToBeShowing::Yes, ThrowExceptions::No, nullptr, IgnoreDomState::No))) {
|
||||
MUST(target->hide_popover(FocusPreviousElement::Yes, FireEvents::Yes, ThrowExceptions::No, IgnoreDomState::No));
|
||||
MUST(target->hide_popover(FocusPreviousElement::Yes, FireEvents::Yes, ThrowExceptions::No, IgnoreDomState::No, this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,9 +238,9 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
||||
}
|
||||
|
||||
// 2. Otheriwse, if the result of running check popover validity given target, true, false, and null is true,
|
||||
// then run the hide popover algorithm given target, true, true, and false.
|
||||
// then run the hide popover algorithm given target, true, true, false and element.
|
||||
else if (MUST(target->check_popover_validity(ExpectedToBeShowing::Yes, ThrowExceptions::No, nullptr, IgnoreDomState::No))) {
|
||||
MUST(target->hide_popover(FocusPreviousElement::Yes, FireEvents::Yes, ThrowExceptions::No, IgnoreDomState::No));
|
||||
MUST(target->hide_popover(FocusPreviousElement::Yes, FireEvents::Yes, ThrowExceptions::No, IgnoreDomState::No, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user