diff options
author | Ben Murdoch <benm@google.com> | 2010-01-22 10:40:22 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-01-26 10:27:58 +0000 |
commit | 9c3f8716aa3ce8ca612b4200c02a8530cfd599ba (patch) | |
tree | 0bd79bee3e85d0ce37cb8eee4f19d365b8a885b0 /WebCore/plugins/android/PluginViewAndroid.cpp | |
parent | 09cf43c86944667327521b6be03733519a63a6e0 (diff) | |
download | external_webkit-9c3f8716aa3ce8ca612b4200c02a8530cfd599ba.zip external_webkit-9c3f8716aa3ce8ca612b4200c02a8530cfd599ba.tar.gz external_webkit-9c3f8716aa3ce8ca612b4200c02a8530cfd599ba.tar.bz2 |
absoluteToLocal works with a page co-ordinate that is relative to the top left of the containing frame's document, so fix a bug in the WebCore touch event handler where the wrong page co-ordinates were being passed to the Touch construtor. This part of the change should be upstreamed to webkit.
Also fix a crash when a touchCancel event is sent to a plugin because touchCancel, like touchend is not guaranteed to have data in touches, but will have data in changedTouches.
Change-Id: I5345d7baf4e4325b24fbc5fbe60132dafb80e006
Diffstat (limited to 'WebCore/plugins/android/PluginViewAndroid.cpp')
-rw-r--r-- | WebCore/plugins/android/PluginViewAndroid.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp index 41dc668..88e7f0b 100644 --- a/WebCore/plugins/android/PluginViewAndroid.cpp +++ b/WebCore/plugins/android/PluginViewAndroid.cpp @@ -208,10 +208,10 @@ void PluginView::handleTouchEvent(TouchEvent* event) evt.data.touch.modifiers = 0; // todo - // In the event of a touchend (up) event, we must ask the changedTouch for the + // In the event of a touchend (up) or touchcancel event, we must ask the changedTouch for the // co-ordinates as there is no touch in touches anymore. - TouchList* touches = (evt.data.touch.action == kUp_ANPTouchAction) ? - event->changedTouches() : event->touches(); + TouchList* touches = (evt.data.touch.action == kUp_ANPTouchAction + || evt.data.touch.action == kCancel_ANPTouchAction) ? event->changedTouches() : event->touches(); // Convert to coordinates that are relative to the plugin. // We only support single touch points at the moment, so we want to look at index 0 only. |