| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 if (e.modifiers & WebInputEvent::ShiftKey) | 143 if (e.modifiers & WebInputEvent::ShiftKey) |
| 144 m_modifiers |= PlatformEvent::ShiftKey; | 144 m_modifiers |= PlatformEvent::ShiftKey; |
| 145 if (e.modifiers & WebInputEvent::ControlKey) | 145 if (e.modifiers & WebInputEvent::ControlKey) |
| 146 m_modifiers |= PlatformEvent::CtrlKey; | 146 m_modifiers |= PlatformEvent::CtrlKey; |
| 147 if (e.modifiers & WebInputEvent::AltKey) | 147 if (e.modifiers & WebInputEvent::AltKey) |
| 148 m_modifiers |= PlatformEvent::AltKey; | 148 m_modifiers |= PlatformEvent::AltKey; |
| 149 if (e.modifiers & WebInputEvent::MetaKey) | 149 if (e.modifiers & WebInputEvent::MetaKey) |
| 150 m_modifiers |= PlatformEvent::MetaKey; | 150 m_modifiers |= PlatformEvent::MetaKey; |
| 151 | 151 |
| 152 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; | 152 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; |
| 153 #if OS(MACOSX) | |
| 154 m_phase = static_cast<PlatformWheelEventPhase>(e.phase); | |
| 155 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase); | |
| 156 m_timestamp = e.timeStampSeconds; | |
| 157 m_scrollCount = 0; | |
| 158 m_unacceleratedScrollingDeltaX = e.deltaX; | |
| 159 m_unacceleratedScrollingDeltaY = e.deltaY; | |
| 160 m_canRubberbandLeft = e.canRubberbandLeft; | |
| 161 m_canRubberbandRight = e.canRubberbandRight; | |
| 162 #endif | |
| 163 } | 153 } |
| 164 | 154 |
| 165 // PlatformGestureEventBuilder -------------------------------------------------
- | 155 // PlatformGestureEventBuilder -------------------------------------------------
- |
| 166 | 156 |
| 167 PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
ebGestureEvent& e) | 157 PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
ebGestureEvent& e) |
| 168 { | 158 { |
| 169 float scale = widgetInputEventsScaleFactor(widget); | 159 float scale = widgetInputEventsScaleFactor(widget); |
| 170 IntSize offset = widgetInputEventsOffset(widget); | 160 IntSize offset = widgetInputEventsOffset(widget); |
| 171 | 161 |
| 172 switch (e.type) { | 162 switch (e.type) { |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 modifiers = getWebInputModifiers(event); | 774 modifiers = getWebInputModifiers(event); |
| 785 | 775 |
| 786 globalX = event.screenX(); | 776 globalX = event.screenX(); |
| 787 globalY = event.screenY(); | 777 globalY = event.screenY(); |
| 788 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 778 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
| 789 x = localPoint.x(); | 779 x = localPoint.x(); |
| 790 y = localPoint.y(); | 780 y = localPoint.y(); |
| 791 } | 781 } |
| 792 | 782 |
| 793 } // namespace blink | 783 } // namespace blink |
| OLD | NEW |