[webkit-changes] [WebKit/WebKit] c2dd7b: Fix a bug that mousedown without mouseup in a fram...

Ahmad Saleem noreply at github.com
Sat Dec 17 14:56:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c2dd7ba9890874670b16f914a46afb7c420da9ce
      https://github.com/WebKit/WebKit/commit/c2dd7ba9890874670b16f914a46afb7c420da9ce
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2022-12-17 (Sat, 17 Dec 2022)

  Changed paths:
    A LayoutTests/fast/events/click-after-mousedown-cancel-expected.txt
    A LayoutTests/fast/events/click-after-mousedown-cancel.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/page/EventHandler.cpp

  Log Message:
  -----------
  Fix a bug that mousedown without mouseup in a frame disturbs click event in another frame

Fix a bug that mousedown without mouseup in a frame disturbs click event in another frame
https://bugs.webkit.org/show_bug.cgi?id=119305

Reviewed by Ryosuke Niwa.

Merge - https://src.chromium.org/viewvc/blink?revision=154698&view=revision

If a mouse button is clicked but mouseup event for it is not dispatched (it happens
frequently because of context menus) and mousedown in another frame is default-prevented,
'click' event for the latter mouse click is not dispatched.

EventHandler::handleMousePressEvent wrongly continues to hold a node for the first click,
and it prevents hit-testing for the second click. We should always clear
m_capturingMouseEventsElement in mousedown handling code.

* Source/WebCore/page/EventHandler.cpp:
(EventHandler::handleMousePressEvent): Add condition to return "nullptr"
* LayoutTests/fast/events/click-after-mousedown-cancel.html: Add Test Case
* LayoutTests/fast/events/click-after-mousedown-cancel-expected.txt: Add Test Case Expectation
* LayoutTests/platform/ios/TestExpectations: Updated to skip added test on iOS due to lack of mouse event support

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




More information about the webkit-changes mailing list