Title: [247862] trunk/Source
- Revision
- 247862
- Author
- [email protected]
- Date
- 2019-07-26 02:00:32 -0700 (Fri, 26 Jul 2019)
Log Message
REGRESSION(r246496): [GTK] Tapping the web view scrolls up a bit
https://bugs.webkit.org/show_bug.cgi?id=200084
Patch by Alexander Mikhaylenko <[email protected]> on 2019-07-26
Reviewed by Carlos Garcia Campos.
gdk_event_get_scroll_direction() returns false, but also sets direction to GDK_SCROLL_UP if
the direction was GDK_SCROLL_SMOOTH. Relying on zero deltas in this case is not correct, because
they can also be zero with GDK_SCROLL_SMOOTH. In this case, set the direction manually to avoid
that.
See https://gitlab.gnome.org/GNOME/gtk/issues/2048
Source/WebCore:
* platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
Source/WebKit:
* Shared/gtk/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (247861 => 247862)
--- trunk/Source/WebCore/ChangeLog 2019-07-26 08:52:01 UTC (rev 247861)
+++ trunk/Source/WebCore/ChangeLog 2019-07-26 09:00:32 UTC (rev 247862)
@@ -1,3 +1,20 @@
+2019-07-26 Alexander Mikhaylenko <[email protected]>
+
+ REGRESSION(r246496): [GTK] Tapping the web view scrolls up a bit
+ https://bugs.webkit.org/show_bug.cgi?id=200084
+
+ Reviewed by Carlos Garcia Campos.
+
+ gdk_event_get_scroll_direction() returns false, but also sets direction to GDK_SCROLL_UP if
+ the direction was GDK_SCROLL_SMOOTH. Relying on zero deltas in this case is not correct, because
+ they can also be zero with GDK_SCROLL_SMOOTH. In this case, set the direction manually to avoid
+ that.
+
+ See https://gitlab.gnome.org/GNOME/gtk/issues/2048
+
+ * platform/gtk/PlatformWheelEventGtk.cpp:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+
2019-07-26 Rob Buis <[email protected]>
Make storing cross-origin top-level prefetches in HTTP cache optional
Modified: trunk/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp (247861 => 247862)
--- trunk/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp 2019-07-26 08:52:01 UTC (rev 247861)
+++ trunk/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp 2019-07-26 09:00:32 UTC (rev 247862)
@@ -63,6 +63,7 @@
m_deltaY = 0;
GdkScrollDirection direction;
if (!gdk_event_get_scroll_direction(reinterpret_cast<GdkEvent*>(event), &direction)) {
+ direction = GDK_SCROLL_SMOOTH;
gdouble deltaX, deltaY;
if (gdk_event_get_scroll_deltas(reinterpret_cast<GdkEvent*>(event), &deltaX, &deltaY)) {
m_deltaX = -deltaX;
@@ -85,6 +86,8 @@
case GDK_SCROLL_RIGHT:
m_deltaX = -delta;
break;
+ case GDK_SCROLL_SMOOTH:
+ break;
default:
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/WebKit/ChangeLog (247861 => 247862)
--- trunk/Source/WebKit/ChangeLog 2019-07-26 08:52:01 UTC (rev 247861)
+++ trunk/Source/WebKit/ChangeLog 2019-07-26 09:00:32 UTC (rev 247862)
@@ -1,3 +1,20 @@
+2019-07-26 Alexander Mikhaylenko <[email protected]>
+
+ REGRESSION(r246496): [GTK] Tapping the web view scrolls up a bit
+ https://bugs.webkit.org/show_bug.cgi?id=200084
+
+ Reviewed by Carlos Garcia Campos.
+
+ gdk_event_get_scroll_direction() returns false, but also sets direction to GDK_SCROLL_UP if
+ the direction was GDK_SCROLL_SMOOTH. Relying on zero deltas in this case is not correct, because
+ they can also be zero with GDK_SCROLL_SMOOTH. In this case, set the direction manually to avoid
+ that.
+
+ See https://gitlab.gnome.org/GNOME/gtk/issues/2048
+
+ * Shared/gtk/WebEventFactory.cpp:
+ (WebKit::WebEventFactory::createWebWheelEvent):
+
2019-07-26 Loïc Yhuel <[email protected]>
[WPE] Support disk cache dumping like GTK
Modified: trunk/Source/WebKit/Shared/gtk/WebEventFactory.cpp (247861 => 247862)
--- trunk/Source/WebKit/Shared/gtk/WebEventFactory.cpp 2019-07-26 08:52:01 UTC (rev 247861)
+++ trunk/Source/WebKit/Shared/gtk/WebEventFactory.cpp 2019-07-26 09:00:32 UTC (rev 247862)
@@ -205,6 +205,7 @@
GdkScrollDirection direction;
if (!gdk_event_get_scroll_direction(event, &direction)) {
+ direction = GDK_SCROLL_SMOOTH;
double deltaX, deltaY;
if (gdk_event_get_scroll_deltas(event, &deltaX, &deltaY))
wheelTicks = FloatSize(-deltaX, -deltaY);
@@ -224,6 +225,8 @@
case GDK_SCROLL_RIGHT:
wheelTicks = FloatSize(-1, 0);
break;
+ case GDK_SCROLL_SMOOTH:
+ break;
default:
ASSERT_NOT_REACHED();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes