view modules/web/src/main/native/Source/WebCore/platform/java/WheelEventJava.cpp @ 5976:94331ac42150

RT-25869: Update copyright year in header of modified source code files to 2013 Reviewed-by: Mong Hang Vo
author kcr
date Mon, 23 Dec 2013 13:46:39 -0800
parents bcd662ba5826
children
line wrap: on
line source
/*
 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 */
#include "config.h"

#include "PlatformWheelEvent.h"

namespace WebCore {

PlatformWheelEvent::PlatformWheelEvent(
    const IntPoint& pos,
    const IntPoint& globalPos,
    float deltaX,
    float deltaY,
    bool shiftKey,
    bool ctrlKey,
    bool altKey,
    bool metaKey)
: PlatformEvent(
        PlatformEvent::Wheel,
        shiftKey,
        ctrlKey,
        altKey,
        metaKey,
        0.0)
, m_position(pos)
, m_globalPosition(globalPos)
      // For some unknown reason, EventHandler expects deltaX/deltaY < 0 for
      // ScrollRight/ScrollDown, and deltaX/deltaY > 0 for ScrollLeft/ScrollUp.
      // Java mouse wheel events behave in reverse way, so need a negation here.
, m_deltaX(-deltaX)
, m_deltaY(-deltaY)
, m_wheelTicksX(-deltaX)
, m_wheelTicksY(-deltaY)
, m_granularity(ScrollByPixelWheelEvent)
, m_directionInvertedFromDevice(false)
{
}

} // namespace WebCore