Changeset 122399 in webkit
- Timestamp:
- Jul 11, 2012 6:29:03 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r122392 r122399 1 2012-07-11 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. Added a layout test showing 10 that change correctly suppresses this behaviour. 11 12 Reviewed by Adam Barth. 13 14 * fast/events/touch/gesture/touch-gesture-scroll-sideways-expected.txt: Added. 15 * fast/events/touch/gesture/touch-gesture-scroll-sideways.html: Added. 16 * platform/chromium-linux/fast/events/touch/gesture/touch-gesture-scroll-sideways-expected.txt: Added. Note: test has intentional platform difference. 17 1 18 2012-07-11 Filip Pizlo <fpizlo@apple.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r122396 r122399 1 2012-07-11 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 Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html 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-07-11 Hayato Ito <hayato@chromium.org> 2 27 -
trunk/Source/WebCore/page/EventHandler.cpp
r122224 r122399 2291 2291 2292 2292 #if !PLATFORM(GTK) && !(PLATFORM(CHROMIUM) && (OS(UNIX) && !OS(DARWIN))) 2293 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& ) const2293 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const 2294 2294 { 2295 2295 return false; … … 2346 2346 // appropriately. 2347 2347 PlatformWheelEvent event = e; 2348 if (m_baseEventType == PlatformEvent::NoType && shouldTurnVerticalTicksIntoHorizontal(result ))2348 if (m_baseEventType == PlatformEvent::NoType && shouldTurnVerticalTicksIntoHorizontal(result, e)) 2349 2349 event = event.copyTurningVerticalTicksIntoHorizontalTicks(); 2350 2350 -
trunk/Source/WebCore/page/EventHandler.h
r121036 r122399 267 267 bool logicalScrollOverflow(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0); 268 268 269 bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& ) const;269 bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const; 270 270 bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; } 271 271 -
trunk/Source/WebCore/page/chromium/EventHandlerChromium.cpp
r121036 r122399 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
r121036 r122399 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/Tools/ChangeLog
r122397 r122399 1 2012-07-11 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 DumpRenderTree to 10 let a layout test specify this attribute so that the change's impact 11 on scrolling can be tested in a layout test. 12 13 Reviewed by Adam Barth. 14 15 * DumpRenderTree/chromium/EventSender.cpp: 16 (EventSender::handleMouseWheel): 17 1 18 2012-07-11 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Tools/DumpRenderTree/chromium/EventSender.cpp
r122395 r122399 1044 1044 int vertical = arguments[1].toInt32(); 1045 1045 int paged = false; 1046 int hasPreciseScrollingDeltas = false; 1046 1047 1047 1048 if (arguments.size() > 2 && arguments[2].isBool()) 1048 1049 paged = arguments[2].toBoolean(); 1050 1051 if (arguments.size() > 3 && arguments[3].isBool()) 1052 hasPreciseScrollingDeltas = arguments[3].toBoolean(); 1049 1053 1050 1054 WebMouseWheelEvent event; … … 1055 1059 event.deltaY = event.wheelTicksY; 1056 1060 event.scrollByPage = paged; 1061 event.hasPreciseScrollingDeltas = hasPreciseScrollingDeltas; 1062 1057 1063 if (continuous) { 1058 1064 event.wheelTicksX /= scrollbarPixelsPerTick;
Note: See TracChangeset
for help on using the changeset viewer.