[Webkit-unassigned] [Bug 200084] REGRESSION(r246496): [GTK] Tapping the web view scrolls up a bit
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 25 10:39:18 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=200084
--- Comment #6 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to Alexander Mikhaylenko from comment #2)
> Ok, this is really a GTK bug. If scroll direction of a GdkEvent is
> GDK_SCROLL_SMOOTH, then gdk_event_get_scroll_direction() returns false and
> sets direction to GDK_SCROLL_UP, because that's the first value in the enum.
>
> Well, might also be the expected behavior, since it does return false after
> all.
>
> See https://gitlab.gnome.org/GNOME/gtk/issues/2048
gboolean
gdk_event_get_scroll_direction (const GdkEvent *event,
GdkScrollDirection *direction)
{
gboolean fetched = TRUE;
GdkScrollDirection dir = 0;
switch (event->type)
{
case GDK_SCROLL:
if (event->scroll.direction == GDK_SCROLL_SMOOTH)
fetched = FALSE;
else
dir = event->scroll.direction;
break;
default:
fetched = FALSE;
break;
}
if (direction)
*direction = dir;
return fetched;
}
So... WTF? The function is documented to get the GdkScrollDirection, not get the GdkScrollDirection except fail if the scroll direction is GDK_SCROLL_SMOOTH.
Shouldn't it be:
gboolean
gdk_event_get_scroll_direction (const GdkEvent *event,
GdkScrollDirection *direction)
{
if (event->type == GDK_SCROLL)
{
*direction = event->scroll.direction;
return TRUE;
*direction = 0;
return FALSE;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190725/da335940/attachment.html>
More information about the webkit-unassigned
mailing list