Skip to content

Commit 07e1827

Browse files
committed
Crash under WebAutomationSession::platformSimulateMouseInteraction when running pointerevents/pointerevent_click_during_capture.html?mouse-auxclick WPT
https://bugs.webkit.org/show_bug.cgi?id=280768 rdar://137068514 Reviewed by Aditya Keerthi and Abrar Rahman Protyasha. Abrar Protyasha determined that web-platform-test 'pointerevent_click_during_capture.html?mouse-auxclick' is crashing due to dragEventType not getting updated when a right click is simulated in WebAutomationSession::platformSimulateMouseInteraction. This causes an NSEvent instantiation with an NSEventType of 0, resulting in a crash. Adding this missing update fixes the test crash. * Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Canonical link: https://commits.webkit.org/284577@main
1 parent ba0327a commit 07e1827

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ static WebMouseEventButton automationMouseButtonToPlatformMouseButton(MouseButto
221221
break;
222222
case WebMouseEventButton::Right:
223223
downEventType = NSEventTypeRightMouseDown;
224+
dragEventType = NSEventTypeRightMouseDragged;
224225
upEventType = NSEventTypeRightMouseUp;
225226
break;
226227
}

0 commit comments

Comments
 (0)