[webkit-changes] [WebKit/WebKit] 4ed184: uievents/mouse/mousemove_prevent_default_action.te...
Abrar Rahman Protyasha
noreply at github.com
Mon Oct 16 12:06:29 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4ed18444c723b19ca7ad1608aae93ca245a38296
https://github.com/WebKit/WebKit/commit/4ed18444c723b19ca7ad1608aae93ca245a38296
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2023-10-16 (Mon, 16 Oct 2023)
Changed paths:
A LayoutTests/fast/text/canceled-mousemove-does-not-prevent-selectionchange-expected.txt
A LayoutTests/fast/text/canceled-mousemove-does-not-prevent-selectionchange.html
R LayoutTests/fast/text/selection-is-prevent-defaulted-expected.txt
R LayoutTests/fast/text/selection-is-prevent-defaulted.html
M LayoutTests/imported/w3c/web-platform-tests/uievents/mouse/mousemove_prevent_default_action.tentative-expected.txt
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac-wk1/TestExpectations
M LayoutTests/platform/wpe/TestExpectations
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/EventHandler.h
Log Message:
-----------
uievents/mouse/mousemove_prevent_default_action.tentative.html WPT is failing
https://bugs.webkit.org/show_bug.cgi?id=262878
rdar://116668701
Reviewed by Aditya Keerthi.
We failed uievents/mouse/mousemove_prevent_default_action.tentative.html
WPT because we were preventing selectionchange or dragstart from
happening on a cancelled mousemove event.
However, mousemove has no default action according to the UI Events spec:
http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mousemove. This
means that preventing the default action on mousemove should not prevent
selection/drag from happening.
To reflect this behavior change, we update the
CapturesDragging::InabilityReason enumeration with a new case --
MouseMoveIsCancelled. We consult m_capturesDragging for this failure
mode in EventHandler::handleMouseMoveEvent before passing a mousemove
event to EventHandler::handleMouseDraggedEvent, which is then
responsible for selection changes and drag operations.
* LayoutTests/fast/text/canceled-mousemove-does-not-prevent-selectionchange-expected.txt: Added.
* LayoutTests/fast/text/canceled-mousemove-does-not-prevent-selectionchange.html: Added.
* LayoutTests/fast/text/selection-is-prevent-defaulted-expected.txt: Removed.
* LayoutTests/fast/text/selection-is-prevent-defaulted.html: Removed.
Rename the layout test and make it more amenable to the fact that
selections happen in both cases now, then update expectations to reflect
our behavior change.
* LayoutTests/imported/w3c/web-platform-tests/uievents/mouse/mousemove_prevent_default_action.tentative-expected.txt:
Update our test expectations since we now pass the WPT partially.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::dispatchMouseEvent):
* Source/WebCore/page/EventHandler.h:
Canonical link: https://commits.webkit.org/269370@main
More information about the webkit-changes
mailing list