Changeset 76622 in webkit
- Timestamp:
- Jan 25, 2011 11:54:58 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76621 r76622 1 2011-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 1 14 2011-01-20 Jer Noble <jer.noble@apple.com> 2 15 -
trunk/Source/WebCore/platform/PlatformWheelEvent.h
r75661 r76622 99 99 , m_metaKey(false) 100 100 #if PLATFORM(MAC) 101 , m_hasPreciseScrollingDeltas(false) 101 102 , m_phase(PlatformWheelEventPhaseNone) 102 103 #endif … … 152 153 153 154 PlatformWheelEventPhase phase() const { return m_phase; } 155 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; } 154 156 #endif 155 157 … … 187 189 bool m_metaKey; 188 190 #if PLATFORM(MAC) 191 bool m_hasPreciseScrollingDeltas; 189 192 PlatformWheelEventPhase m_phase; 190 193 #endif -
trunk/Source/WebCore/platform/mac/WheelEventMac.mm
r75668 r76622 72 72 m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep()); 73 73 m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep()); 74 m_hasPreciseScrollingDeltas = true; 74 75 } else { 75 76 m_wheelTicksX = m_deltaX; … … 77 78 m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep()); 78 79 m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep()); 80 m_hasPreciseScrollingDeltas = false; 79 81 } 80 82 } -
trunk/Source/WebKit2/ChangeLog
r76617 r76622 1 2011-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 1 17 2011-01-25 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/Source/WebKit2/Shared/WebEvent.h
r75667 r76622 167 167 WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Modifiers, double timestamp); 168 168 #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); 170 170 #endif 171 171 … … 177 177 #if PLATFORM(MAC) 178 178 Phase phase() const { return static_cast<Phase>(m_phase); } 179 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; } 179 180 #endif 180 181 … … 192 193 #if PLATFORM(MAC) 193 194 uint32_t m_phase; // Phase 195 bool m_hasPreciseScrollingDeltas; 194 196 #endif 195 197 }; -
trunk/Source/WebKit2/Shared/WebEventConversion.cpp
r75661 r76622 113 113 #if PLATFORM(MAC) 114 114 m_phase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.phase()); 115 m_hasPreciseScrollingDeltas = webEvent.hasPreciseScrollingDeltas(); 115 116 #endif 116 117 } -
trunk/Source/WebKit2/Shared/WebWheelEvent.cpp
r75661 r76622 45 45 46 46 #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)47 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) 48 48 : WebEvent(type, modifiers, timestamp) 49 49 , m_position(position) … … 53 53 , m_granularity(granularity) 54 54 , m_phase(phase) 55 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) 55 56 { 56 57 ASSERT(isWheelEventType(type)); -
trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm
r75661 r76622 1021 1021 1022 1022 WebWheelEvent::Phase phase = phaseForEvent(event); 1023 bool hasPreciseScrollingDeltas = continuous; 1023 1024 WebEvent::Modifiers modifiers = modifiersForEvent(event); 1024 1025 double timestamp = [event timestamp]; 1025 1026 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); 1027 1028 } 1028 1029
Note: See TracChangeset
for help on using the changeset viewer.