[EFL][WK2] Contents gets blurry when page is scrolled down
authormikhail.pozdnyakov@intel.com <mikhail.pozdnyakov@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2013 13:37:27 +0000 (13:37 +0000)
committermikhail.pozdnyakov@intel.com <mikhail.pozdnyakov@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2013 13:37:27 +0000 (13:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=106545

Reviewed by Kenneth Rohde Christiansen.

The bound values for scrolling also should be pixel aligned, otherwise
it leads to page contents blurriness when the page is scrolled down.

* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::pageDidRequestScroll):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139312 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/PageViewportController.cpp

index 32e2b05..9ba07d2 100644 (file)
@@ -1,3 +1,16 @@
+2013-01-10  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        [EFL][WK2] Contents gets blurry when page is scrolled down
+        https://bugs.webkit.org/show_bug.cgi?id=106545
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        The bound values for scrolling also should be pixel aligned, otherwise
+        it leads to page contents blurriness when the page is scrolled down.
+
+        * UIProcess/PageViewportController.cpp:
+        (WebKit::PageViewportController::pageDidRequestScroll):
+
 2013-01-10  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Add support for loading web process extensions
index 44d00bd..746662a 100644 (file)
@@ -228,14 +228,15 @@ void PageViewportController::pageDidRequestScroll(const IntPoint& cssPosition)
     if (m_hasSuspendedContent)
         return;
 
-    FloatPoint position = pixelAlignedFloatPoint(FloatPoint(cssPosition));
-    FloatPoint boundPosition = boundContentsPosition(position);
-    FloatRect endVisibleContentRect(boundPosition, visibleContentsSize());
+    FloatPoint boundPosition = boundContentsPosition(FloatPoint(cssPosition));
+    FloatPoint alignedPosition = pixelAlignedFloatPoint(boundPosition);
+    FloatRect endVisibleContentRect(alignedPosition, visibleContentsSize());
 
     if (m_lastFrameCoveredRect.intersects(endVisibleContentRect))
-        m_client->setViewportPosition(boundPosition);
+        m_client->setViewportPosition(alignedPosition);
     else {
         // Keep the unbound position in case the contents size is changed later on.
+        FloatPoint position = pixelAlignedFloatPoint(FloatPoint(cssPosition));
         applyPositionAfterRenderingContents(position);
     }
 }