Chromium Code Reviews| Index: webkit/tools/test_shell/event_sending_controller.cc |
| diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc |
| index d16f6c6dad3a5179da5a21cc7aec6948d04f5d4b..259f3559e2a46d33ffeddb00407d2ee4f59a7ded 100644 |
| --- a/webkit/tools/test_shell/event_sending_controller.cc |
| +++ b/webkit/tools/test_shell/event_sending_controller.cc |
| @@ -840,6 +840,7 @@ void EventSendingController::addTouchPoint( |
| WebTouchPoint touch_point; |
| touch_point.state = WebTouchPoint::StatePressed; |
| touch_point.position = WebPoint(args[0].ToInt32(), args[1].ToInt32()); |
| + touch_point.screenPosition = touch_point.position; |
| touch_point.id = touch_points.size(); |
| touch_points.push_back(touch_point); |
| } |
| @@ -901,6 +902,7 @@ void EventSendingController::updateTouchPoint( |
| WebTouchPoint* touch_point = &touch_points[index]; |
| touch_point->state = WebTouchPoint::StateMoved; |
| touch_point->position = position; |
| + touch_point->screenPosition = position; |
| } |
| void EventSendingController::cancelTouchPoint( |
| @@ -918,6 +920,12 @@ void EventSendingController::cancelTouchPoint( |
| void EventSendingController::SendCurrentTouchEvent( |
| const WebInputEvent::Type type) { |
| + |
| + // Force a layout here just to make sure every position has been |
| + // determined before we send events (as well as all the other methods |
| + // that send an event do). |
|
jamesr
2010/11/10 19:59:58
Comment isn't very helpful here, recommend removin
|
| + webview()->layout(); |
| + |
| if (static_cast<unsigned int>(WebTouchEvent::touchPointsLengthCap) <= |
| touch_points.size()) { |
| NOTREACHED() << "Too many touch points for event"; |