summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorrjkroege@google.com <rjkroege@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 20:19:12 +0000
committerrjkroege@google.com <rjkroege@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 20:19:12 +0000
commit6a0394fa23768cce0b69db8d8b4b7f7329a6cde7 (patch)
tree6d816ffda9e743f5d379e48792ef1b7aafdd9af0 /webkit
parent91c15692a0b6a9ba80024535f16b4fe920cd1702 (diff)
downloadchromium_src-6a0394fa23768cce0b69db8d8b4b7f7329a6cde7.zip
chromium_src-6a0394fa23768cce0b69db8d8b4b7f7329a6cde7.tar.gz
chromium_src-6a0394fa23768cce0b69db8d8b4b7f7329a6cde7.tar.bz2
Update the EventSendingController to send complete touch events.
The patch makes EventSendingController send touch events more like how it currently handles mouse events: give them valid screenPosition fields and do layout before dispatching them. BUG=none TEST=via layout tests Review URL: http://codereview.chromium.org/4703004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66159 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/event_sending_controller.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc
index d16f6c6..6bf0282 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,8 @@ void EventSendingController::cancelTouchPoint(
void EventSendingController::SendCurrentTouchEvent(
const WebInputEvent::Type type) {
+ webview()->layout();
+
if (static_cast<unsigned int>(WebTouchEvent::touchPointsLengthCap) <=
touch_points.size()) {
NOTREACHED() << "Too many touch points for event";