[webkit-changes] [WebKit/WebKit] 29875e: REGRESSION(268459 at main): PointerEvent pointerup `b...
Abrar Rahman Protyasha
noreply at github.com
Sat Jan 20 05:18:48 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 29875ec3a5944d06ac0ccdee2c3d0a32cd311a08
https://github.com/WebKit/WebKit/commit/29875ec3a5944d06ac0ccdee2c3d0a32cd311a08
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-01-20 (Sat, 20 Jan 2024)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown.html
M Source/WebCore/page/PointerCaptureController.cpp
Log Message:
-----------
REGRESSION(268459 at main): PointerEvent pointerup `button` value does not match pointerdown
https://bugs.webkit.org/show_bug.cgi?id=267008
rdar://120429508
Reviewed by Wenson Hsieh.
In 268459 at 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
More information about the webkit-changes
mailing list