| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 m_client->didHandleInputEvent(); | 105 m_client->didHandleInputEvent(); |
| 106 break; | 106 break; |
| 107 case DidNotHandle: | 107 case DidNotHandle: |
| 108 m_client->didNotHandleInputEvent(true /* sendToWidget */); | 108 m_client->didNotHandleInputEvent(true /* sendToWidget */); |
| 109 break; | 109 break; |
| 110 case DropEvent: | 110 case DropEvent: |
| 111 m_client->didNotHandleInputEvent(false /* sendToWidget */); | 111 m_client->didNotHandleInputEvent(false /* sendToWidget */); |
| 112 break; | 112 break; |
| 113 } | 113 } |
| 114 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) | 114 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) |
| 115 m_inputHandlerClient->didReceiveLastInputEventForVSync(); | 115 m_inputHandlerClient->didReceiveLastInputEventForVSync(event.timeStampSe
conds); |
| 116 } | 116 } |
| 117 | 117 |
| 118 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
andleInputEventInternal(const WebInputEvent& event) | 118 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
andleInputEventInternal(const WebInputEvent& event) |
| 119 { | 119 { |
| 120 if (event.type == WebInputEvent::MouseWheel) { | 120 if (event.type == WebInputEvent::MouseWheel) { |
| 121 const WebMouseWheelEvent& wheelEvent = *static_cast<const WebMouseWheelE
vent*>(&event); | 121 const WebMouseWheelEvent& wheelEvent = *static_cast<const WebMouseWheelE
vent*>(&event); |
| 122 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient-
>scrollBegin(WebPoint(wheelEvent.x, wheelEvent.y), WebInputHandlerClient::Scroll
InputTypeWheel); | 122 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient-
>scrollBegin(WebPoint(wheelEvent.x, wheelEvent.y), WebInputHandlerClient::Scroll
InputTypeWheel); |
| 123 switch (scrollStatus) { | 123 switch (scrollStatus) { |
| 124 case WebInputHandlerClient::ScrollStatusStarted: { | 124 case WebInputHandlerClient::ScrollStatusStarted: { |
| 125 TRACE_EVENT_INSTANT2("webkit", "WebCompositorInputHandlerImpl::handl
eInput wheel scroll", "deltaX", -wheelEvent.deltaX, "deltaY", -wheelEvent.deltaY
); | 125 TRACE_EVENT_INSTANT2("webkit", "WebCompositorInputHandlerImpl::handl
eInput wheel scroll", "deltaX", -wheelEvent.deltaX, "deltaY", -wheelEvent.deltaY
); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 m_flingParameters.cumulativeScroll.height += increment.height; | 360 m_flingParameters.cumulativeScroll.height += increment.height; |
| 361 } | 361 } |
| 362 } | 362 } |
| 363 | 363 |
| 364 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() | 364 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() |
| 365 { | 365 { |
| 366 m_flingActiveOnMainThread = false; | 366 m_flingActiveOnMainThread = false; |
| 367 } | 367 } |
| 368 | 368 |
| 369 } | 369 } |
| OLD | NEW |