Changeset 121025 in webkit
- Timestamp:
- Jun 22, 2012 8:18:46 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121022 r121025 1 2012-06-22 Robert Kroeger <rjkroege@chromium.org> 2 3 Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true 4 https://bugs.webkit.org/show_bug.cgi?id=89580 5 6 WebKit GTK and Chromium Linux force vertical wheel events to 7 scroll horizontally when over horizontal scroll bars. This is 8 undesirable for touchpad scrolling with 9 hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal 10 to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas. 11 12 Reviewed by Adam Barth. 13 14 Unit tests in EventHandlerTest.cpp 15 16 * page/EventHandler.cpp: 17 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 18 (WebCore::EventHandler::handleWheelEvent): 19 * page/EventHandler.h: 20 (EventHandler): 21 * page/chromium/EventHandlerChromium.cpp: 22 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 23 * page/gtk/EventHandlerGtk.cpp: 24 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 25 1 26 2012-06-22 Ilya Tikhonovsky <loislo@chromium.org> 2 27 -
trunk/Source/WebCore/page/EventHandler.cpp
r120597 r121025 2285 2285 2286 2286 #if !PLATFORM(GTK) && !(PLATFORM(CHROMIUM) && (OS(UNIX) && !OS(DARWIN))) 2287 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& ) const2287 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const 2288 2288 { 2289 2289 return false; … … 2340 2340 // appropriately. 2341 2341 PlatformWheelEvent event = e; 2342 if (m_baseEventType == PlatformEvent::NoType && shouldTurnVerticalTicksIntoHorizontal(result ))2342 if (m_baseEventType == PlatformEvent::NoType && shouldTurnVerticalTicksIntoHorizontal(result, e)) 2343 2343 event = event.copyTurningVerticalTicksIntoHorizontalTicks(); 2344 2344 -
trunk/Source/WebCore/page/EventHandler.h
r118611 r121025 48 48 #include <wtf/HashMap.h> 49 49 #endif 50 51 class EventHandlerTest; 50 52 51 53 namespace WebCore { … … 228 230 229 231 private: 232 friend class ::EventHandlerTest; 233 230 234 #if ENABLE(DRAG_SUPPORT) 231 235 static DragState& dragState(); … … 267 271 bool logicalScrollOverflow(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0); 268 272 269 bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& ) const;273 bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const; 270 274 bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; } 271 275 -
trunk/Source/WebCore/page/chromium/EventHandlerChromium.cpp
r103297 r121025 159 159 // horizontal scrollbar while scrolling with the wheel. 160 160 // This code comes from gtk/EventHandlerGtk.cpp. 161 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result ) const161 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result, const PlatformWheelEvent& event) const 162 162 { 163 return result.scrollbar() && result.scrollbar()->orientation() == HorizontalScrollbar;163 return !event.hasPreciseScrollingDeltas() && result.scrollbar() && result.scrollbar()->orientation() == HorizontalScrollbar; 164 164 } 165 165 #endif -
trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp
r103196 r121025 127 127 // add the deltas and ticks here so that this behavior is consistent 128 128 // for styled scrollbars. 129 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result ) const129 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result, const PlatformWheelEvent&) const 130 130 { 131 131 return result.scrollbar() && result.scrollbar()->orientation() == HorizontalScrollbar; -
trunk/Source/WebKit/chromium/ChangeLog
r121016 r121025 1 2012-06-22 Robert Kroeger <rjkroege@chromium.org> 2 3 Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true 4 https://bugs.webkit.org/show_bug.cgi?id=89580 5 6 WebKit GTK and Chromium Linux force vertical wheel events to 7 scroll horizontally when over horizontal scroll bars. This is 8 undesirable for touchpad scrolling with hasPreciseScrollingDeltas() == true. 9 10 Added unit tests to show that 11 EventHandler::shouldTurnVerticalTicksIntoHorizontal() is true 12 only for PlatformWheelEvents when !hasPreciseScrollingDeltas(). 13 14 Reviewed by Adam Barth. 15 16 * WebKit.gypi: 17 * tests/EventHandlerTest.cpp: Added. 18 (MockScrollbar): 19 (MockScrollbar::MockScrollbar): 20 (MockScrollbar::~MockScrollbar): 21 (MockHitTestResult): 22 (MockHitTestResult::MockHitTestResult): 23 (MockHitTestResult::scrollbar): 24 (MockPlatformWheelEvent): 25 (MockPlatformWheelEvent::MockPlatformWheelEvent): 26 (EventHandlerTest): 27 (EventHandlerTest::EventHandlerTest): 28 (EventHandlerTest::externalShouldTurnVerticalTicksIntoHorizontal): 29 (TEST): 30 1 31 2012-06-22 Amy Ousterhout <aousterh@chromium.org> 2 32 -
trunk/Source/WebKit/chromium/WebKit.gypi
r120360 r121025 103 103 'tests/DragImageTest.cpp', 104 104 'tests/DrawingBufferChromiumTest.cpp', 105 'tests/EventHandlerTest.cpp', 105 106 'tests/EventListenerTest.cpp', 106 107 'tests/FakeCCLayerTreeHostClient.h',
Note: See TracChangeset
for help on using the changeset viewer.