| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
unsigned deltaMode, | 88 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
unsigned deltaMode, |
| 89 AbstractView* view, const IntPoint& screenLocation, const IntPoint& windowLo
cation, | 89 AbstractView* view, const IntPoint& screenLocation, const IntPoint& windowLo
cation, |
| 90 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformT
imeStamp, | 90 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformT
imeStamp, |
| 91 int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode,
bool cancelable) | 91 int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode,
bool cancelable) |
| 92 : MouseEvent(EventTypeNames::wheel, true, cancelable, view, 0, screenLocatio
n.x(), screenLocation.y(), | 92 : MouseEvent(EventTypeNames::wheel, true, cancelable, view, 0, screenLocatio
n.x(), screenLocation.y(), |
| 93 windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons, | 93 windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons, |
| 94 nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable, | 94 nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable, |
| 95 // TODO(zino): Should support canvas hit region because the wheel event | 95 // TODO(zino): Should support canvas hit region because the wheel event |
| 96 // is a kind of mouse event. Please see http://crbug.com/594075 | 96 // is a kind of mouse event. Please see http://crbug.com/594075 |
| 97 String()) | 97 String(), |
| 98 nullptr) |
| 98 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl
ier) | 99 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl
ier) |
| 99 , m_deltaX(-rawDelta.x()) | 100 , m_deltaX(-rawDelta.x()) |
| 100 , m_deltaY(-rawDelta.y()) | 101 , m_deltaY(-rawDelta.y()) |
| 101 , m_deltaZ(0) | 102 , m_deltaZ(0) |
| 102 , m_deltaMode(deltaMode) | 103 , m_deltaMode(deltaMode) |
| 103 , m_resendingPluginId(resendingPluginId) | 104 , m_resendingPluginId(resendingPluginId) |
| 104 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) | 105 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) |
| 105 , m_railsMode(railsMode) | 106 , m_railsMode(railsMode) |
| 106 #if OS(MACOSX) | 107 #if OS(MACOSX) |
| 107 , m_phase(WheelEventPhaseNone) | 108 , m_phase(WheelEventPhaseNone) |
| 108 , m_momentumPhase(WheelEventPhaseNone) | 109 , m_momentumPhase(WheelEventPhaseNone) |
| 109 #endif | 110 #endif |
| 110 { | 111 { |
| 111 } | 112 } |
| 112 | 113 |
| 113 #if OS(MACOSX) | 114 #if OS(MACOSX) |
| 114 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
unsigned deltaMode, | 115 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
unsigned deltaMode, |
| 115 AbstractView* view, const IntPoint& screenLocation, const IntPoint& windowLo
cation, | 116 AbstractView* view, const IntPoint& screenLocation, const IntPoint& windowLo
cation, |
| 116 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformT
imeStamp, | 117 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformT
imeStamp, |
| 117 int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode,
bool cancelable, | 118 int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode,
bool cancelable, |
| 118 WheelEventPhase phase, WheelEventPhase momentumPhase) | 119 WheelEventPhase phase, WheelEventPhase momentumPhase) |
| 119 : MouseEvent(EventTypeNames::wheel, true, cancelable, view, 0, screenLocatio
n.x(), screenLocation.y(), | 120 : MouseEvent(EventTypeNames::wheel, true, cancelable, view, 0, screenLocatio
n.x(), screenLocation.y(), |
| 120 windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons, | 121 windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons, |
| 121 nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable, | 122 nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable, |
| 122 // TODO(zino): Should support canvas hit region because the wheel event | 123 // TODO(zino): Should support canvas hit region because the wheel event |
| 123 // is a kind of mouse event. Please see http://crbug.com/594075 | 124 // is a kind of mouse event. Please see http://crbug.com/594075 |
| 124 String()) | 125 String(), nullptr) |
| 125 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl
ier) | 126 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl
ier) |
| 126 , m_deltaX(-rawDelta.x()) | 127 , m_deltaX(-rawDelta.x()) |
| 127 , m_deltaY(-rawDelta.y()) | 128 , m_deltaY(-rawDelta.y()) |
| 128 , m_deltaZ(0) | 129 , m_deltaZ(0) |
| 129 , m_deltaMode(deltaMode) | 130 , m_deltaMode(deltaMode) |
| 130 , m_resendingPluginId(resendingPluginId) | 131 , m_resendingPluginId(resendingPluginId) |
| 131 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) | 132 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) |
| 132 , m_railsMode(railsMode) | 133 , m_railsMode(railsMode) |
| 133 , m_phase(phase) | 134 , m_phase(phase) |
| 134 , m_momentumPhase(momentumPhase) | 135 , m_momentumPhase(momentumPhase) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 155 { | 156 { |
| 156 return EventDispatchMediator::create(this); | 157 return EventDispatchMediator::create(this); |
| 157 } | 158 } |
| 158 | 159 |
| 159 DEFINE_TRACE(WheelEvent) | 160 DEFINE_TRACE(WheelEvent) |
| 160 { | 161 { |
| 161 MouseEvent::trace(visitor); | 162 MouseEvent::trace(visitor); |
| 162 } | 163 } |
| 163 | 164 |
| 164 } // namespace blink | 165 } // namespace blink |
| OLD | NEW |