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 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2518 } | 2518 } |
2519 event.data.two_finger_tap.first_finger_height = first_finger_height; | 2519 event.data.two_finger_tap.first_finger_height = first_finger_height; |
2520 } | 2520 } |
2521 } | 2521 } |
2522 break; | 2522 break; |
2523 default: | 2523 default: |
2524 NOTREACHED(); | 2524 NOTREACHED(); |
2525 } | 2525 } |
2526 | 2526 |
2527 event.unique_touch_event_id = GetUniqueTouchEventId(args); | 2527 event.unique_touch_event_id = GetUniqueTouchEventId(args); |
2528 // This check is necessary as tests may pass some redundant args. | |
2529 if (!args->PeekNext().IsEmpty() && args->PeekNext()->IsString()) { | |
dtapuska
2017/06/16 15:46:23
Do you really need the IsString() ?
If there are
chongz
2017/06/16 16:03:02
Fixed layout tests.
In this case I think we don't
| |
2530 if (!getPointerType(args, false, event.primary_pointer_type)) | |
2531 return; | |
2532 } | |
2528 | 2533 |
2529 event.global_x = event.x; | 2534 event.global_x = event.x; |
2530 event.global_y = event.y; | 2535 event.global_y = event.y; |
2531 | 2536 |
2532 if (force_layout_on_events_) | 2537 if (force_layout_on_events_) |
2533 widget()->UpdateAllLifecyclePhases(); | 2538 widget()->UpdateAllLifecyclePhases(); |
2534 | 2539 |
2535 WebInputEventResult result = HandleInputEventOnViewOrPopup(event); | 2540 WebInputEventResult result = HandleInputEventOnViewOrPopup(event); |
2536 | 2541 |
2537 // Long press might start a drag drop session. Complete it if so. | 2542 // Long press might start a drag drop session. Complete it if so. |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2916 return view()->MainFrame()->ToWebLocalFrame()->FrameWidget(); | 2921 return view()->MainFrame()->ToWebLocalFrame()->FrameWidget(); |
2917 } | 2922 } |
2918 | 2923 |
2919 std::unique_ptr<WebInputEvent> EventSender::TransformScreenToWidgetCoordinates( | 2924 std::unique_ptr<WebInputEvent> EventSender::TransformScreenToWidgetCoordinates( |
2920 const WebInputEvent& event) { | 2925 const WebInputEvent& event) { |
2921 return delegate()->TransformScreenToWidgetCoordinates( | 2926 return delegate()->TransformScreenToWidgetCoordinates( |
2922 web_widget_test_proxy_base_, event); | 2927 web_widget_test_proxy_base_, event); |
2923 } | 2928 } |
2924 | 2929 |
2925 } // namespace test_runner | 2930 } // namespace test_runner |
OLD | NEW |