Title: [196929] releases/WebKitGTK/webkit-2.10
- Revision
- 196929
- Author
- [email protected]
- Date
- 2016-02-22 02:36:37 -0800 (Mon, 22 Feb 2016)
Log Message
Merge r196640 - [GTK] No hover-horizontal scrolling available
https://bugs.webkit.org/show_bug.cgi?id=122859
Reviewed by Michael Catanzaro.
Source/WebCore:
This is a regression of WebKit2, because in WebKit1 we used native
widgets for frame scrollbars that handled this automatically. Now
we need to also check if the mouse is over frame scrollbars to
adjust the wheel event.
Test: platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Pass the adjusted wheel
event to platformCompleteWheelEvent().
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
Check also frame scrollbars.
LayoutTests:
* platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html: Added.
* platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (196928 => 196929)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog 2016-02-22 10:35:18 UTC (rev 196928)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog 2016-02-22 10:36:37 UTC (rev 196929)
@@ -1,3 +1,13 @@
+2016-02-16 Carlos Garcia Campos <[email protected]>
+
+ [GTK] No hover-horizontal scrolling available
+ https://bugs.webkit.org/show_bug.cgi?id=122859
+
+ Reviewed by Michael Catanzaro.
+
+ * platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html: Added.
+ * platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html: Added.
+
2016-02-03 Carlos Garcia Campos <[email protected]>
Do not show context menu when right clicking on a scrollbar
Added: releases/WebKitGTK/webkit-2.10/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html (0 => 196929)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html 2016-02-22 10:36:37 UTC (rev 196929)
@@ -0,0 +1,9 @@
+<html>
+<body style="width: 5000px; height: 5000px">
+<p>This is a test for bug <a href=""
+Scrolling with the mouse wheel over the horizontal main scrollbar should scroll the view horizontally</p>
+<script>
+ document.scrollingElement.scrollLeft = 40;
+</script>
+</body>
+</html>
Added: releases/WebKitGTK/webkit-2.10/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html (0 => 196929)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html 2016-02-22 10:36:37 UTC (rev 196929)
@@ -0,0 +1,12 @@
+<html>
+<body style="width: 5000px; height: 5000px">
+<p>This is a test for bug <a href=""
+Scrolling with the mouse wheel over the horizontal main scrollbar should scroll the view horizontally</p>
+<script>
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(4, window.innerHeight - 4);
+ eventSender.mouseScrollBy(0, -1);
+ }
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (196928 => 196929)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2016-02-22 10:35:18 UTC (rev 196928)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2016-02-22 10:36:37 UTC (rev 196929)
@@ -1,5 +1,26 @@
2016-02-16 Carlos Garcia Campos <[email protected]>
+ [GTK] No hover-horizontal scrolling available
+ https://bugs.webkit.org/show_bug.cgi?id=122859
+
+ Reviewed by Michael Catanzaro.
+
+ This is a regression of WebKit2, because in WebKit1 we used native
+ widgets for frame scrollbars that handled this automatically. Now
+ we need to also check if the mouse is over frame scrollbars to
+ adjust the wheel event.
+
+ Test: platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleWheelEvent): Pass the adjusted wheel
+ event to platformCompleteWheelEvent().
+ * page/gtk/EventHandlerGtk.cpp:
+ (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
+ Check also frame scrollbars.
+
+2016-02-16 Carlos Garcia Campos <[email protected]>
+
Mouse cursor doesn't change when entering scrollbars
https://bugs.webkit.org/show_bug.cgi?id=154243
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/page/EventHandler.cpp (196928 => 196929)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/page/EventHandler.cpp 2016-02-22 10:35:18 UTC (rev 196928)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/page/EventHandler.cpp 2016-02-22 10:36:37 UTC (rev 196929)
@@ -2775,7 +2775,7 @@
if (scrollableArea)
scrollableArea->setScrolledProgrammatically(false);
- bool handledEvent = platformCompleteWheelEvent(event, scrollableContainer.get(), scrollableArea);
+ bool handledEvent = platformCompleteWheelEvent(adjustedEvent, scrollableContainer.get(), scrollableArea);
platformNotifyIfEndGesture(adjustedEvent, scrollableArea);
return handledEvent;
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/page/gtk/EventHandlerGtk.cpp (196928 => 196929)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/page/gtk/EventHandlerGtk.cpp 2016-02-22 10:35:18 UTC (rev 196928)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/page/gtk/EventHandlerGtk.cpp 2016-02-22 10:36:37 UTC (rev 196929)
@@ -129,9 +129,13 @@
// horizontal scrollbar while scrolling with the wheel; we need to
// add the deltas and ticks here so that this behavior is consistent
// for styled scrollbars.
-bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result, const PlatformWheelEvent&) const
+bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result, const PlatformWheelEvent& event) const
{
- return result.scrollbar() && result.scrollbar()->orientation() == HorizontalScrollbar;
+ FrameView* view = m_frame.view();
+ Scrollbar* scrollbar = view ? view->scrollbarAtPoint(event.position()) : nullptr;
+ if (!scrollbar)
+ scrollbar = result.scrollbar();
+ return scrollbar && scrollbar->orientation() == HorizontalScrollbar;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes