Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(268459@main): PointerEvent pointerup
button
value does n…
…ot match pointerdown https://bugs.webkit.org/show_bug.cgi?id=267008 rdar://120429508 Reviewed by Wenson Hsieh. In 268459@main, we unified the cases where a pointer event's 'button' value would be '-1', i.e. indicating that buttons or touch/pen contact haven't changed since the last event. Unfortunately, this regressed a longstanding behavior of corresponding pointerup/pointerdown events having matching 'button' values. It turns out that we should hold off on our logic to produce the '-1' value until we've ensured that the pointerup/pointerdown case has been dealt with, and not the other way around. Furthermore, we should consult whether or not the pointer is pressed before producing the '-1' value. This patch fixes both of these logic errors, and introduces a WPT to protect against future regressions in this case. * LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown.html: Added. * Source/WebCore/page/PointerCaptureController.cpp: (WebCore::PointerCaptureController::pointerEventForMouseEvent): Canonical link: https://commits.webkit.org/273263@main
- Loading branch information