Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 9233058: Some touch-event forwarding optimization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 12bcda166ad2f91c5156c3e8900d717ac7da7470..266b6010ead3cdd01fef00e261daaa375e8751bb 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -893,8 +893,9 @@ ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent(
WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event,
&touch_event_);
- // Forward the touch event only if a touch point was updated.
- if (point) {
+ // Forward the touch event only if a touch point was updated, and there's a
+ // touch-event handler in the page.
+ if (point && host_->has_touch_handler()) {
host_->ForwardTouchEvent(touch_event_);
UpdateWebTouchEventAfterDispatch(&touch_event_, point);
return DecideTouchStatus(touch_event_, point);
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698