[EFL][WK2] Amount of scrolling is different from movement of touch when device...

[EFL][WK2] Amount of scrolling is different from movement of touch when device pixel ratio is not 1.
https://bugs.webkit.org/show_bug.cgi?id=127268

Reviewed by Gyuyoung Kim.

Amount of scrolling should be same with movement of touch even though
device pixel ratio is not 1, so apply device pixel ratio to the new
position of scrollBy().

* UIProcess/API/efl/EwkView.cpp:
(EwkView::scrollBy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9fbfea1a
2014-01-20 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Amount of scrolling is different from movement of touch when device pixel ratio is not 1.
https://bugs.webkit.org/show_bug.cgi?id=127268
Reviewed by Gyuyoung Kim.
Amount of scrolling should be same with movement of touch even though
device pixel ratio is not 1, so apply device pixel ratio to the new
position of scrollBy().
* UIProcess/API/efl/EwkView.cpp:
(EwkView::scrollBy):
2014-01-20 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WK2] Setting m_pageScaleFactor directly in WebPageProxy::scalePage
......
......@@ -1415,7 +1415,8 @@ bool EwkView::scrollBy(const IntSize& offset)
WKPoint oldPosition = WKViewGetContentPosition(wkView());
float contentScale = WKViewGetContentScaleFactor(wkView());
FloatPoint newPosition(oldPosition.x + offset.width() / contentScale, oldPosition.y + offset.height() / contentScale);
float effectiveScale = contentScale * deviceScaleFactor();
FloatPoint newPosition(oldPosition.x + offset.width() / effectiveScale, oldPosition.y + offset.height() / effectiveScale);
// Update new position to the PageViewportController.
newPosition = m_pageViewportController.boundContentsPositionAtScale(newPosition, contentScale);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment