OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 m_deltaY = scaleDeltaToWindow(widget, e.deltaY); | 204 m_deltaY = scaleDeltaToWindow(widget, e.deltaY); |
205 m_wheelTicksX = e.wheelTicksX; | 205 m_wheelTicksX = e.wheelTicksX; |
206 m_wheelTicksY = e.wheelTicksY; | 206 m_wheelTicksY = e.wheelTicksY; |
207 m_granularity = e.scrollByPage ? | 207 m_granularity = e.scrollByPage ? |
208 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; | 208 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; |
209 | 209 |
210 m_type = PlatformEvent::Wheel; | 210 m_type = PlatformEvent::Wheel; |
211 | 211 |
212 m_timestamp = e.timeStampSeconds; | 212 m_timestamp = e.timeStampSeconds; |
213 m_modifiers = e.modifiers; | 213 m_modifiers = e.modifiers; |
| 214 m_dispatchType = toPlatformDispatchType(e.dispatchType); |
214 | 215 |
215 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; | 216 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; |
216 m_canScroll = e.canScroll; | 217 m_canScroll = e.canScroll; |
217 m_resendingPluginId = e.resendingPluginId; | 218 m_resendingPluginId = e.resendingPluginId; |
218 m_railsMode = static_cast<PlatformEvent::RailsMode>(e.railsMode); | 219 m_railsMode = static_cast<PlatformEvent::RailsMode>(e.railsMode); |
219 #if OS(MACOSX) | 220 #if OS(MACOSX) |
220 m_phase = static_cast<PlatformWheelEventPhase>(e.phase); | 221 m_phase = static_cast<PlatformWheelEventPhase>(e.phase); |
221 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase); | 222 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase); |
222 m_canRubberbandLeft = e.canRubberbandLeft; | 223 m_canRubberbandLeft = e.canRubberbandLeft; |
223 m_canRubberbandRight = e.canRubberbandRight; | 224 m_canRubberbandRight = e.canRubberbandRight; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 updateWebMouseEventFromCoreMouseEvent(event, widget, *layoutObject, *this); | 617 updateWebMouseEventFromCoreMouseEvent(event, widget, *layoutObject, *this); |
617 deltaX = -event.deltaX(); | 618 deltaX = -event.deltaX(); |
618 deltaY = -event.deltaY(); | 619 deltaY = -event.deltaY(); |
619 wheelTicksX = event.ticksX(); | 620 wheelTicksX = event.ticksX(); |
620 wheelTicksY = event.ticksY(); | 621 wheelTicksY = event.ticksY(); |
621 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; | 622 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; |
622 canScroll = event.canScroll(); | 623 canScroll = event.canScroll(); |
623 resendingPluginId = event.resendingPluginId(); | 624 resendingPluginId = event.resendingPluginId(); |
624 railsMode = static_cast<RailsMode>(event.getRailsMode()); | 625 railsMode = static_cast<RailsMode>(event.getRailsMode()); |
625 hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas(); | 626 hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas(); |
| 627 dispatchType = event.cancelable() ? WebInputEvent::Blocking : WebInputEvent:
:EventNonBlocking; |
626 } | 628 } |
627 | 629 |
628 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) | 630 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) |
629 { | 631 { |
630 if (event.type() == EventTypeNames::keydown) | 632 if (event.type() == EventTypeNames::keydown) |
631 type = KeyDown; | 633 type = KeyDown; |
632 else if (event.type() == EventTypeNames::keyup) | 634 else if (event.type() == EventTypeNames::keyup) |
633 type = WebInputEvent::KeyUp; | 635 type = WebInputEvent::KeyUp; |
634 else if (event.type() == EventTypeNames::keypress) | 636 else if (event.type() == EventTypeNames::keypress) |
635 type = WebInputEvent::Char; | 637 type = WebInputEvent::Char; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 break; | 801 break; |
800 case GestureSourceTouchscreen: | 802 case GestureSourceTouchscreen: |
801 sourceDevice = WebGestureDeviceTouchscreen; | 803 sourceDevice = WebGestureDeviceTouchscreen; |
802 break; | 804 break; |
803 case GestureSourceUninitialized: | 805 case GestureSourceUninitialized: |
804 NOTREACHED(); | 806 NOTREACHED(); |
805 } | 807 } |
806 } | 808 } |
807 | 809 |
808 } // namespace blink | 810 } // namespace blink |
OLD | NEW |