Bug 100983 - [EFL][WK2][AC] Wrong translation of mouse events
Summary: [EFL][WK2][AC] Wrong translation of mouse events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-01 13:33 PDT by Yael
Modified: 2012-11-02 08:10 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.76 KB, patch)
2012-11-01 18:08 PDT, Yael
no flags Details | Formatted Diff | Diff
Patch (1.59 KB, patch)
2012-11-02 05:01 PDT, Yael
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yael 2012-11-01 13:33:11 PDT
Translation of mouse events does not take the url bar into account correctly.
To reproduce this error:
1. load the page www.aldaily.com
2. make the viewport narrower
3. scroll down
4. use the mouse to select text
You will observe that the text selection is bellow where the mouse is.
If you extend the width of the viewport until the scale factor becomes 1, and then the selection starts at the correct row.
Tested with r133214.
Comment 1 Yael 2012-11-01 18:08:55 PDT
Created attachment 171962 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-11-02 02:10:23 PDT
Comment on attachment 171962 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:211
>  
> -    transform.translate(-smartData->view.x, -smartData->view.y);
> -
>  #if USE(TILED_BACKING_STORE)
> +    transform.translate(-smartData->view.x / impl->pageViewportControllerClient()->scaleFactor(), -smartData->view.y / impl->pageViewportControllerClient()->scaleFactor());
>      IntPoint scrollPos = impl->pageViewportControllerClient()->scrollPosition();
>      transform.translate(scrollPos.x(), scrollPos.y());
>      transform.scale(1 / impl->pageViewportControllerClient()->scaleFactor());
> +#else
> +    transform.translate(-smartData->view.x, -smartData->view.y);
>  #endif

why not just translate it after the scale is applied. That would turn the #else into an #endif
Comment 3 Yael 2012-11-02 05:01:17 PDT
Created attachment 172043 [details]
Patch

Address comment #2.
Comment 4 Kenneth Rohde Christiansen 2012-11-02 05:16:44 PDT
Comment on attachment 172043 [details]
Patch

Much better! :-)
Comment 5 Yael 2012-11-02 08:10:25 PDT
Committed in r133297 <http://trac.webkit.org/changeset/133297>
Comment 6 Yael 2012-11-02 08:10:50 PDT
Comment on attachment 172043 [details]
Patch

Clearing flags.