diff options
Diffstat (limited to 'third_party/WebKit')
8 files changed, 42 insertions, 3 deletions
diff --git a/third_party/WebKit/Source/WebCore/ChangeLog b/third_party/WebKit/Source/WebCore/ChangeLog index b3d85a7..7448341 100644 --- a/third_party/WebKit/Source/WebCore/ChangeLog +++ b/third_party/WebKit/Source/WebCore/ChangeLog @@ -1,3 +1,16 @@ +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-20 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. diff --git a/third_party/WebKit/Source/WebCore/platform/PlatformWheelEvent.h b/third_party/WebKit/Source/WebCore/platform/PlatformWheelEvent.h index 1e5cd53..81e2243 100644 --- a/third_party/WebKit/Source/WebCore/platform/PlatformWheelEvent.h +++ b/third_party/WebKit/Source/WebCore/platform/PlatformWheelEvent.h @@ -98,6 +98,7 @@ namespace WebCore { , m_altKey(false) , m_metaKey(false) #if PLATFORM(MAC) + , m_hasPreciseScrollingDeltas(false) , m_phase(PlatformWheelEventPhaseNone) #endif { @@ -151,6 +152,7 @@ namespace WebCore { #endif PlatformWheelEventPhase phase() const { return m_phase; } + bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; } #endif #if PLATFORM(QT) @@ -186,6 +188,7 @@ namespace WebCore { bool m_altKey; bool m_metaKey; #if PLATFORM(MAC) + bool m_hasPreciseScrollingDeltas; PlatformWheelEventPhase m_phase; #endif }; diff --git a/third_party/WebKit/Source/WebCore/platform/mac/WheelEventMac.mm b/third_party/WebKit/Source/WebCore/platform/mac/WheelEventMac.mm index d4fc698..422bb76 100644 --- a/third_party/WebKit/Source/WebCore/platform/mac/WheelEventMac.mm +++ b/third_party/WebKit/Source/WebCore/platform/mac/WheelEventMac.mm @@ -71,11 +71,13 @@ PlatformWheelEvent::PlatformWheelEvent(NSEvent* event, NSView *windowView) if (continuous) { m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep()); m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep()); + m_hasPreciseScrollingDeltas = true; } else { m_wheelTicksX = m_deltaX; m_wheelTicksY = m_deltaY; m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep()); m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep()); + m_hasPreciseScrollingDeltas = false; } } diff --git a/third_party/WebKit/Source/WebKit2/ChangeLog b/third_party/WebKit/Source/WebKit2/ChangeLog index 6e2a110..7f02c91 100644 --- a/third_party/WebKit/Source/WebKit2/ChangeLog +++ b/third_party/WebKit/Source/WebKit2/ChangeLog @@ -1,3 +1,19 @@ +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): + 2011-01-25 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. diff --git a/third_party/WebKit/Source/WebKit2/Shared/WebEvent.h b/third_party/WebKit/Source/WebKit2/Shared/WebEvent.h index f048d6e..2193b6c 100644 --- a/third_party/WebKit/Source/WebKit2/Shared/WebEvent.h +++ b/third_party/WebKit/Source/WebKit2/Shared/WebEvent.h @@ -166,7 +166,7 @@ public: WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Modifiers, double timestamp); #if PLATFORM(MAC) - WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Phase, Modifiers, double timestamp); + 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); #endif const WebCore::IntPoint position() const { return m_position; } @@ -176,6 +176,7 @@ public: Granularity granularity() const { return static_cast<Granularity>(m_granularity); } #if PLATFORM(MAC) Phase phase() const { return static_cast<Phase>(m_phase); } + bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; } #endif void encode(CoreIPC::ArgumentEncoder*) const; @@ -191,6 +192,7 @@ private: uint32_t m_granularity; // Granularity #if PLATFORM(MAC) uint32_t m_phase; // Phase + bool m_hasPreciseScrollingDeltas; #endif }; diff --git a/third_party/WebKit/Source/WebKit2/Shared/WebEventConversion.cpp b/third_party/WebKit/Source/WebKit2/Shared/WebEventConversion.cpp index 14c51b7..70538b0 100644 --- a/third_party/WebKit/Source/WebKit2/Shared/WebEventConversion.cpp +++ b/third_party/WebKit/Source/WebKit2/Shared/WebEventConversion.cpp @@ -112,6 +112,7 @@ public: m_metaKey = webEvent.metaKey(); #if PLATFORM(MAC) m_phase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.phase()); + m_hasPreciseScrollingDeltas = webEvent.hasPreciseScrollingDeltas(); #endif } }; diff --git a/third_party/WebKit/Source/WebKit2/Shared/WebWheelEvent.cpp b/third_party/WebKit/Source/WebKit2/Shared/WebWheelEvent.cpp index 570b8e0..c7cf938 100644 --- a/third_party/WebKit/Source/WebKit2/Shared/WebWheelEvent.cpp +++ b/third_party/WebKit/Source/WebKit2/Shared/WebWheelEvent.cpp @@ -44,7 +44,7 @@ WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint } #if PLATFORM(MAC) -WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Phase phase, Modifiers modifiers, double timestamp) +WebWheelEvent::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) : WebEvent(type, modifiers, timestamp) , m_position(position) , m_globalPosition(globalPosition) @@ -52,6 +52,7 @@ WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint , m_wheelTicks(wheelTicks) , m_granularity(granularity) , m_phase(phase) + , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) { ASSERT(isWheelEventType(type)); } diff --git a/third_party/WebKit/Source/WebKit2/Shared/mac/WebEventFactory.mm b/third_party/WebKit/Source/WebKit2/Shared/mac/WebEventFactory.mm index 46ff906..19c2a70 100644 --- a/third_party/WebKit/Source/WebKit2/Shared/mac/WebEventFactory.mm +++ b/third_party/WebKit/Source/WebKit2/Shared/mac/WebEventFactory.mm @@ -1020,10 +1020,11 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windo } WebWheelEvent::Phase phase = phaseForEvent(event); + bool hasPreciseScrollingDeltas = continuous; WebEvent::Modifiers modifiers = modifiersForEvent(event); double timestamp = [event timestamp]; - return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, phase, modifiers, timestamp); + return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, phase, hasPreciseScrollingDeltas, modifiers, timestamp); } WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(NSEvent *event, NSView *) |
