Skip to content

Commit

Permalink
[popover] Adjust showPopover
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258800

Reviewed by Tim Nguyen.

Adjust to spec change:
whatwg/html#9439

There should be no behavior change that can be tested.

* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::showPopover):

Canonical link: https://commits.webkit.org/265734@main
  • Loading branch information
rwlbuis committed Jul 3, 2023
1 parent d131b55 commit 4230d97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/WebCore/html/HTMLElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1349,15 +1349,15 @@ void HTMLElement::queuePopoverToggleEventTask(PopoverVisibilityState oldState, P

ExceptionOr<void> HTMLElement::showPopover(const HTMLFormControlElement* invoker)
{
if (popoverData())
popoverData()->setInvoker(invoker);

auto check = checkPopoverValidity(*this, PopoverVisibilityState::Hidden);
if (check.hasException())
return check.releaseException();
if (!check.returnValue())
return { };

if (popoverData())
popoverData()->setInvoker(invoker);

ASSERT(!isInTopLayer());

PopoverData::ScopedStartShowingOrHiding showOrHidingPopoverScope(*this);
Expand Down

0 comments on commit 4230d97

Please sign in to comment.