| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/renderer/gpu/input_handler_proxy.h" | 5 #include "content/renderer/gpu/input_handler_proxy.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/renderer/gpu/input_handler_proxy_client.h" | 9 #include "content/renderer/gpu/input_handler_proxy_client.h" |
| 10 #include "third_party/WebKit/public/platform/Platform.h" | 10 #include "third_party/WebKit/public/platform/Platform.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 input_handler_ = NULL; | 39 input_handler_ = NULL; |
| 40 DCHECK(client_); | 40 DCHECK(client_); |
| 41 client_->WillShutdown(); | 41 client_->WillShutdown(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void InputHandlerProxy::SetClient(InputHandlerProxyClient* client) { | 44 void InputHandlerProxy::SetClient(InputHandlerProxyClient* client) { |
| 45 DCHECK(!client_ || !client); | 45 DCHECK(!client_ || !client); |
| 46 client_ = client; | 46 client_ = client; |
| 47 } | 47 } |
| 48 | 48 |
| 49 void InputHandlerProxy::HandleInputEvent(const WebInputEvent& event) { | 49 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent( |
| 50 const WebInputEvent& event) { |
| 50 DCHECK(client_); | 51 DCHECK(client_); |
| 51 DCHECK(input_handler_); | 52 DCHECK(input_handler_); |
| 52 | 53 |
| 53 InputHandlerProxy::EventDisposition disposition = | 54 InputHandlerProxy::EventDisposition disposition = |
| 54 HandleInputEventInternal(event); | 55 HandleInputEventInternal(event); |
| 55 switch (disposition) { | |
| 56 case DidHandle: | |
| 57 client_->DidHandleInputEvent(); | |
| 58 break; | |
| 59 case DidNotHandle: | |
| 60 client_->DidNotHandleInputEvent(true /* send_to_widget */); | |
| 61 break; | |
| 62 case DropEvent: | |
| 63 client_->DidNotHandleInputEvent(false /* send_to_widget */); | |
| 64 break; | |
| 65 } | |
| 66 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) { | 56 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) { |
| 67 input_handler_->DidReceiveLastInputEventForBeginFrame( | 57 input_handler_->DidReceiveLastInputEventForBeginFrame( |
| 68 base::TimeTicks::FromInternalValue(event.timeStampSeconds * | 58 base::TimeTicks::FromInternalValue(event.timeStampSeconds * |
| 69 base::Time::kMicrosecondsPerSecond)); | 59 base::Time::kMicrosecondsPerSecond)); |
| 70 } | 60 } |
| 61 return disposition; |
| 71 } | 62 } |
| 72 | 63 |
| 73 InputHandlerProxy::EventDisposition | 64 InputHandlerProxy::EventDisposition |
| 74 InputHandlerProxy::HandleInputEventInternal(const WebInputEvent& event) { | 65 InputHandlerProxy::HandleInputEventInternal(const WebInputEvent& event) { |
| 75 if (event.type == WebInputEvent::MouseWheel) { | 66 if (event.type == WebInputEvent::MouseWheel) { |
| 76 const WebMouseWheelEvent& wheel_event = | 67 const WebMouseWheelEvent& wheel_event = |
| 77 *static_cast<const WebMouseWheelEvent*>(&event); | 68 *static_cast<const WebMouseWheelEvent*>(&event); |
| 78 if (wheel_event.scrollByPage) { | 69 if (wheel_event.scrollByPage) { |
| 79 // TODO(jamesr): We don't properly handle scroll by page in the compositor | 70 // TODO(jamesr): We don't properly handle scroll by page in the compositor |
| 80 // thread, so punt it to the main thread. http://crbug.com/236639 | 71 // thread, so punt it to the main thread. http://crbug.com/236639 |
| 81 return DidNotHandle; | 72 return DID_NOT_HANDLE; |
| 82 } | 73 } |
| 83 cc::InputHandler::ScrollStatus scroll_status = input_handler_->ScrollBegin( | 74 cc::InputHandler::ScrollStatus scroll_status = input_handler_->ScrollBegin( |
| 84 gfx::Point(wheel_event.x, wheel_event.y), cc::InputHandler::Wheel); | 75 gfx::Point(wheel_event.x, wheel_event.y), cc::InputHandler::Wheel); |
| 85 switch (scroll_status) { | 76 switch (scroll_status) { |
| 86 case cc::InputHandler::ScrollStarted: { | 77 case cc::InputHandler::ScrollStarted: { |
| 87 TRACE_EVENT_INSTANT2( | 78 TRACE_EVENT_INSTANT2( |
| 88 "renderer", | 79 "renderer", |
| 89 "InputHandlerProxy::handle_input wheel scroll", | 80 "InputHandlerProxy::handle_input wheel scroll", |
| 90 TRACE_EVENT_SCOPE_THREAD, | 81 TRACE_EVENT_SCOPE_THREAD, |
| 91 "deltaX", | 82 "deltaX", |
| 92 -wheel_event.deltaX, | 83 -wheel_event.deltaX, |
| 93 "deltaY", | 84 "deltaY", |
| 94 -wheel_event.deltaY); | 85 -wheel_event.deltaY); |
| 95 bool did_scroll = input_handler_->ScrollBy( | 86 bool did_scroll = input_handler_->ScrollBy( |
| 96 gfx::Point(wheel_event.x, wheel_event.y), | 87 gfx::Point(wheel_event.x, wheel_event.y), |
| 97 gfx::Vector2dF(-wheel_event.deltaX, -wheel_event.deltaY)); | 88 gfx::Vector2dF(-wheel_event.deltaX, -wheel_event.deltaY)); |
| 98 input_handler_->ScrollEnd(); | 89 input_handler_->ScrollEnd(); |
| 99 return did_scroll ? DidHandle : DropEvent; | 90 return did_scroll ? DID_HANDLE : DROP_EVENT; |
| 100 } | 91 } |
| 101 case cc::InputHandler::ScrollIgnored: | 92 case cc::InputHandler::ScrollIgnored: |
| 102 // TODO(jamesr): This should be DropEvent, but in cases where we fail to | 93 // TODO(jamesr): This should be DROP_EVENT, but in cases where we fail |
| 103 // properly sync scrollability it's safer to send the | 94 // to properly sync scrollability it's safer to send the event to the |
| 104 // event to the main thread. Change back to DropEvent once we have | 95 // main thread. Change back to DROP_EVENT once we have synchronization |
| 105 // synchronization bugs sorted out. | 96 // bugs sorted out. |
| 106 return DidNotHandle; | 97 return DID_NOT_HANDLE; |
| 107 case cc::InputHandler::ScrollOnMainThread: | 98 case cc::InputHandler::ScrollOnMainThread: |
| 108 return DidNotHandle; | 99 return DID_NOT_HANDLE; |
| 109 } | 100 } |
| 110 } else if (event.type == WebInputEvent::GestureScrollBegin) { | 101 } else if (event.type == WebInputEvent::GestureScrollBegin) { |
| 111 DCHECK(!gesture_scroll_on_impl_thread_); | 102 DCHECK(!gesture_scroll_on_impl_thread_); |
| 112 #ifndef NDEBUG | 103 #ifndef NDEBUG |
| 113 DCHECK(!expect_scroll_update_end_); | 104 DCHECK(!expect_scroll_update_end_); |
| 114 expect_scroll_update_end_ = true; | 105 expect_scroll_update_end_ = true; |
| 115 #endif | 106 #endif |
| 116 const WebGestureEvent& gesture_event = | 107 const WebGestureEvent& gesture_event = |
| 117 *static_cast<const WebGestureEvent*>(&event); | 108 *static_cast<const WebGestureEvent*>(&event); |
| 118 cc::InputHandler::ScrollStatus scroll_status = input_handler_->ScrollBegin( | 109 cc::InputHandler::ScrollStatus scroll_status = input_handler_->ScrollBegin( |
| 119 gfx::Point(gesture_event.x, gesture_event.y), | 110 gfx::Point(gesture_event.x, gesture_event.y), |
| 120 cc::InputHandler::Gesture); | 111 cc::InputHandler::Gesture); |
| 121 switch (scroll_status) { | 112 switch (scroll_status) { |
| 122 case cc::InputHandler::ScrollStarted: | 113 case cc::InputHandler::ScrollStarted: |
| 123 gesture_scroll_on_impl_thread_ = true; | 114 gesture_scroll_on_impl_thread_ = true; |
| 124 return DidHandle; | 115 return DID_HANDLE; |
| 125 case cc::InputHandler::ScrollOnMainThread: | 116 case cc::InputHandler::ScrollOnMainThread: |
| 126 return DidNotHandle; | 117 return DID_NOT_HANDLE; |
| 127 case cc::InputHandler::ScrollIgnored: | 118 case cc::InputHandler::ScrollIgnored: |
| 128 return DropEvent; | 119 return DROP_EVENT; |
| 129 } | 120 } |
| 130 } else if (event.type == WebInputEvent::GestureScrollUpdate) { | 121 } else if (event.type == WebInputEvent::GestureScrollUpdate) { |
| 131 #ifndef NDEBUG | 122 #ifndef NDEBUG |
| 132 DCHECK(expect_scroll_update_end_); | 123 DCHECK(expect_scroll_update_end_); |
| 133 #endif | 124 #endif |
| 134 | 125 |
| 135 if (!gesture_scroll_on_impl_thread_ && !gesture_pinch_on_impl_thread_) | 126 if (!gesture_scroll_on_impl_thread_ && !gesture_pinch_on_impl_thread_) |
| 136 return DidNotHandle; | 127 return DID_NOT_HANDLE; |
| 137 | 128 |
| 138 const WebGestureEvent& gesture_event = | 129 const WebGestureEvent& gesture_event = |
| 139 *static_cast<const WebGestureEvent*>(&event); | 130 *static_cast<const WebGestureEvent*>(&event); |
| 140 bool did_scroll = input_handler_->ScrollBy( | 131 bool did_scroll = input_handler_->ScrollBy( |
| 141 gfx::Point(gesture_event.x, gesture_event.y), | 132 gfx::Point(gesture_event.x, gesture_event.y), |
| 142 gfx::Vector2dF(-gesture_event.data.scrollUpdate.deltaX, | 133 gfx::Vector2dF(-gesture_event.data.scrollUpdate.deltaX, |
| 143 -gesture_event.data.scrollUpdate.deltaY)); | 134 -gesture_event.data.scrollUpdate.deltaY)); |
| 144 return did_scroll ? DidHandle : DropEvent; | 135 return did_scroll ? DID_HANDLE : DROP_EVENT; |
| 145 } else if (event.type == WebInputEvent::GestureScrollEnd) { | 136 } else if (event.type == WebInputEvent::GestureScrollEnd) { |
| 146 #ifndef NDEBUG | 137 #ifndef NDEBUG |
| 147 DCHECK(expect_scroll_update_end_); | 138 DCHECK(expect_scroll_update_end_); |
| 148 expect_scroll_update_end_ = false; | 139 expect_scroll_update_end_ = false; |
| 149 #endif | 140 #endif |
| 150 if (!gesture_scroll_on_impl_thread_) | 141 if (!gesture_scroll_on_impl_thread_) |
| 151 return DidNotHandle; | 142 return DID_NOT_HANDLE; |
| 152 | 143 |
| 153 input_handler_->ScrollEnd(); | 144 input_handler_->ScrollEnd(); |
| 154 gesture_scroll_on_impl_thread_ = false; | 145 gesture_scroll_on_impl_thread_ = false; |
| 155 return DidHandle; | 146 return DID_HANDLE; |
| 156 } else if (event.type == WebInputEvent::GesturePinchBegin) { | 147 } else if (event.type == WebInputEvent::GesturePinchBegin) { |
| 157 #ifndef NDEBUG | 148 #ifndef NDEBUG |
| 158 DCHECK(!expect_pinch_update_end_); | 149 DCHECK(!expect_pinch_update_end_); |
| 159 expect_pinch_update_end_ = true; | 150 expect_pinch_update_end_ = true; |
| 160 #endif | 151 #endif |
| 161 input_handler_->PinchGestureBegin(); | 152 input_handler_->PinchGestureBegin(); |
| 162 gesture_pinch_on_impl_thread_ = true; | 153 gesture_pinch_on_impl_thread_ = true; |
| 163 return DidHandle; | 154 return DID_HANDLE; |
| 164 } else if (event.type == WebInputEvent::GesturePinchEnd) { | 155 } else if (event.type == WebInputEvent::GesturePinchEnd) { |
| 165 #ifndef NDEBUG | 156 #ifndef NDEBUG |
| 166 DCHECK(expect_pinch_update_end_); | 157 DCHECK(expect_pinch_update_end_); |
| 167 expect_pinch_update_end_ = false; | 158 expect_pinch_update_end_ = false; |
| 168 #endif | 159 #endif |
| 169 gesture_pinch_on_impl_thread_ = false; | 160 gesture_pinch_on_impl_thread_ = false; |
| 170 input_handler_->PinchGestureEnd(); | 161 input_handler_->PinchGestureEnd(); |
| 171 return DidHandle; | 162 return DID_HANDLE; |
| 172 } else if (event.type == WebInputEvent::GesturePinchUpdate) { | 163 } else if (event.type == WebInputEvent::GesturePinchUpdate) { |
| 173 #ifndef NDEBUG | 164 #ifndef NDEBUG |
| 174 DCHECK(expect_pinch_update_end_); | 165 DCHECK(expect_pinch_update_end_); |
| 175 #endif | 166 #endif |
| 176 const WebGestureEvent& gesture_event = | 167 const WebGestureEvent& gesture_event = |
| 177 *static_cast<const WebGestureEvent*>(&event); | 168 *static_cast<const WebGestureEvent*>(&event); |
| 178 input_handler_->PinchGestureUpdate( | 169 input_handler_->PinchGestureUpdate( |
| 179 gesture_event.data.pinchUpdate.scale, | 170 gesture_event.data.pinchUpdate.scale, |
| 180 gfx::Point(gesture_event.x, gesture_event.y)); | 171 gfx::Point(gesture_event.x, gesture_event.y)); |
| 181 return DidHandle; | 172 return DID_HANDLE; |
| 182 } else if (event.type == WebInputEvent::GestureFlingStart) { | 173 } else if (event.type == WebInputEvent::GestureFlingStart) { |
| 183 const WebGestureEvent& gesture_event = | 174 const WebGestureEvent& gesture_event = |
| 184 *static_cast<const WebGestureEvent*>(&event); | 175 *static_cast<const WebGestureEvent*>(&event); |
| 185 return HandleGestureFling(gesture_event); | 176 return HandleGestureFling(gesture_event); |
| 186 } else if (event.type == WebInputEvent::GestureFlingCancel) { | 177 } else if (event.type == WebInputEvent::GestureFlingCancel) { |
| 187 if (CancelCurrentFling()) | 178 if (CancelCurrentFling()) |
| 188 return DidHandle; | 179 return DID_HANDLE; |
| 189 else if (!fling_may_be_active_on_main_thread_) | 180 else if (!fling_may_be_active_on_main_thread_) |
| 190 return DropEvent; | 181 return DROP_EVENT; |
| 191 } else if (event.type == WebInputEvent::TouchStart) { | 182 } else if (event.type == WebInputEvent::TouchStart) { |
| 192 const WebTouchEvent& touch_event = | 183 const WebTouchEvent& touch_event = |
| 193 *static_cast<const WebTouchEvent*>(&event); | 184 *static_cast<const WebTouchEvent*>(&event); |
| 194 if (!input_handler_->HaveTouchEventHandlersAt(touch_event.touches[0] | 185 if (!input_handler_->HaveTouchEventHandlersAt(touch_event.touches[0] |
| 195 .position)) | 186 .position)) |
| 196 return DropEvent; | 187 return DROP_EVENT; |
| 197 } else if (WebInputEvent::isKeyboardEventType(event.type)) { | 188 } else if (WebInputEvent::isKeyboardEventType(event.type)) { |
| 198 CancelCurrentFling(); | 189 CancelCurrentFling(); |
| 199 } | 190 } |
| 200 | 191 |
| 201 return DidNotHandle; | 192 return DID_NOT_HANDLE; |
| 202 } | 193 } |
| 203 | 194 |
| 204 InputHandlerProxy::EventDisposition | 195 InputHandlerProxy::EventDisposition |
| 205 InputHandlerProxy::HandleGestureFling( | 196 InputHandlerProxy::HandleGestureFling( |
| 206 const WebGestureEvent& gesture_event) { | 197 const WebGestureEvent& gesture_event) { |
| 207 cc::InputHandler::ScrollStatus scroll_status; | 198 cc::InputHandler::ScrollStatus scroll_status; |
| 208 | 199 |
| 209 if (gesture_event.sourceDevice == WebGestureEvent::Touchpad) { | 200 if (gesture_event.sourceDevice == WebGestureEvent::Touchpad) { |
| 210 scroll_status = input_handler_->ScrollBegin( | 201 scroll_status = input_handler_->ScrollBegin( |
| 211 gfx::Point(gesture_event.x, gesture_event.y), | 202 gfx::Point(gesture_event.x, gesture_event.y), |
| (...skipping 25 matching lines...) Expand all Loading... |
| 237 this); | 228 this); |
| 238 fling_parameters_.delta = | 229 fling_parameters_.delta = |
| 239 WebFloatPoint(gesture_event.data.flingStart.velocityX, | 230 WebFloatPoint(gesture_event.data.flingStart.velocityX, |
| 240 gesture_event.data.flingStart.velocityY); | 231 gesture_event.data.flingStart.velocityY); |
| 241 fling_parameters_.point = WebPoint(gesture_event.x, gesture_event.y); | 232 fling_parameters_.point = WebPoint(gesture_event.x, gesture_event.y); |
| 242 fling_parameters_.globalPoint = | 233 fling_parameters_.globalPoint = |
| 243 WebPoint(gesture_event.globalX, gesture_event.globalY); | 234 WebPoint(gesture_event.globalX, gesture_event.globalY); |
| 244 fling_parameters_.modifiers = gesture_event.modifiers; | 235 fling_parameters_.modifiers = gesture_event.modifiers; |
| 245 fling_parameters_.sourceDevice = gesture_event.sourceDevice; | 236 fling_parameters_.sourceDevice = gesture_event.sourceDevice; |
| 246 input_handler_->ScheduleAnimation(); | 237 input_handler_->ScheduleAnimation(); |
| 247 return DidHandle; | 238 return DID_HANDLE; |
| 248 } | 239 } |
| 249 case cc::InputHandler::ScrollOnMainThread: { | 240 case cc::InputHandler::ScrollOnMainThread: { |
| 250 TRACE_EVENT_INSTANT0("renderer", | 241 TRACE_EVENT_INSTANT0("renderer", |
| 251 "InputHandlerProxy::HandleGestureFling::" | 242 "InputHandlerProxy::HandleGestureFling::" |
| 252 "scroll_on_main_thread", | 243 "scroll_on_main_thread", |
| 253 TRACE_EVENT_SCOPE_THREAD); | 244 TRACE_EVENT_SCOPE_THREAD); |
| 254 fling_may_be_active_on_main_thread_ = true; | 245 fling_may_be_active_on_main_thread_ = true; |
| 255 return DidNotHandle; | 246 return DID_NOT_HANDLE; |
| 256 } | 247 } |
| 257 case cc::InputHandler::ScrollIgnored: { | 248 case cc::InputHandler::ScrollIgnored: { |
| 258 TRACE_EVENT_INSTANT0( | 249 TRACE_EVENT_INSTANT0( |
| 259 "renderer", | 250 "renderer", |
| 260 "InputHandlerProxy::HandleGestureFling::ignored", | 251 "InputHandlerProxy::HandleGestureFling::ignored", |
| 261 TRACE_EVENT_SCOPE_THREAD); | 252 TRACE_EVENT_SCOPE_THREAD); |
| 262 if (gesture_event.sourceDevice == WebGestureEvent::Touchpad) { | 253 if (gesture_event.sourceDevice == WebGestureEvent::Touchpad) { |
| 263 // We still pass the curve to the main thread if there's nothing | 254 // We still pass the curve to the main thread if there's nothing |
| 264 // scrollable, in case something | 255 // scrollable, in case something |
| 265 // registers a handler before the curve is over. | 256 // registers a handler before the curve is over. |
| 266 return DidNotHandle; | 257 return DID_NOT_HANDLE; |
| 267 } | 258 } |
| 268 return DropEvent; | 259 return DROP_EVENT; |
| 269 } | 260 } |
| 270 } | 261 } |
| 271 return DidNotHandle; | 262 return DID_NOT_HANDLE; |
| 272 } | 263 } |
| 273 | 264 |
| 274 void InputHandlerProxy::Animate(base::TimeTicks time) { | 265 void InputHandlerProxy::Animate(base::TimeTicks time) { |
| 275 if (!fling_curve_) | 266 if (!fling_curve_) |
| 276 return; | 267 return; |
| 277 | 268 |
| 278 double monotonic_time_sec = (time - base::TimeTicks()).InSecondsF(); | 269 double monotonic_time_sec = (time - base::TimeTicks()).InSecondsF(); |
| 279 if (!fling_parameters_.startTime) { | 270 if (!fling_parameters_.startTime) { |
| 280 fling_parameters_.startTime = monotonic_time_sec; | 271 fling_parameters_.startTime = monotonic_time_sec; |
| 281 input_handler_->ScheduleAnimation(); | 272 input_handler_->ScheduleAnimation(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 synthetic_wheel.hasPreciseScrollingDeltas = true; | 325 synthetic_wheel.hasPreciseScrollingDeltas = true; |
| 335 synthetic_wheel.x = fling_parameters_.point.x; | 326 synthetic_wheel.x = fling_parameters_.point.x; |
| 336 synthetic_wheel.y = fling_parameters_.point.y; | 327 synthetic_wheel.y = fling_parameters_.point.y; |
| 337 synthetic_wheel.globalX = fling_parameters_.globalPoint.x; | 328 synthetic_wheel.globalX = fling_parameters_.globalPoint.x; |
| 338 synthetic_wheel.globalY = fling_parameters_.globalPoint.y; | 329 synthetic_wheel.globalY = fling_parameters_.globalPoint.y; |
| 339 synthetic_wheel.modifiers = fling_parameters_.modifiers; | 330 synthetic_wheel.modifiers = fling_parameters_.modifiers; |
| 340 | 331 |
| 341 InputHandlerProxy::EventDisposition disposition = | 332 InputHandlerProxy::EventDisposition disposition = |
| 342 HandleInputEventInternal(synthetic_wheel); | 333 HandleInputEventInternal(synthetic_wheel); |
| 343 switch (disposition) { | 334 switch (disposition) { |
| 344 case DidHandle: | 335 case DID_HANDLE: |
| 345 return true; | 336 return true; |
| 346 case DropEvent: | 337 case DROP_EVENT: |
| 347 break; | 338 break; |
| 348 case DidNotHandle: | 339 case DID_NOT_HANDLE: |
| 349 TRACE_EVENT_INSTANT0("renderer", | 340 TRACE_EVENT_INSTANT0("renderer", |
| 350 "InputHandlerProxy::scrollBy::AbortFling", | 341 "InputHandlerProxy::scrollBy::AbortFling", |
| 351 TRACE_EVENT_SCOPE_THREAD); | 342 TRACE_EVENT_SCOPE_THREAD); |
| 352 // If we got a DidNotHandle, that means we need to deliver wheels on the | 343 // If we got a DID_NOT_HANDLE, that means we need to deliver wheels on the |
| 353 // main thread. In this case we need to schedule a commit and transfer the | 344 // main thread. In this case we need to schedule a commit and transfer the |
| 354 // fling curve over to the main thread and run the rest of the wheels from | 345 // fling curve over to the main thread and run the rest of the wheels from |
| 355 // there. This can happen when flinging a page that contains a scrollable | 346 // there. This can happen when flinging a page that contains a scrollable |
| 356 // subarea that we can't scroll on the thread if the fling starts outside | 347 // subarea that we can't scroll on the thread if the fling starts outside |
| 357 // the subarea but then is flung "under" the pointer. | 348 // the subarea but then is flung "under" the pointer. |
| 358 client_->TransferActiveWheelFlingAnimation(fling_parameters_); | 349 client_->TransferActiveWheelFlingAnimation(fling_parameters_); |
| 359 fling_may_be_active_on_main_thread_ = true; | 350 fling_may_be_active_on_main_thread_ = true; |
| 360 CancelCurrentFling(); | 351 CancelCurrentFling(); |
| 361 break; | 352 break; |
| 362 } | 353 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 TRACE_EVENT2("renderer", | 393 TRACE_EVENT2("renderer", |
| 403 "InputHandlerProxy::notifyCurrentFlingVelocity", | 394 "InputHandlerProxy::notifyCurrentFlingVelocity", |
| 404 "vx", | 395 "vx", |
| 405 velocity.width, | 396 velocity.width, |
| 406 "vy", | 397 "vy", |
| 407 velocity.height); | 398 velocity.height); |
| 408 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); | 399 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); |
| 409 } | 400 } |
| 410 | 401 |
| 411 } // namespace content | 402 } // namespace content |
| OLD | NEW |