Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| index ec409dccc405fedd2d81baa707bbf09318ad3e77..5796922ba24486a10b47f325857a4bf2593342cc 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -749,6 +749,13 @@ WebInputEventResult WebViewImpl::handleGestureEvent( |
| WebGestureEvent scaledEvent = |
| TransformWebGestureEvent(mainFrameImpl()->frameView(), event); |
| + if (event.sourceDevice == WebGestureDeviceTouchpad && |
| + event.type == WebInputEvent::GestureScrollUpdate) { |
| + float scaleFactor = client()->GetOriginalDeviceScaleFactor(); |
|
chengx
2017/01/06 23:46:36
aelias 2017/01/05 00:55:45
CC impl thread also has
|
| + scaledEvent.data.scrollUpdate.deltaX /= scaleFactor; |
| + scaledEvent.data.scrollUpdate.deltaY /= scaleFactor; |
|
chengx
2017/01/06 23:46:36
Bret:
Use client()->convertViewportToWindow() inst
|
| + } |
| + |
| // Special handling for double tap and scroll events as we don't want to |
| // hit test for them. |
| switch (event.type) { |