| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/test_runner/event_sender.h" | 5 #include "content/shell/test_runner/event_sender.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 current_gesture_location_.x = | 2357 current_gesture_location_.x = |
| 2358 current_gesture_location_.x + event.data.scroll_update.delta_x; | 2358 current_gesture_location_.x + event.data.scroll_update.delta_x; |
| 2359 current_gesture_location_.y = | 2359 current_gesture_location_.y = |
| 2360 current_gesture_location_.y + event.data.scroll_update.delta_y; | 2360 current_gesture_location_.y + event.data.scroll_update.delta_y; |
| 2361 break; | 2361 break; |
| 2362 } | 2362 } |
| 2363 case WebInputEvent::kGestureScrollBegin: | 2363 case WebInputEvent::kGestureScrollBegin: |
| 2364 current_gesture_location_ = WebPoint(x, y); | 2364 current_gesture_location_ = WebPoint(x, y); |
| 2365 event.x = current_gesture_location_.x; | 2365 event.x = current_gesture_location_.x; |
| 2366 event.y = current_gesture_location_.y; | 2366 event.y = current_gesture_location_.y; |
| 2367 // TODO(sahel) : change this to get scroll delta hints from args instead |
| 2368 // of ignoring them. See crbug.com/728214. |
| 2369 event.data.scroll_begin.ignore_delta_hints = true; |
| 2367 break; | 2370 break; |
| 2368 case WebInputEvent::kGestureScrollEnd: | 2371 case WebInputEvent::kGestureScrollEnd: |
| 2369 case WebInputEvent::kGestureFlingStart: | 2372 case WebInputEvent::kGestureFlingStart: |
| 2370 event.x = current_gesture_location_.x; | 2373 event.x = current_gesture_location_.x; |
| 2371 event.y = current_gesture_location_.y; | 2374 event.y = current_gesture_location_.y; |
| 2372 break; | 2375 break; |
| 2373 case WebInputEvent::kGesturePinchBegin: | 2376 case WebInputEvent::kGesturePinchBegin: |
| 2374 case WebInputEvent::kGesturePinchEnd: | 2377 case WebInputEvent::kGesturePinchEnd: |
| 2375 current_gesture_location_ = WebPoint(x, y); | 2378 current_gesture_location_ = WebPoint(x, y); |
| 2376 event.x = current_gesture_location_.x; | 2379 event.x = current_gesture_location_.x; |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2916 return view()->MainFrame()->ToWebLocalFrame()->FrameWidget(); | 2919 return view()->MainFrame()->ToWebLocalFrame()->FrameWidget(); |
| 2917 } | 2920 } |
| 2918 | 2921 |
| 2919 std::unique_ptr<WebInputEvent> EventSender::TransformScreenToWidgetCoordinates( | 2922 std::unique_ptr<WebInputEvent> EventSender::TransformScreenToWidgetCoordinates( |
| 2920 const WebInputEvent& event) { | 2923 const WebInputEvent& event) { |
| 2921 return delegate()->TransformScreenToWidgetCoordinates( | 2924 return delegate()->TransformScreenToWidgetCoordinates( |
| 2922 web_widget_test_proxy_base_, event); | 2925 web_widget_test_proxy_base_, event); |
| 2923 } | 2926 } |
| 2924 | 2927 |
| 2925 } // namespace test_runner | 2928 } // namespace test_runner |
| OLD | NEW |