WheelEventDispatchMediator::WheelEventDispatchMediator(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view) { if (!(event.deltaX() || event.deltaY())) return; setEvent(WheelEvent::create(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()), deltaMode(event), view, event.globalPosition(), event.position(), event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.directionInvertedFromDevice())); }
PassRefPtrWillBeRawPtr<WheelEvent> WheelEvent::create(const PlatformWheelEvent& event, PassRefPtrWillBeRawPtr<AbstractView> view) { return adoptRefWillBeNoop(new WheelEvent(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()), convertDeltaMode(event), view, event.globalPosition(), event.position(), event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), MouseEvent::platformModifiersToButtons(event.modifiers()), event.canScroll(), event.hasPreciseScrollingDeltas(), static_cast<Event::RailsMode>(event.railsMode()))); }
WheelEvent::WheelEvent(const PlatformWheelEvent& event, DOMWindow* view) : MouseEvent(eventNames().wheelEvent, true, true, event.timestamp(), view, 0, event.globalPosition(), event.position() #if ENABLE(POINTER_LOCK) , { } #endif , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, 0, 0, false) , m_wheelDelta(event.wheelTicksX() * TickMultiplier, event.wheelTicksY() * TickMultiplier) , m_deltaX(-event.deltaX()) , m_deltaY(-event.deltaY()) , m_deltaMode(determineDeltaMode(event)) , m_wheelEvent(event) , m_initializedWithPlatformWheelEvent(true) { }