Changeset 76622 in webkit


Ignore:
Timestamp:
Jan 25, 2011 11:54:58 AM (13 years ago)
Author:
weinig@apple.com
Message:

2011-01-25 Sam Weinig <sam@webkit.org>

Reviewed by Anders Carlsson.

Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
https://bugs.webkit.org/show_bug.cgi?id=53107

  • platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): (WebCore::PlatformWheelEvent::hasPreciseScrollingDeltas):
  • platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2011-01-25 Sam Weinig <sam@webkit.org>

Reviewed by Anders Carlsson.

Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
https://bugs.webkit.org/show_bug.cgi?id=53107

  • Shared/WebEvent.h: (WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
  • Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
  • Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent):
  • Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebWheelEvent):
Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76621 r76622  
     12011-01-25  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
     6        https://bugs.webkit.org/show_bug.cgi?id=53107
     7
     8        * platform/PlatformWheelEvent.h:
     9        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
     10        (WebCore::PlatformWheelEvent::hasPreciseScrollingDeltas):
     11        * platform/mac/WheelEventMac.mm:
     12        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
     13
    1142011-01-20  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/Source/WebCore/platform/PlatformWheelEvent.h

    r75661 r76622  
    9999            , m_metaKey(false)
    100100#if PLATFORM(MAC)
     101            , m_hasPreciseScrollingDeltas(false)
    101102            , m_phase(PlatformWheelEventPhaseNone)
    102103#endif
     
    152153
    153154        PlatformWheelEventPhase phase() const { return m_phase; }
     155        bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
    154156#endif
    155157
     
    187189        bool m_metaKey;
    188190#if PLATFORM(MAC)
     191        bool m_hasPreciseScrollingDeltas;
    189192        PlatformWheelEventPhase m_phase;
    190193#endif
  • trunk/Source/WebCore/platform/mac/WheelEventMac.mm

    r75668 r76622  
    7272        m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep());
    7373        m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep());
     74        m_hasPreciseScrollingDeltas = true;
    7475    } else {
    7576        m_wheelTicksX = m_deltaX;
     
    7778        m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep());
    7879        m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep());
     80        m_hasPreciseScrollingDeltas = false;
    7981    }
    8082}
  • trunk/Source/WebKit2/ChangeLog

    r76617 r76622  
     12011-01-25  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
     6        https://bugs.webkit.org/show_bug.cgi?id=53107
     7
     8        * Shared/WebEvent.h:
     9        (WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
     10        * Shared/WebEventConversion.cpp:
     11        (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
     12        * Shared/WebWheelEvent.cpp:
     13        (WebKit::WebWheelEvent::WebWheelEvent):
     14        * Shared/mac/WebEventFactory.mm:
     15        (WebKit::WebEventFactory::createWebWheelEvent):
     16
    1172011-01-25  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WebKit2/Shared/WebEvent.h

    r75667 r76622  
    167167    WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Modifiers, double timestamp);
    168168#if PLATFORM(MAC)
    169     WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Phase, Modifiers, double timestamp);
     169    WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Phase, bool hasPreciseScrollingDeltas, Modifiers, double timestamp);
    170170#endif
    171171
     
    177177#if PLATFORM(MAC)
    178178    Phase phase() const { return static_cast<Phase>(m_phase); }
     179    bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
    179180#endif
    180181
     
    192193#if PLATFORM(MAC)
    193194    uint32_t m_phase; // Phase
     195    bool m_hasPreciseScrollingDeltas;
    194196#endif
    195197};
  • trunk/Source/WebKit2/Shared/WebEventConversion.cpp

    r75661 r76622  
    113113#if PLATFORM(MAC)
    114114        m_phase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.phase());
     115        m_hasPreciseScrollingDeltas = webEvent.hasPreciseScrollingDeltas();
    115116#endif
    116117    }
  • trunk/Source/WebKit2/Shared/WebWheelEvent.cpp

    r75661 r76622  
    4545
    4646#if PLATFORM(MAC)
    47 WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Phase phase, Modifiers modifiers, double timestamp)
     47WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Phase phase, bool hasPreciseScrollingDeltas, Modifiers modifiers, double timestamp)
    4848    : WebEvent(type, modifiers, timestamp)
    4949    , m_position(position)
     
    5353    , m_granularity(granularity)
    5454    , m_phase(phase)
     55    , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
    5556{
    5657    ASSERT(isWheelEventType(type));
  • trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm

    r75661 r76622  
    10211021
    10221022    WebWheelEvent::Phase phase              = phaseForEvent(event);
     1023    bool hasPreciseScrollingDeltas          = continuous;
    10231024    WebEvent::Modifiers modifiers           = modifiersForEvent(event);
    10241025    double timestamp                        = [event timestamp];
    10251026   
    1026     return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, phase, modifiers, timestamp);
     1027    return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, phase, hasPreciseScrollingDeltas, modifiers, timestamp);
    10271028}
    10281029
Note: See TracChangeset for help on using the changeset viewer.