Commit f0af1da
committed
[WPEPlatform] Page scrolls at double speed when scrolling with two fingers
https://bugs.webkit.org/show_bug.cgi?id=308643
Reviewed by Carlos Garcia Campos.
When scrolling begins with one finger and a second finger is placed on
the screen and both fingers move together, the page scrolls at twice the
expected speed.
`WPEGestureDetector` only tracks the first touch sequence and ignores
events from other sequences. However, `handleGesture()` did not check
whether the event was actually processed and always proceeded to emit a
scroll event based on the current gesture state. As a result, touch move
events from the second finger triggered a second scroll event, doubling
the scroll speed.
Fixed by making `wpe_gesture_controller_handle_event()` return a boolean
indicating whether the event was consumed.
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp:
(WKWPE::ViewPlatform::handleGesture):
* Source/WebKit/WPEPlatform/wpe/WPEGestureController.cpp:
(wpe_gesture_controller_handle_event):
* Source/WebKit/WPEPlatform/wpe/WPEGestureController.h:
* Source/WebKit/WPEPlatform/wpe/WPEGestureControllerImpl.cpp:
(wpeHandleEvent):
* Source/WebKit/WPEPlatform/wpe/WPEGestureDetector.cpp:
(WPE::GestureDetector::handleEvent):
* Source/WebKit/WPEPlatform/wpe/WPEGestureDetector.h:
Canonical link: https://commits.webkit.org/308271@main1 parent 09bf7af commit f0af1da
File tree
6 files changed
+22
-12
lines changed- Source/WebKit
- UIProcess/API/wpe
- WPEPlatform/wpe
6 files changed
+22
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
| 434 | + | |
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | | - | |
| 56 | + | |
54 | 57 | | |
55 | | - | |
56 | | - | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments