Title: [100612] trunk/Source/WebCore
Revision
100612
Author
zeno.albis...@nokia.com
Date
2011-11-17 06:15:36 -0800 (Thu, 17 Nov 2011)

Log Message

[Qt][WK2] Touch/Mouse events are delivered with wrong coordinates.
https://bugs.webkit.org/show_bug.cgi?id=72604

When using the QtViewportInterationEngine for zooming/panning,
no additional scroll offset should be applied to input events
by the ScrollView.

This patch is based on work by Andreas Kling.

Reviewed by Kenneth Rohde Christiansen.

* platform/ScrollView.cpp:
(WebCore::ScrollView::windowToContents):
(WebCore::ScrollView::contentsToWindow):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100611 => 100612)


--- trunk/Source/WebCore/ChangeLog	2011-11-17 13:39:03 UTC (rev 100611)
+++ trunk/Source/WebCore/ChangeLog	2011-11-17 14:15:36 UTC (rev 100612)
@@ -1,3 +1,20 @@
+2011-11-17  Zeno Albisser  <z...@webkit.org>
+
+        [Qt][WK2] Touch/Mouse events are delivered with wrong coordinates.
+        https://bugs.webkit.org/show_bug.cgi?id=72604
+
+        When using the QtViewportInterationEngine for zooming/panning,
+        no additional scroll offset should be applied to input events
+        by the ScrollView.
+
+        This patch is based on work by Andreas Kling.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::windowToContents):
+        (WebCore::ScrollView::contentsToWindow):
+
 2011-11-17  Ben Murdoch  <b...@google.com>
 
         Unreviewed build fix.

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (100611 => 100612)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2011-11-17 13:39:03 UTC (rev 100611)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2011-11-17 14:15:36 UTC (rev 100612)
@@ -712,18 +712,27 @@
 
 IntPoint ScrollView::windowToContents(const IntPoint& windowPoint) const
 {
+    if (delegatesScrolling())
+        return convertFromContainingWindow(windowPoint);
+
     IntPoint viewPoint = convertFromContainingWindow(windowPoint);
     return viewPoint + scrollOffset();
 }
 
 IntPoint ScrollView::contentsToWindow(const IntPoint& contentsPoint) const
 {
+    if (delegatesScrolling())
+        return convertToContainingWindow(contentsPoint);
+
     IntPoint viewPoint = contentsPoint - scrollOffset();
     return convertToContainingWindow(viewPoint);  
 }
 
 IntRect ScrollView::windowToContents(const IntRect& windowRect) const
 {
+    if (delegatesScrolling())
+        return convertFromContainingWindow(windowRect);
+
     IntRect viewRect = convertFromContainingWindow(windowRect);
     viewRect.move(scrollOffset());
     return viewRect;
@@ -731,6 +740,9 @@
 
 IntRect ScrollView::contentsToWindow(const IntRect& contentsRect) const
 {
+    if (delegatesScrolling())
+        return convertToContainingWindow(contentsRect);
+
     IntRect viewRect = contentsRect;
     viewRect.move(-scrollOffset());
     return convertToContainingWindow(viewRect);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to