Title: [117128] trunk
Revision
117128
Author
[email protected]
Date
2012-05-15 12:58:56 -0700 (Tue, 15 May 2012)

Log Message

[chromium] Compute the best target node on a GestureTap event
https://bugs.webkit.org/show_bug.cgi?id=85101

Patch by Terry Anderson <[email protected]> on 2012-05-15
Reviewed by Adam Barth.

Source/WebCore:

Using the tests in the touchadjustment/ directory.

* WebCore.gypi:
Include TouchAdjustment.* files.
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::zoomableIntersectionQuotient):
(WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
No longer using the INFINITY constant due to problems with compiling
on chromium win.

Source/WebKit/chromium:

* features.gypi:
Enable the touch adjustment code by default.
* src/WebInputEventConversion.cpp:
(WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
In the case of a GestureTap, deltaX represents the horizontal padding of the touch
area and deltaY represents the vertical padding of the touch area.

LayoutTests:

* platform/chromium/test_expectations.txt:
The flaky tests in touchadjustment/ have been addressed in WK86218.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117127 => 117128)


--- trunk/LayoutTests/ChangeLog	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/LayoutTests/ChangeLog	2012-05-15 19:58:56 UTC (rev 117128)
@@ -1,3 +1,13 @@
+2012-05-15  Terry Anderson  <[email protected]>
+
+        [chromium] Compute the best target node on a GestureTap event
+        https://bugs.webkit.org/show_bug.cgi?id=85101
+
+        Reviewed by Adam Barth.
+
+        * platform/chromium/test_expectations.txt:
+        The flaky tests in touchadjustment/ have been addressed in WK86218.
+
 2012-05-15  Mike West  <[email protected]>
 
         Fixing the flaky 'script-src-redirect.html' test.

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (117127 => 117128)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-05-15 19:58:56 UTC (rev 117128)
@@ -143,9 +143,6 @@
 // Battery Status API is not supported yet in the chromium port.
 BUGWK62698 SKIP : batterystatus = PASS FAIL
 
-// Touch Adjustment is not supported yet in the chromium port.
-BUGWK78801 SKIP : touchadjustment/ = FAIL
-
 // Network Information API is not supported yet in the chromium port.
 BUGWK73528 SKIP : networkinformation = PASS FAIL
 

Modified: trunk/Source/WebCore/ChangeLog (117127 => 117128)


--- trunk/Source/WebCore/ChangeLog	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/Source/WebCore/ChangeLog	2012-05-15 19:58:56 UTC (rev 117128)
@@ -1,3 +1,20 @@
+2012-05-15  Terry Anderson  <[email protected]>
+
+        [chromium] Compute the best target node on a GestureTap event
+        https://bugs.webkit.org/show_bug.cgi?id=85101
+
+        Reviewed by Adam Barth.
+
+        Using the tests in the touchadjustment/ directory.
+
+        * WebCore.gypi:
+        Include TouchAdjustment.* files.
+        * page/TouchAdjustment.cpp:
+        (WebCore::TouchAdjustment::zoomableIntersectionQuotient):
+        (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
+        No longer using the INFINITY constant due to problems with compiling
+        on chromium win.
+
 2012-05-15  Chris Rogers  <[email protected]>
 
         Add AudioSummingJunction class to handle fan-in (abstracted from AudioNodeInput)

Modified: trunk/Source/WebCore/WebCore.gypi (117127 => 117128)


--- trunk/Source/WebCore/WebCore.gypi	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/Source/WebCore/WebCore.gypi	2012-05-15 19:58:56 UTC (rev 117128)
@@ -3062,6 +3062,8 @@
             'page/SpeechInputResultList.h',
             'page/SuspendableTimer.cpp',
             'page/SuspendableTimer.h',
+            'page/TouchAdjustment.cpp',
+            'page/TouchAdjustment.h',
             'page/UserContentURLPattern.cpp',
             'page/WebKitAnimation.cpp',
             'page/WebKitAnimation.h',

Modified: trunk/Source/WebCore/page/TouchAdjustment.cpp (117127 => 117128)


--- trunk/Source/WebCore/page/TouchAdjustment.cpp	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/Source/WebCore/page/TouchAdjustment.cpp	2012-05-15 19:58:56 UTC (rev 117128)
@@ -231,7 +231,7 @@
 
     // Check the rectangle is meaningful zoom target. It should at least contain the hotspot.
     if (!rect.contains(touchHotspot))
-        return INFINITY;
+        return std::numeric_limits<float>::infinity();
     IntRect intersection = rect;
     intersection.intersect(touchArea);
 
@@ -246,7 +246,7 @@
 bool findNodeWithLowestDistanceMetric(Node*& targetNode, IntPoint& targetPoint, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, SubtargetGeometryList& subtargets, DistanceFunction distanceFunction)
 {
     targetNode = 0;
-    float bestDistanceMetric = INFINITY;
+    float bestDistanceMetric = std::numeric_limits<float>::infinity();
     SubtargetGeometryList::const_iterator it = subtargets.begin();
     const SubtargetGeometryList::const_iterator end = subtargets.end();
     for (; it != end; ++it) {

Modified: trunk/Source/WebKit/chromium/ChangeLog (117127 => 117128)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-15 19:58:56 UTC (rev 117128)
@@ -1,3 +1,17 @@
+2012-05-15  Terry Anderson  <[email protected]>
+
+        [chromium] Compute the best target node on a GestureTap event
+        https://bugs.webkit.org/show_bug.cgi?id=85101
+
+        Reviewed by Adam Barth.
+
+        * features.gypi:
+        Enable the touch adjustment code by default.
+        * src/WebInputEventConversion.cpp:
+        (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
+        In the case of a GestureTap, deltaX represents the horizontal padding of the touch
+        area and deltaY represents the vertical padding of the touch area.
+
 2012-05-15  James Robinson  <[email protected]>
 
         Unreviewed, rolling out r116811.

Modified: trunk/Source/WebKit/chromium/features.gypi (117127 => 117128)


--- trunk/Source/WebKit/chromium/features.gypi	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/Source/WebKit/chromium/features.gypi	2012-05-15 19:58:56 UTC (rev 117128)
@@ -98,6 +98,7 @@
       'ENABLE_STYLE_SCOPED=1',
       'ENABLE_SVG=<(enable_svg)',
       'ENABLE_SVG_FONTS=<(enable_svg)',
+      'ENABLE_TOUCH_ADJUSTMENT=1',
       'ENABLE_TOUCH_EVENTS=<(enable_touch_events)',
       'ENABLE_TOUCH_ICON_LOADING=<(enable_touch_icon_loading)',
       'ENABLE_V8_SCRIPT_DEBUG_SERVER=1',

Modified: trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp (117127 => 117128)


--- trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp	2012-05-15 19:58:17 UTC (rev 117127)
+++ trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp	2012-05-15 19:58:56 UTC (rev 117128)
@@ -148,6 +148,7 @@
         break;
     case WebInputEvent::GestureTap:
         m_type = PlatformEvent::GestureTap;
+        m_area = IntSize(e.deltaX * 2, e.deltaY * 2);
         break;
     case WebInputEvent::GestureTapDown:
         m_type = PlatformEvent::GestureTapDown;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to