Index: content/browser/renderer_host/render_widget_host.cc |
diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc |
index 9af103c2847794316905026edf21287712a3bf18..332e733c63d4fd88ad8efa6066ebd30562a953af 100644 |
--- a/content/browser/renderer_host/render_widget_host.cc |
+++ b/content/browser/renderer_host/render_widget_host.cc |
@@ -75,6 +75,10 @@ RenderWidgetHost::RenderWidgetHost(RenderProcessHost* process, |
resize_ack_pending_(false), |
mouse_move_pending_(false), |
mouse_wheel_pending_(false), |
+#if defined(TOUCH_UI) |
+ touch_move_pending_(false), |
+ touch_event_is_queued_(false), |
+#endif |
needs_repainting_on_restore_(false), |
is_unresponsive_(false), |
in_get_backing_store_(false), |
@@ -647,6 +651,20 @@ void RenderWidgetHost::ForwardInputEvent(const WebInputEvent& input_event, |
void RenderWidgetHost::ForwardTouchEvent( |
const WebKit::WebTouchEvent& touch_event) { |
TRACE_EVENT0("renderer_host", "RenderWidgetHost::ForwardTouchEvent"); |
+ if (ignore_input_events_ || process_->ignore_input_events()) |
+ return; |
+ |
+ if (touch_event.type == WebInputEvent::TouchMove && |
+ touch_move_pending_) { |
+ touch_event_is_queued_ = true; |
+ queued_touch_event_ = touch_event; |
+ return; |
+ } |
+ |
+ if (touch_event.type == WebInputEvent::TouchMove) |
+ touch_move_pending_ = true; |
+ else |
+ touch_move_pending_ = false; |
ForwardInputEvent(touch_event, sizeof(WebKit::WebTouchEvent), false); |
} |
#endif |
@@ -664,6 +682,11 @@ void RenderWidgetHost::RendererExited(base::TerminationStatus status, |
mouse_wheel_pending_ = false; |
coalesced_mouse_wheel_events_.clear(); |
+#if defined(TOUCH_UI) |
+ touch_move_pending_ = false; |
+ touch_event_is_queued_ = false; |
+#endif |
+ |
// Must reset these to ensure that keyboard events work with a new renderer. |
key_queue_.clear(); |
suppress_next_char_events_ = false; |
@@ -992,6 +1015,14 @@ void RenderWidgetHost::OnMsgInputEventAck(const IPC::Message& message) { |
} |
ProcessKeyboardEventAck(type, processed); |
+#if defined(TOUCH_UI) |
+ } else if (type == WebInputEvent::TouchMove) { |
+ touch_move_pending_ = false; |
+ if (touch_event_is_queued_) { |
+ touch_event_is_queued_ = false; |
+ ForwardTouchEvent(queued_touch_event_); |
+ } |
+#endif |
} |
// This is used only for testing. |
NotificationService::current()->Notify( |