From 4230d97f23d2a6d2ed4e2b3ad923384efaea1e51 Mon Sep 17 00:00:00 2001 From: Rob Buis Date: Mon, 3 Jul 2023 14:15:49 -0700 Subject: [PATCH] [popover] Adjust showPopover https://bugs.webkit.org/show_bug.cgi?id=258800 Reviewed by Tim Nguyen. Adjust to spec change: https://github.com/whatwg/html/pull/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 --- Source/WebCore/html/HTMLElement.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/WebCore/html/HTMLElement.cpp b/Source/WebCore/html/HTMLElement.cpp index f6bab74abf6b4..8dfd40d59d1f2 100644 --- a/Source/WebCore/html/HTMLElement.cpp +++ b/Source/WebCore/html/HTMLElement.cpp @@ -1349,15 +1349,15 @@ void HTMLElement::queuePopoverToggleEventTask(PopoverVisibilityState oldState, P ExceptionOr 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);