forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[popover] event.preventDefault() should not cancel popover light dismiss
https://bugs.webkit.org/show_bug.cgi?id=254384 Reviewed by Tim Nguyen. Move light dismiss logic to PointerCaptureController::dispatchEvent so the event can't be cancelled, also see: whatwg/dom#1117 (comment) * LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/light-dismiss-event-ordering-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt: * Source/WebCore/dom/Document.cpp: (WebCore::Document::handlePopoverLightDismiss): * Source/WebCore/dom/Document.h: * Source/WebCore/dom/Node.cpp: (WebCore::Node::defaultEventHandler): * Source/WebCore/page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::pointerEventWillBeDispatched): Canonical link: https://commits.webkit.org/262283@main
- Loading branch information
Showing
7 changed files
with
35 additions
and
41 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
.../w3c/web-platform-tests/html/semantics/popovers/light-dismiss-event-ordering-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
target | ||
|
||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: pointerdown, capture: true | ||
FAIL Tests the interactions between popover light dismiss and pointer/mouse events. eventName: pointerup, capture: true assert_equals: The popover should be closed via light dismiss even when preventDefault is called. expected 0 but got 1 | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: pointerup, capture: true | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: mousedown, capture: true | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: mouseup, capture: true | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: click, capture: true | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: pointerdown, capture: false | ||
FAIL Tests the interactions between popover light dismiss and pointer/mouse events. eventName: pointerup, capture: false assert_equals: The popover should be closed via light dismiss even when preventDefault is called. expected 0 but got 1 | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: pointerup, capture: false | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: mousedown, capture: false | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: mouseup, capture: false | ||
PASS Tests the interactions between popover light dismiss and pointer/mouse events. eventName: click, capture: false | ||
FAIL Tests the order of pointer/mouse events during popover light dismiss. assert_array_equals: pointer and popover events should be fired in the correct order. expected property 2 to be "beforetoggle newState: closed" but got "pointerup" (expected array ["pointerdown", "mousedown", "beforetoggle newState: closed", "pointerup", "mouseup", "click"] got ["pointerdown", "mousedown", "pointerup", "beforetoggle newState: closed", "mouseup", "click"]) | ||
PASS Tests the order of pointer/mouse events during popover light dismiss. | ||
|
10 changes: 5 additions & 5 deletions
10
...mported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...mported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters