Title: [196640] trunk
- Revision
- 196640
- Author
- [email protected]
- Date
- 2016-02-16 10:15:37 -0800 (Tue, 16 Feb 2016)
Log Message
[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: trunk/LayoutTests/ChangeLog (196639 => 196640)
--- trunk/LayoutTests/ChangeLog 2016-02-16 18:13:58 UTC (rev 196639)
+++ trunk/LayoutTests/ChangeLog 2016-02-16 18:15:37 UTC (rev 196640)
@@ -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-16 Antti Koivisto <[email protected]>
Factor id mutation style invalidation code into a class
Added: trunk/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html (0 => 196640)
--- trunk/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html (rev 0)
+++ trunk/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html 2016-02-16 18:15:37 UTC (rev 196640)
@@ -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: trunk/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html (0 => 196640)
--- trunk/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html (rev 0)
+++ trunk/LayoutTests/platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html 2016-02-16 18:15:37 UTC (rev 196640)
@@ -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: trunk/Source/WebCore/ChangeLog (196639 => 196640)
--- trunk/Source/WebCore/ChangeLog 2016-02-16 18:13:58 UTC (rev 196639)
+++ trunk/Source/WebCore/ChangeLog 2016-02-16 18:15:37 UTC (rev 196640)
@@ -1,3 +1,24 @@
+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 Antti Koivisto <[email protected]>
Factor id mutation style invalidation code into a class
Modified: trunk/Source/WebCore/page/EventHandler.cpp (196639 => 196640)
--- trunk/Source/WebCore/page/EventHandler.cpp 2016-02-16 18:13:58 UTC (rev 196639)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2016-02-16 18:15:37 UTC (rev 196640)
@@ -2654,7 +2654,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: trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp (196639 => 196640)
--- trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp 2016-02-16 18:13:58 UTC (rev 196639)
+++ trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp 2016-02-16 18:15:37 UTC (rev 196640)
@@ -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