Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2f785577a3363c8fa048b02413e926b1fcc45ccb
      
https://github.com/WebKit/WebKit/commit/2f785577a3363c8fa048b02413e926b1fcc45ccb
  Author: Franco Vieira de Souza <[email protected]>
  Date:   2025-10-17 (Fri, 17 Oct 2025)

  Changed paths:
    M Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp
    M Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.h
    M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

  Log Message:
  -----------
  [ safaridriver ] dblclick not being issued
https://bugs.webkit.org/show_bug.cgi?id=299551
rdar://161399867

Reviewed by BJ Burg.

Simulated MouseUps and MouseDowns through WebDriver now contain the
correct value for clickCount, triggering the doubleclick detection
downstream. This required a code change to make sure m_clickCount
always has the correct value.

This patch introduces m_lastPosition and updateLastPosition() to
decouple mouse delta calculation and multiple click detection.
Previously, m_lastClickPosition and updateClickCount() were overloaded,
being used to detect multiple clicks on GTK and to calculate mouse
deltas on Mac. On Mac, updateClickCount() had to be called on every
simulated mouse event (instead of only on mousedowns), which would
result in a clobbered m_clickCount.

This patch causes the following tests to pass:

* wpt/event-timing/dblclick.html
* 
wpt/tests/classic/perform_actions/pointer_dblclick.py::test_dblclick_at_coordinates[0]
* 
wpt/tests/classic/perform_actions/pointer_dblclick.py::test_dblclick_at_coordinates[200]
* 
wpt/tests/classic/perform_actions/pointer_pause_dblclick.py::test_dblclick_with_pause_after_second_pointerdown

This is a do-over of 300900@main, which was reverted because it broke
the following:

* wpt/tests/classic/perform_actions/pointer_pause_dblclick.py::test_no_dblclick 
:
    broke because the doubleclick delay was too large; fixed by changing
    the default delay from 1s to 500ms. (test exercises 640ms)
* 
wpt/tests/classic/release_actions/sequence.py::test_release_mouse_sequence_resets_dblclick_state[with
 release actions]
* 
wpt/tests/classic/release_actions/sequence.py::test_release_mouse_sequence_resets_dblclick_state[without
 release actions] :
    enforce that safaridriver doesn't issue double clicks when each click
    happens in a separate action chain. These are confusingly named - the
    presence of the release action is irrelevant to the expected output. See
    https://github.com/w3c/webdriver/issues/1772 for ongoing discussion.
    Were fixed by the addition of WebAutomationSession::clearDoubleClicks(),
    which is called on SimulatedInputDispatcher::finishDispatching()

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to