| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 updateWebMouseEventFromCoreMouseEvent(event, widget, *layoutObject, *this); | 615 updateWebMouseEventFromCoreMouseEvent(event, widget, *layoutObject, *this); |
| 615 deltaX = -event.deltaX(); | 616 deltaX = -event.deltaX(); |
| 616 deltaY = -event.deltaY(); | 617 deltaY = -event.deltaY(); |
| 617 wheelTicksX = event.ticksX(); | 618 wheelTicksX = event.ticksX(); |
| 618 wheelTicksY = event.ticksY(); | 619 wheelTicksY = event.ticksY(); |
| 619 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; | 620 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; |
| 620 canScroll = event.canScroll(); | 621 canScroll = event.canScroll(); |
| 621 resendingPluginId = event.resendingPluginId(); | 622 resendingPluginId = event.resendingPluginId(); |
| 622 railsMode = static_cast<RailsMode>(event.getRailsMode()); | 623 railsMode = static_cast<RailsMode>(event.getRailsMode()); |
| 623 hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas(); | 624 hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas(); |
| 625 dispatchType = event.cancelable() ? WebInputEvent::Blocking : WebInputEvent:
:EventNonBlocking; |
| 624 } | 626 } |
| 625 | 627 |
| 626 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) | 628 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) |
| 627 { | 629 { |
| 628 if (event.type() == EventTypeNames::keydown) | 630 if (event.type() == EventTypeNames::keydown) |
| 629 type = KeyDown; | 631 type = KeyDown; |
| 630 else if (event.type() == EventTypeNames::keyup) | 632 else if (event.type() == EventTypeNames::keyup) |
| 631 type = WebInputEvent::KeyUp; | 633 type = WebInputEvent::KeyUp; |
| 632 else if (event.type() == EventTypeNames::keypress) | 634 else if (event.type() == EventTypeNames::keypress) |
| 633 type = WebInputEvent::Char; | 635 type = WebInputEvent::Char; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 break; | 799 break; |
| 798 case GestureSourceTouchscreen: | 800 case GestureSourceTouchscreen: |
| 799 sourceDevice = WebGestureDeviceTouchscreen; | 801 sourceDevice = WebGestureDeviceTouchscreen; |
| 800 break; | 802 break; |
| 801 case GestureSourceUninitialized: | 803 case GestureSourceUninitialized: |
| 802 NOTREACHED(); | 804 NOTREACHED(); |
| 803 } | 805 } |
| 804 } | 806 } |
| 805 | 807 |
| 806 } // namespace blink | 808 } // namespace blink |
| OLD | NEW |