<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Add kinetic scrolling"
href="https://bugs.webkit.org/show_bug.cgi?id=155750#c17">Comment # 17</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Add kinetic scrolling"
href="https://bugs.webkit.org/show_bug.cgi?id=155750">bug 155750</a>
from <span class="vcard"><a class="email" href="mailto:aplazas@igalia.com" title="Adrien Plazas <aplazas@igalia.com>"> <span class="fn">Adrien Plazas</span></a>
</span></b>
<pre>About the several comments on floating point value: you're right it's cleaner to check that way, thanks!
<span class="quote">> > Source/WebKit2/UIProcess/gtk/GestureController.cpp:80
> > +void GestureController::DragGesture::startDrag(const GdkEvent* event)
>
> It seems this file has now three functions that create a scroll event out of
> a touch event: this one, startMomentumScroll() a bit further in this patch,
> and handleDrag() already in code. Maybe a common helper function could be
> done for these 3?</span >
I just added this:
static GUniquePtr<GdkEvent> newScrollEvent(const GdkEvent* event, double x, double y, double deltaX, double deltaY, gboolean isStop)
{
GUniquePtr<GdkEvent> scrollEvent(gdk_event_new(GDK_SCROLL));
scrollEvent->scroll.time = event->touch.time;
scrollEvent->scroll.x = x;
scrollEvent->scroll.y = y;
scrollEvent->scroll.x_root = event->touch.x_root;
scrollEvent->scroll.y_root = event->touch.y_root;
scrollEvent->scroll.direction = GDK_SCROLL_SMOOTH;
scrollEvent->scroll.delta_x = deltaX;
scrollEvent->scroll.delta_y = deltaY;
scrollEvent->scroll.state = event->touch.state;
#if GTK_CHECK_VERSION(3, 20, 0)
scrollEvent->scroll.is_stop = isStop;
#endif
return scrollEvent;
}
I'll soon (tomorrow?) publish a hopefully final version then, thanks for the review!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>