LibWeb/HTML: Correct button activation steps to use element not this

Corresponds to:
60c8816e32

Spec only, no code changes.
This commit is contained in:
Sam Atkins 2026-06-11 12:39:51 +01:00 committed by Shannon Booth
parent c60134158c
commit 7158294dfb

View file

@ -264,7 +264,7 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
// 8. Otherwise, if command is in the Toggle Popover state:
else if (command == "toggle-popover") {
// 1. If the result of running check popover validity given target, false, false, and null is true,
// then run the show popover algorithm given target, false, and this.
// then run the show popover algorithm given target, false, and element.
if (MUST(target_element->check_popover_validity(ExpectedToBeShowing::No, ThrowExceptions::No, nullptr, IgnoreDomState::No))) {
MUST(target_element->show_popover(ThrowExceptions::No, this));
}
@ -279,7 +279,7 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
// 9. Otherwise, if command is in the Show Popover state:
else if (command == "show-popover") {
// 1. If the result of running check popover validity given target, false, false, and null is true,
// then run the show popover algorithm given target, false, and this.
// then run the show popover algorithm given target, false, and element.
if (MUST(target_element->check_popover_validity(ExpectedToBeShowing::No, ThrowExceptions::No, nullptr, IgnoreDomState::No))) {
MUST(target_element->show_popover(ThrowExceptions::No, this));
}