| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
| 6 | 6 |
| 7 #include "base/debug/dump_without_crashing.h" |
| 7 #include "cc/quads/surface_draw_quad.h" | 8 #include "cc/quads/surface_draw_quad.h" |
| 8 #include "cc/surfaces/surface_id_allocator.h" | 9 #include "cc/surfaces/surface_id_allocator.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 10 #include "cc/surfaces/surface_manager.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 11 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 11 #include "content/common/frame_messages.h" | 12 #include "content/common/frame_messages.h" |
| 12 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 void TransformEventTouchPositions(blink::WebTouchEvent* event, | 17 void TransformEventTouchPositions(blink::WebTouchEvent* event, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // means the GestureFlingCancel that always comes between ET_GESTURE_BEGIN and | 170 // means the GestureFlingCancel that always comes between ET_GESTURE_BEGIN and |
| 170 // GestureTapDown is sent to the previous target, in case it is still in a | 171 // GestureTapDown is sent to the previous target, in case it is still in a |
| 171 // fling. | 172 // fling. |
| 172 if (event->type == blink::WebInputEvent::GestureTapDown) { | 173 if (event->type == blink::WebInputEvent::GestureTapDown) { |
| 173 if (gesture_target_queue_.empty()) { | 174 if (gesture_target_queue_.empty()) { |
| 174 LOG(ERROR) << "Gesture sequence start detected with no target available."; | 175 LOG(ERROR) << "Gesture sequence start detected with no target available."; |
| 175 // Ignore this gesture sequence as no target is available. | 176 // Ignore this gesture sequence as no target is available. |
| 176 // TODO(wjmaclean): this only happens on Windows, and should not happen. | 177 // TODO(wjmaclean): this only happens on Windows, and should not happen. |
| 177 // https://crbug.com/595422 | 178 // https://crbug.com/595422 |
| 178 gesture_target_ = nullptr; | 179 gesture_target_ = nullptr; |
| 180 base::debug::DumpWithoutCrashing(); |
| 179 return; | 181 return; |
| 180 } | 182 } |
| 181 | 183 |
| 182 const GestureTargetData& data = gesture_target_queue_.front(); | 184 const GestureTargetData& data = gesture_target_queue_.front(); |
| 183 gesture_target_ = data.target; | 185 gesture_target_ = data.target; |
| 184 gesture_delta_ = data.delta; | 186 gesture_delta_ = data.delta; |
| 185 gesture_target_queue_.pop_front(); | 187 gesture_target_queue_.pop_front(); |
| 186 } | 188 } |
| 187 | 189 |
| 188 if (!gesture_target_) | 190 if (!gesture_target_) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 if (owner_map_.find(cc::SurfaceIdAllocator::NamespaceForId( | 285 if (owner_map_.find(cc::SurfaceIdAllocator::NamespaceForId( |
| 284 params.surface_id)) == owner_map_.end()) { | 286 params.surface_id)) == owner_map_.end()) { |
| 285 return; | 287 return; |
| 286 } | 288 } |
| 287 HittestData data; | 289 HittestData data; |
| 288 data.ignored_for_hittest = params.ignored_for_hittest; | 290 data.ignored_for_hittest = params.ignored_for_hittest; |
| 289 hittest_data_[params.surface_id] = data; | 291 hittest_data_[params.surface_id] = data; |
| 290 } | 292 } |
| 291 | 293 |
| 292 } // namespace content | 294 } // namespace content |
| OLD | NEW |