RESOLVED FIXED 116683
[WK2][CoordinatedGraphics][EFL] WKViewUserViewportToContents() function doesn't do what it says
https://bugs.webkit.org/show_bug.cgi?id=116683
Summary [WK2][CoordinatedGraphics][EFL] WKViewUserViewportToContents() function doesn...
Marcelo Lira
Reported 2013-05-23 11:05:28 PDT
One would expect WKViewUserViewportToContents to convert WebView coordinates to page contents coordinates, but currently it doesn't consider the page scale factor. Examples of what should be the results of WKViewUserViewportToContents: 1. The viewport shows a page on position (0,0) and the scale factor is 0.0. viewport (10,10) -> contents(10,10) 2. Using WKViewSetContentPosition we scroll the page under the viewport to show the contents in position (100,100). viewport(10,10) -> contents(110,110) 3. Using WKViewSetContentScaleFactor we set the page scale to 2.0. viewport(10,10) -> contents(105,105) Elsewhere, EwkView::createGLSurface() uses WKViewUserViewportToContents, but it doesn't expect these scroll and scaling operations to go into the calculations. Just the translation of the WKView in relation to the GL surface where it is drawn. As it is now WKViewUserViewportToContents works for EwkView, but it shouldn't.
Attachments
Patch (12.93 KB, patch)
2013-05-23 11:20 PDT, Marcelo Lira
no flags
Patch (13.03 KB, patch)
2013-05-27 09:46 PDT, Marcelo Lira
no flags
Patch (13.09 KB, patch)
2013-05-28 07:28 PDT, Marcelo Lira
no flags
Patch (13.17 KB, patch)
2013-05-28 09:15 PDT, Marcelo Lira
no flags
Marcelo Lira
Comment 1 2013-05-23 11:20:46 PDT
Noam Rosenthal
Comment 2 2013-05-25 01:52:24 PDT
Comment on attachment 202730 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202730&action=review > Source/WebKit2/ChangeLog:15 > + WKViewUserViewportToScene. You mean WKViewUserViewportToContents.
Marcelo Lira
Comment 3 2013-05-27 09:46:44 PDT
Noam Rosenthal
Comment 4 2013-05-28 07:05:31 PDT
Comment on attachment 202992 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202992&action=review > Source/WebKit2/ChangeLog:8 > + WKViewUserViewportToContents now convert WebView coordinates to convert -> converts > Source/WebKit2/UIProcess/API/C/CoordinatedGraphics/WKView.cpp:111 > + const WebCore::IntPoint& result = toImpl(viewRef)->userViewportToScene(toIntPoint(point)); no need for a const& when it's an IntPoint, it doesn't perform better (or worse) :) > Tools/TestWebKitAPI/Tests/WebKit2/WKViewUserViewportToContents.cpp:33 > +TEST(WebKitNix, WKViewUserViewportToContents) This is not really a WebKitNix test... Also this doesn't feel like the right directory for this test.
Marcelo Lira
Comment 5 2013-05-28 07:28:59 PDT
Marcelo Lira
Comment 6 2013-05-28 07:38:15 PDT
Comment on attachment 202992 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202992&action=review >> Tools/TestWebKitAPI/Tests/WebKit2/WKViewUserViewportToContents.cpp:33 >> +TEST(WebKitNix, WKViewUserViewportToContents) > > This is not really a WebKitNix test... > Also this doesn't feel like the right directory for this test. At first I felt this was the best directory for the test, since it's not tied to a particular port. But now you made me doubt. Should we have a CoordinatedGraphics directory under WebKit2?
Noam Rosenthal
Comment 7 2013-05-28 07:48:50 PDT
(In reply to comment #6) > (From update of attachment 202992 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=202992&action=review > > >> Tools/TestWebKitAPI/Tests/WebKit2/WKViewUserViewportToContents.cpp:33 > >> +TEST(WebKitNix, WKViewUserViewportToContents) > > > > This is not really a WebKitNix test... > > Also this doesn't feel like the right directory for this test. > > At first I felt this was the best directory for the test, since it's not tied to a particular port. > But now you made me doubt. Should we have a CoordinatedGraphics directory under WebKit2? Sounds right.
Marcelo Lira
Comment 8 2013-05-28 09:15:55 PDT
WebKit Commit Bot
Comment 9 2013-05-29 07:34:06 PDT
Comment on attachment 203060 [details] Patch Clearing flags on attachment: 203060 Committed r150893: <http://trac.webkit.org/changeset/150893>
WebKit Commit Bot
Comment 10 2013-05-29 07:34:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.