Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0bd9e48790d43285feb2f971e6b5ae12dc290fc8
      
https://github.com/WebKit/WebKit/commit/0bd9e48790d43285feb2f971e6b5ae12dc290fc8
  Author: Rob Buis <[email protected]>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html
    M 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt
    M 
LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/PopoverData.h
    M Source/WebCore/html/HTMLElement.cpp

  Log Message:
  -----------
  [popover] Prevent hidePopover from causing a recursive loop
https://bugs.webkit.org/show_bug.cgi?id=256379

Reviewed by Tim Nguyen.

Fix hideAllPopoversUntil for the case where hiding an auto popover changes the 
auto popover
list (through beforetoggle) so the same auto popover is on top, causing a loop. 
To fix this, when
this is detected, continue the loop without firing events.

See:
https://github.com/whatwg/html/pull/9198

* 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html:
* 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt:
* 
LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::topmostAutoPopover const):
(WebCore::Document::hideAllPopoversUntil):
* Source/WebCore/dom/PopoverData.h:
(WebCore::PopoverData::ScopedStartShowingOrHiding::ScopedStartShowingOrHiding):
(WebCore::PopoverData::ScopedStartShowingOrHiding::~ScopedStartShowingOrHiding):
(WebCore::PopoverData::ScopedStartShowingOrHiding::wasShowingOrHiding const):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::showPopover):
(WebCore::HTMLElement::hidePopoverInternal):

Canonical link: https://commits.webkit.org/264623@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to