-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION (Safari 17.2): Does not respect mousemove events in an ifr…
…ame when the mouse is clicked from outside of an iframe https://bugs.webkit.org/show_bug.cgi?id=269886 rdar://120540148 Reviewed by Wenson Hsieh. In 269246@main, we introduced a behavior change where initiating a drag gesture from a cancelled mousedown event causes all mousemove events to be routed to the originating frame till the drag gesture terminates with a corresponding mouseup event. This was a web compatibility regression since users expect to receive mouse events in the inner frame when we are dragging the pointer over it. Instead, this patch limits this mouse event target capturing behavior to subframes only, and not the outer frame. This patch makes mouse event targets independent of mousedown event cancellation when the pointer is dragged out of a subframe. This change in behavior aligns us with other major browser vendors' behavior. Finally, we update cancel-mousedown-and-drag-to-frame.html since the new behavior is essentially the opposite of what the test had been expecting. * LayoutTests/fast/events/cancel-mousedown-and-drag-from-frame-to-other-frame.html: * LayoutTests/fast/events/cancel-mousedown-and-drag-to-frame-expected.txt: * LayoutTests/fast/events/cancel-mousedown-and-drag-to-frame.html: * LayoutTests/fast/events/resources/mouse-drag-from-frame-target-subframe.html: * Source/WebCore/page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): Canonical link: https://commits.webkit.org/275157@main
- Loading branch information
Showing
5 changed files
with
24 additions
and
42 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
LayoutTests/fast/events/resources/mouse-drag-from-frame-target-subframe.html
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,3 +1,3 @@ | ||
<body onmousemove="parent.log('Received unexpected mousemove'); parent.unexpectedMouseMove = true;" onmouseup="parent.log('Received unexpected mouseup'); parent.unexpectedMouseUp = true;"> | ||
<body onmousemove="parent.log('Subframe received mousemove event'); parent.mouseMoveInOtherFrame = true;" onmouseup="parent.log('Subframe received mouseup event'); parent.mouseUpInOtherFrame = true;"> | ||
|
||
</body> |
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