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 "components/test_runner/event_sender.h" | 5 #include "components/test_runner/event_sender.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 for (size_t i = 0; i < touch_points_.size(); i++) { | 1883 for (size_t i = 0; i < touch_points_.size(); i++) { |
1884 if (touch_points_[i].id > highest_id) | 1884 if (touch_points_[i].id > highest_id) |
1885 highest_id = touch_points_[i].id; | 1885 highest_id = touch_points_[i].id; |
1886 } | 1886 } |
1887 touch_point.id = highest_id + 1; | 1887 touch_point.id = highest_id + 1; |
1888 | 1888 |
1889 InitPointerProperties(args, &touch_point, &touch_point.radiusX, | 1889 InitPointerProperties(args, &touch_point, &touch_point.radiusX, |
1890 &touch_point.radiusY); | 1890 &touch_point.radiusY); |
1891 | 1891 |
1892 // Set the touch point pressure to zero if it was not set by the caller | 1892 // Set the touch point pressure to zero if it was not set by the caller |
1893 if (isnan(touch_point.force)) | 1893 if (std::isnan(touch_point.force)) |
1894 touch_point.force = 0.0; | 1894 touch_point.force = 0.0; |
1895 | 1895 |
1896 touch_points_.push_back(touch_point); | 1896 touch_points_.push_back(touch_point); |
1897 } | 1897 } |
1898 | 1898 |
1899 void EventSender::MouseDragBegin() { | 1899 void EventSender::MouseDragBegin() { |
1900 WebMouseWheelEvent event; | 1900 WebMouseWheelEvent event; |
1901 InitMouseEvent(WebInputEvent::MouseWheel, | 1901 InitMouseEvent(WebInputEvent::MouseWheel, |
1902 WebMouseEvent::ButtonNone, | 1902 WebMouseEvent::ButtonNone, |
1903 0, | 1903 0, |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2649 last_event_timestamp_ = event.timeStampSeconds; | 2649 last_event_timestamp_ = event.timeStampSeconds; |
2650 | 2650 |
2651 if (WebPagePopup* popup = view_->pagePopup()) { | 2651 if (WebPagePopup* popup = view_->pagePopup()) { |
2652 if (!WebInputEvent::isKeyboardEventType(event.type)) | 2652 if (!WebInputEvent::isKeyboardEventType(event.type)) |
2653 return popup->handleInputEvent(event); | 2653 return popup->handleInputEvent(event); |
2654 } | 2654 } |
2655 return view_->handleInputEvent(event); | 2655 return view_->handleInputEvent(event); |
2656 } | 2656 } |
2657 | 2657 |
2658 } // namespace test_runner | 2658 } // namespace test_runner |
OLD | NEW |