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

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

Issue 1810693002: Ignore gesture sequences that have no target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO with bug. Created 4 years, 9 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_input_event_router.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_input_event_router.cc
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc
index 9add2783f3f5751851f37785437dc00b853b52bc..3fd57796c7a78d2c74400dfb2cad1c5bec69914b 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.cc
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -4,7 +4,6 @@
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
-#include "base/debug/dump_without_crashing.h"
#include "cc/quads/surface_draw_quad.h"
#include "cc/surfaces/surface_id_allocator.h"
#include "cc/surfaces/surface_manager.h"
@@ -26,18 +25,6 @@ void TransformEventTouchPositions(blink::WebTouchEvent* event,
namespace content {
-// Code to assist debugging https://crbug.com/592319.
-RenderWidgetHostInputEventRouter::GestureQueueDebugData::GestureQueueDebugData()
- : number_of_gesture_targets_enqueued(0),
- number_of_gesture_targets_dequeued(0),
- next_gesture_event_index(0),
- next_touch_event_index(0) {
- for (unsigned i = 0; i < kNumLastEventTypes; ++i) {
- last_gesture_event_types[i] = blink::WebInputEvent::Undefined;
- last_touch_event_types[i] = blink::WebInputEvent::Undefined;
- }
-}
-
void RenderWidgetHostInputEventRouter::OnRenderWidgetHostViewBaseDestroyed(
RenderWidgetHostViewBase* view) {
view->RemoveObserver(this);
@@ -184,11 +171,11 @@ void RenderWidgetHostInputEventRouter::RouteGestureEvent(
// fling.
if (event->type == blink::WebInputEvent::GestureTapDown) {
if (gesture_target_queue_.empty()) {
- // Collect data to assist debugging https://crbug.com/592319.
- // We'll assume for now if there's no target that we should just ignore
- // the event.
LOG(ERROR) << "Gesture sequence start detected with no target available.";
- base::debug::DumpWithoutCrashing();
+ // Ignore this gesture sequence as no target is available.
+ // TODO(wjmaclean): this only happens on Windows, and should not happen.
+ // https://crbug.com/595422
+ gesture_target_ = nullptr;
return;
}
@@ -196,16 +183,8 @@ void RenderWidgetHostInputEventRouter::RouteGestureEvent(
gesture_target_ = data.target;
gesture_delta_ = data.delta;
gesture_target_queue_.pop_front();
- // Code to assist debugging https://crbug.com/592319.
- debug_data_.number_of_gesture_targets_dequeued++;
}
- // Code to assist debugging https://crbug.com/592319.
- debug_data_.last_gesture_event_types[debug_data_.next_gesture_event_index] =
- event->type;
- debug_data_.next_gesture_event_index =
- (debug_data_.next_gesture_event_index + 1) % kNumLastEventTypes;
-
if (!gesture_target_)
return;
@@ -218,12 +197,6 @@ void RenderWidgetHostInputEventRouter::RouteTouchEvent(
RenderWidgetHostViewBase* root_view,
blink::WebTouchEvent* event,
const ui::LatencyInfo& latency) {
- // Code to assist debugging https://crbug.com/592319.
- debug_data_.last_touch_event_types[debug_data_.next_touch_event_index] =
- event->type;
- debug_data_.next_touch_event_index =
- (debug_data_.next_touch_event_index + 1) % kNumLastEventTypes;
-
switch (event->type) {
case blink::WebInputEvent::TouchStart: {
if (!active_touches_) {
@@ -243,8 +216,6 @@ void RenderWidgetHostInputEventRouter::RouteTouchEvent(
// for the duration of the sequence.
touch_delta_ = transformed_point - original_point;
gesture_target_queue_.emplace_back(touch_target_, touch_delta_);
- // Code to assist debugging https://crbug.com/592319.
- debug_data_.number_of_gesture_targets_enqueued++;
if (!touch_target_)
return;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_input_event_router.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698