[Webkit-unassigned] [Bug 138090] [GTK] Minibrowser: Add support for zoom using Control Key + Mouse scroll

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 13 05:04:44 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=138090

--- Comment #12 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > Comment on attachment 240474 [details]
> > > > Patch
> > > > 
> > > > View in context:
> > > > https://bugs.webkit.org/attachment.cgi?id=240474&action=review
> > > > 
> > > > >> Tools/MiniBrowser/gtk/BrowserWindow.c:790
> > > > >> +    g_signal_connect(window, "scroll_event", G_CALLBACK(mouseZoomCallback), window);
> > > > > 
> > > > > scroll_event -> scroll-event. It doesn't make sense to pass the instance pointer as user data and you are not even handling the user data in the callback. I think it would be better if you implement the scroll_event vmethod of GtkWidgetClass instead of connecting to the signal.
> > > > 
> > > > hmm, but we don't want to connect to the window scroll event, but to the web
> > > > view scroll event instead.
> > > 
> > > We are connecting to the scroll event for the window. The zoom API
> > > webkit_webview_set_zoom_level() acts on the window->webview. 
> > > As per your review comment I am using the GDKEventScroll so I do not need to
> > > pass window as user data and will pass NULL instead. I will incorporate the
> > > other review comments and upload a patch.
> > 
> > But you don't want to zoom the view when scrolling in the toolbar for example
> 
> I just tried to connect to the WebKitWebView 'scroll-event' signal and I am
> only getting a event->direction value of '4' for up and down scroll. This is
> corresponding to GDK_SMOOTH_SCROLL.

Yes, that's because the web view has the GDK_SMOOTH_SCROLL_MASK in its event mask. You should handle GDK_SMOOTH_SCROLL as I suggested previously.

-- 
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/20141113/cc17ea0c/attachment-0002.html>


More information about the webkit-unassigned mailing list