Bug 136739 - [EFL][WK2] Minibrowser : Support Zoom on Control key + scroll
Summary: [EFL][WK2] Minibrowser : Support Zoom on Control key + scroll
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-11 06:22 PDT by Tanay
Modified: 2014-09-18 23:59 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.91 KB, patch)
2014-09-15 00:11 PDT, Tanay
no flags Details | Formatted Diff | Diff
Patch (2.89 KB, patch)
2014-09-17 01:44 PDT, Tanay
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tanay 2014-09-11 06:22:22 PDT
Support the following behaviour in Minibrowser:
1) Zoom in on mouse scroll up
2) Zoom out on mouse scroll down
Comment 1 Tanay 2014-09-15 00:11:34 PDT
Created attachment 238105 [details]
Patch
Comment 2 Gyuyoung Kim 2014-09-16 22:46:52 PDT
Comment on attachment 238105 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=238105&action=review

> Tools/MiniBrowser/efl/main.c:312
> +        if (ev->z == -1 && zoom_level_set(ewk_view, window->current_zoom_level + 1)) {

Isn't ewk_view same with window->ewk_view ? If so, how about using window->ewk_view instead of ewk_view for readability ?
Comment 3 Tanay 2014-09-17 01:44:04 PDT
Created attachment 238241 [details]
Patch
Comment 4 Tanay 2014-09-17 01:50:03 PDT
(In reply to comment #2)
> (From update of attachment 238105 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=238105&action=review
> 
> > Tools/MiniBrowser/efl/main.c:312
> > +        if (ev->z == -1 && zoom_level_set(ewk_view, window->current_zoom_level + 1)) {
> 
> Isn't ewk_view same with window->ewk_view ? If so, how about using window->ewk_view instead of ewk_view for readability ?

Thanks for pointing that out.
I notice that if I use the window->ewk_view then the scroll event is not consumed by the view. So scrolling still remains active along with zoom.
 
To avoid this we should use the ewk_view instance passed back in the parameter so that the framework knows that event has been consumed. I have made this uniform and I am using ewk_view for all the API calls in on_mouse_wheel callback.
Comment 5 Gyuyoung Kim 2014-09-17 02:20:27 PDT
Comment on attachment 238241 [details]
Patch

LGTM.
Comment 6 WebKit Commit Bot 2014-09-18 23:59:00 PDT
Comment on attachment 238241 [details]
Patch

Clearing flags on attachment: 238241

Committed r173750: <http://trac.webkit.org/changeset/173750>
Comment 7 WebKit Commit Bot 2014-09-18 23:59:03 PDT
All reviewed patches have been landed.  Closing bug.