Title: [128058] trunk/Source/WebKit/chromium
Revision
128058
Author
[email protected]
Date
2012-09-10 07:03:23 -0700 (Mon, 10 Sep 2012)

Log Message

[chromium] Don't use WebGestureEvent.boundingBox for touch adjustment
https://bugs.webkit.org/show_bug.cgi?id=95996

Patch by Rick Byers <[email protected]> on 2012-09-10
Reviewed by Adam Barth.

Switch from WebGestureEvent.boundingBox to new gesture-type specific
data fields.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (128057 => 128058)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-10 14:01:26 UTC (rev 128057)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-10 14:03:23 UTC (rev 128058)
@@ -1,3 +1,15 @@
+2012-09-10  Rick Byers  <[email protected]>
+
+        [chromium] Don't use WebGestureEvent.boundingBox for touch adjustment
+        https://bugs.webkit.org/show_bug.cgi?id=95996
+
+        Reviewed by Adam Barth.
+
+        Switch from WebGestureEvent.boundingBox to new gesture-type specific
+        data fields.
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::handleGestureEvent):
+
 2012-09-09  Keishi Hattori  <[email protected]>
 
         REGRESSION(r127558): Fix a crash in DateTimeChooserImpl::didClosePopup

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (128057 => 128058)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-10 14:01:26 UTC (rev 128057)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-10 14:03:23 UTC (rev 128058)
@@ -711,9 +711,10 @@
         hideSelectPopup();
         ASSERT(!m_selectPopup);
 
-        if (!event.boundingBox.isEmpty()) {
+        if (event.data.tap.width > 0) {
+            IntRect boundingBox(event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, event.data.tap.width, event.data.tap.height);
             Vector<IntRect> goodTargets;
-            findGoodTouchTargets(event.boundingBox, mainFrameImpl()->frame(), pageScaleFactor(), goodTargets);
+            findGoodTouchTargets(boundingBox, mainFrameImpl()->frame(), pageScaleFactor(), goodTargets);
             // FIXME: replace touch adjustment code when numberOfGoodTargets == 1?
             // Single candidate case is currently handled by: https://bugs.webkit.org/show_bug.cgi?id=85101
             if (goodTargets.size() >= 2 && m_client && m_client->didTapMultipleTargets(event, goodTargets))

Modified: trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp (128057 => 128058)


--- trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp	2012-09-10 14:01:26 UTC (rev 128057)
+++ trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp	2012-09-10 14:03:23 UTC (rev 128058)
@@ -1276,7 +1276,8 @@
     event.type = WebInputEvent::GestureTap;
     event.x = x;
     event.y = y;
-    event.boundingBox = WebCore::IntRect(x - 25, y - 25, 50, 50);
+    event.data.tap.width = 50;
+    event.data.tap.height = 50;
     return event;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to