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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 m_wheelTicksX = e.wheelTicksX; | 189 m_wheelTicksX = e.wheelTicksX; |
190 m_wheelTicksY = e.wheelTicksY; | 190 m_wheelTicksY = e.wheelTicksY; |
191 m_granularity = e.scrollByPage ? | 191 m_granularity = e.scrollByPage ? |
192 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; | 192 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; |
193 | 193 |
194 m_type = PlatformEvent::Wheel; | 194 m_type = PlatformEvent::Wheel; |
195 | 195 |
196 m_modifiers = toPlatformMouseEventModifiers(e.modifiers); | 196 m_modifiers = toPlatformMouseEventModifiers(e.modifiers); |
197 | 197 |
198 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; | 198 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; |
| 199 m_canScroll = e.canScroll; |
199 #if OS(MACOSX) | 200 #if OS(MACOSX) |
200 m_phase = static_cast<PlatformWheelEventPhase>(e.phase); | 201 m_phase = static_cast<PlatformWheelEventPhase>(e.phase); |
201 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase); | 202 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase); |
202 m_timestamp = e.timeStampSeconds; | 203 m_timestamp = e.timeStampSeconds; |
203 m_canRubberbandLeft = e.canRubberbandLeft; | 204 m_canRubberbandLeft = e.canRubberbandLeft; |
204 m_canRubberbandRight = e.canRubberbandRight; | 205 m_canRubberbandRight = e.canRubberbandRight; |
205 #endif | 206 #endif |
206 } | 207 } |
207 | 208 |
208 // PlatformGestureEventBuilder -------------------------------------------------
- | 209 // PlatformGestureEventBuilder -------------------------------------------------
- |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 { | 635 { |
635 if (event.type() != EventTypeNames::wheel && event.type() != EventTypeNames:
:mousewheel) | 636 if (event.type() != EventTypeNames::wheel && event.type() != EventTypeNames:
:mousewheel) |
636 return; | 637 return; |
637 type = WebInputEvent::MouseWheel; | 638 type = WebInputEvent::MouseWheel; |
638 updateWebMouseEventFromCoreMouseEvent(event, widget, *renderObject, *this); | 639 updateWebMouseEventFromCoreMouseEvent(event, widget, *renderObject, *this); |
639 deltaX = -event.deltaX(); | 640 deltaX = -event.deltaX(); |
640 deltaY = -event.deltaY(); | 641 deltaY = -event.deltaY(); |
641 wheelTicksX = event.ticksX(); | 642 wheelTicksX = event.ticksX(); |
642 wheelTicksY = event.ticksY(); | 643 wheelTicksY = event.ticksY(); |
643 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; | 644 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; |
| 645 canScroll = event.canScroll(); |
644 } | 646 } |
645 | 647 |
646 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) | 648 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) |
647 { | 649 { |
648 if (event.type() == EventTypeNames::keydown) | 650 if (event.type() == EventTypeNames::keydown) |
649 type = KeyDown; | 651 type = KeyDown; |
650 else if (event.type() == EventTypeNames::keyup) | 652 else if (event.type() == EventTypeNames::keyup) |
651 type = WebInputEvent::KeyUp; | 653 type = WebInputEvent::KeyUp; |
652 else if (event.type() == EventTypeNames::keypress) | 654 else if (event.type() == EventTypeNames::keypress) |
653 type = WebInputEvent::Char; | 655 type = WebInputEvent::Char; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 modifiers = getWebInputModifiers(event); | 802 modifiers = getWebInputModifiers(event); |
801 | 803 |
802 globalX = event.screenX(); | 804 globalX = event.screenX(); |
803 globalY = event.screenY(); | 805 globalY = event.screenY(); |
804 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 806 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
805 x = localPoint.x(); | 807 x = localPoint.x(); |
806 y = localPoint.y(); | 808 y = localPoint.y(); |
807 } | 809 } |
808 | 810 |
809 } // namespace blink | 811 } // namespace blink |
OLD | NEW |