Chromium Code Reviews| Index: content/browser/android/content_view_core_impl.cc |
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
| index 0f762944731ee56bbcf1defaac237a59869a80bd..1306f12e88c9e324f587b84a491a4e70517f7360 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -151,6 +151,7 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj, |
| root_layer_(cc::Layer::create()), |
| tab_crashed_(false), |
| input_events_delivered_at_vsync_(input_events_delivered_at_vsync), |
| + has_touch_event_handlers_(false), |
| renderer_frame_pending_(false), |
| window_android_(window_android) { |
| CHECK(web_contents) << |
| @@ -498,6 +499,7 @@ void ContentViewCoreImpl::ConfirmTouchEvent(InputEventAckState ack_result) { |
| void ContentViewCoreImpl::HasTouchEventHandlers(bool need_touch_events) { |
| JNIEnv* env = AttachCurrentThread(); |
| ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); |
| + has_touch_event_handlers_ = need_touch_events; |
| if (j_obj.is_null()) |
| return; |
| Java_ContentViewCore_hasTouchEventHandlers(env, |
| @@ -866,11 +868,10 @@ WebGestureEvent ContentViewCoreImpl::MakeGestureEvent(WebInputEvent::Type type, |
| void ContentViewCoreImpl::UpdateVSyncFlagOnInputEvent( |
| WebKit::WebInputEvent* event) const { |
| - if (!input_events_delivered_at_vsync_) |
| + if (!input_events_delivered_at_vsync_ || has_touch_event_handlers_) |
| return; |
| if (event->type == WebInputEvent::GestureScrollUpdate || |
| - event->type == WebInputEvent::GesturePinchUpdate || |
| - event->type == WebInputEvent::TouchMove) |
|
jamesr
2013/01/16 04:13:26
whaaaa? why was this here?
actually, this whole f
Sami
2013/01/16 10:49:15
From Android's point of view input events are alwa
|
| + event->type == WebInputEvent::GesturePinchUpdate) |
| event->modifiers |= WebInputEvent::IsLastInputEventForCurrentVSync; |
| } |