Title: [125898] trunk
Revision
125898
Author
[email protected]
Date
2012-08-17 07:31:56 -0700 (Fri, 17 Aug 2012)

Log Message

Touch adjustment for context menu gestures
https://bugs.webkit.org/show_bug.cgi?id=94101

Reviewed by Antonio Gomes.

Source/WebCore:

Adds a new filter for detecting nodes that provides extra context-menu items,
and use that in a new set of functions for adjusting context-menu gestures.

Tests: touchadjustment/context-menu-select-text.html
       touchadjustment/context-menu.html

* page/EventHandler.cpp:
(WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
(WebCore::EventHandler::adjustGesturePosition):
* page/EventHandler.h:
(EventHandler):
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::nodeProvidesContextMenuItems):
(TouchAdjustment):
(WebCore::findBestContextMenuCandidate):
* page/TouchAdjustment.h:
* testing/Internals.cpp:
(WebCore::Internals::touchPositionAdjustedToBestContextMenuNode):
(WebCore::Internals::touchNodeAdjustedToBestContextMenuNode):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

LayoutTests:

Two new tests for context-menu touch adjustment.

* touchadjustment/context-menu-expected.txt: Added.
* touchadjustment/context-menu-select-text-expected.txt: Added.
* touchadjustment/context-menu-select-text.html: Added.
* touchadjustment/context-menu.html: Added.
* touchadjustment/resources/touchadjustment.js:
(nodeToString):
(testTouchPoint):
(testTouchPointContextMenu):
(adjustTouchPointContextMenu):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125897 => 125898)


--- trunk/LayoutTests/ChangeLog	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/LayoutTests/ChangeLog	2012-08-17 14:31:56 UTC (rev 125898)
@@ -1,3 +1,22 @@
+2012-08-17  Allan Sandfeld Jensen  <[email protected]>
+
+        Touch adjustment for context menu gestures
+        https://bugs.webkit.org/show_bug.cgi?id=94101
+
+        Reviewed by Antonio Gomes.
+
+        Two new tests for context-menu touch adjustment.
+
+        * touchadjustment/context-menu-expected.txt: Added.
+        * touchadjustment/context-menu-select-text-expected.txt: Added.
+        * touchadjustment/context-menu-select-text.html: Added.
+        * touchadjustment/context-menu.html: Added.
+        * touchadjustment/resources/touchadjustment.js:
+        (nodeToString):
+        (testTouchPoint):
+        (testTouchPointContextMenu):
+        (adjustTouchPointContextMenu):
+
 2012-08-17  Pavel Feldman  <[email protected]>
 
         Web Inspector: load panels code on demand

Added: trunk/LayoutTests/touchadjustment/context-menu-expected.txt (0 => 125898)


--- trunk/LayoutTests/touchadjustment/context-menu-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/touchadjustment/context-menu-expected.txt	2012-08-17 14:31:56 UTC (rev 125898)
@@ -0,0 +1,20 @@
+Test touch adjustment for context-menu gestures.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS adjusted node was A#a0.
+PASS adjusted node was SPAN#span0.
+PASS adjusted node was null.
+PASS adjusted node was SPAN#span0.
+PASS adjusted node was IMG#img0.
+PASS adjusted node was A#a0.
+PASS adjusted node was null.
+PASS adjusted node was A#a0.
+PASS adjusted node was IMG#img0.
+PASS adjusted node was IMG#img0.
+PASS adjusted node was SPAN#span0.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/touchadjustment/context-menu-select-text-expected.txt (0 => 125898)


--- trunk/LayoutTests/touchadjustment/context-menu-select-text-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/touchadjustment/context-menu-select-text-expected.txt	2012-08-17 14:31:56 UTC (rev 125898)
@@ -0,0 +1,11 @@
+Test touch adjustment for context-menu gestures with automatic select behaviour.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS adjusted node was null.
+PASS adjusted node was 'Text text text.'.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/touchadjustment/context-menu-select-text.html (0 => 125898)


--- trunk/LayoutTests/touchadjustment/context-menu-select-text.html	                        (rev 0)
+++ trunk/LayoutTests/touchadjustment/context-menu-select-text.html	2012-08-17 14:31:56 UTC (rev 125898)
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Touch Adjustment : Adjust context-menu to selectable words - bug 94101</title>
+    <script src=""
+    <script src=""
+    <style>
+        #sandbox {
+            position: absolute;
+            top: 0px;
+            left: 0px;
+            width: 400px;
+            height: 200px;
+        }
+        #sandbox p {
+            padding: 5px;
+            font: 20px Ahem;
+        }
+    </style>
+</head>
+<body>
+
+<div id=sandbox>
+    <p id=p1><span id=span1>Text text text.</span>
+</div>
+
+<p id='description'></p>
+<div id='console'></div>
+
+<script>
+    // Set up shortcut access to elements
+    var e = {};
+    ['sandbox', 'p1', 'span1'].forEach(function(a) {
+        e[a] = document.getElementById(a);
+    });
+
+    function testAdjustedTouches()
+    {
+        // Set editing-behaviour to win, so context-menu gesture does not trigger selections.
+        internals.settings.setEditingBehavior('win');
+        // Check the context-menu is not adjusted to the selectable text.
+        testTouchPointContextMenu(touchPoint(100, 30, 20), null, true);
+        // Set editing-behaviour mac, so context-menu gesture triggers selections.
+        internals.settings.setEditingBehavior('mac');
+        // Check the context-menu is adjusted to the selectable text.
+        testTouchPointContextMenu(touchPoint(100, 30, 20), "'Text text text.'", true);
+    }
+
+    function runTests()
+    {
+        if (window.testRunner && window.internals && internals.touchNodeAdjustedToBestContextMenuNode) {
+            description('Test touch adjustment for context-menu gestures with automatic select behaviour.');
+            testAdjustedTouches();
+            e.sandbox.style.display = 'none';
+        }
+    }
+    runTests();
+</script>
+
+<script src=""
+
+</body>
+</html>

Added: trunk/LayoutTests/touchadjustment/context-menu.html (0 => 125898)


--- trunk/LayoutTests/touchadjustment/context-menu.html	                        (rev 0)
+++ trunk/LayoutTests/touchadjustment/context-menu.html	2012-08-17 14:31:56 UTC (rev 125898)
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Touch Adjustment : Adjust to context menu providers - bug 94101</title>
+    <script src=""
+    <script src=""
+    <style>
+        #sandbox {
+            position: absolute;
+            top: 0px;
+            left: 0px;
+            width: 400px;
+            height: 200px;
+        }
+        #sandbox p {
+            padding: 5px;
+            font: 20px Ahem;
+        }
+    </style>
+</head>
+<body>
+
+<script>
+    function onClick() {}
+</script>
+
+<div id=sandbox>
+    <p id=p0><a id=a0 href="" with URL.</a>
+    <p id=p1><span id=span0 _onclick_=onClick>Text with onclick handler.</span>
+    <p id=p2><img id=img0 height=20 width=100 src=""
+</div>
+
+<p id='description'></p>
+<div id='console'></div>
+
+<script>
+    // Set up shortcut access to elements
+    var e = {};
+    ['sandbox', 'a0', 'span0', 'img0', 'p0', 'p1', 'p2'].forEach(function(a) {
+        e[a] = document.getElementById(a);
+    });
+
+    function testDirectTouches()
+    {
+        // Check links can be targeted with context menu gesture.
+        testTouchPointContextMenu(touchPoint(100, 35, 10), e.a0);
+        // Check onclick can be targeted with activate gesture.
+        testTouchPoint(touchPoint(100, 100, 10), e.span0);
+        // Check onclick can not be targeted with context menu.
+        testTouchPointContextMenu(touchPoint(100, 100, 10), null);
+        // But that the adjusted point still hits it, if no better target is available
+        var adjustedPoint = adjustTouchPointContextMenu(touchPoint(100, 100, 10));
+        if (adjustedPoint) {
+            shouldBeNode(document.elementFromPoint(adjustedPoint.x, adjustedPoint.y), e.span0);
+        }
+        // Check images can be targeted with context menu.
+        testTouchPointContextMenu(offsetTouchPoint(findAbsoluteBounds(e.img0), 'center', 0, 5, 5), e.img0);
+    }
+
+    function testAdjustedTouches()
+    {
+        // Check we if we adjust the context menu onto the link.
+        testTouchPointContextMenu(touchPoint(100, 50, 10), e.a0);
+        // Check we if we do not adjust the context menu onto the onclick element.
+        testTouchPointContextMenu(touchPoint(100, 70, 10), null);
+        // Check the link is strongly preferred.
+        testTouchPointContextMenu(touchPoint(100, 60, 20), e.a0);
+        // Check adjustment onto the image.
+        testTouchPointContextMenu(touchPoint(20, 140, 10), e.img0);
+        // Check the image is strongly preferred for context menu gestures.
+        testTouchPointContextMenu(touchPoint(20, 120, 30), e.img0);
+        // But the onclick handler would be preferred for activate gestures.
+        testTouchPoint(touchPoint(20, 120, 30), e.span0);
+    }
+
+    function runTests()
+    {
+        if (window.testRunner && window.internals && internals.touchNodeAdjustedToBestClickableNode) {
+            description('Test touch adjustment for context-menu gestures.');
+            testDirectTouches();
+            testAdjustedTouches();
+            e.sandbox.style.display = 'none';
+        }
+    }
+    runTests();
+</script>
+
+<script src=""
+
+</body>
+</html>

Modified: trunk/LayoutTests/touchadjustment/resources/touchadjustment.js (125897 => 125898)


--- trunk/LayoutTests/touchadjustment/resources/touchadjustment.js	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/LayoutTests/touchadjustment/resources/touchadjustment.js	2012-08-17 14:31:56 UTC (rev 125898)
@@ -19,14 +19,22 @@
         return 'null';
     if (!node.nodeName)
         return 'not a node';
+    if (node.nodeType == 3)
+        return "'"+node.nodeValue+"'";
     return node.nodeName + (node.id ? ('#' + node.id) : '');
 }
 
-function testTouchPoint(touchpoint, targetNode)
-{
-    var adjustedNode = internals.touchNodeAdjustedToBestClickableNode(touchpoint.left, touchpoint.top, touchpoint.width, touchpoint.height, document);
-    if (adjustedNode && adjustedNode.nodeType == 3) // TEXT node
-        adjustedNode = adjustedNode.parentNode;
+function shouldBeNode(adjustedNode, targetNode) {
+    if (typeof targetNode == "string") {
+        var adjustedNodeString = nodeToString(adjustedNode);
+        if (targetNode == adjustedNodeString) {
+            testPassed("adjusted node was " + targetNode + ".");
+        }
+        else {
+            testFailed("adjusted node should be " + targetNode  + ". Was " + adjustedNodeString + ".");
+        }
+        return;
+    }
     if (targetNode == adjustedNode) {
         testPassed("adjusted node was " + nodeToString(targetNode) + ".");
     }
@@ -35,6 +43,28 @@
     }
 }
 
+function testTouchPoint(touchpoint, targetNode, allowTextNodes)
+{
+    var adjustedNode = internals.touchNodeAdjustedToBestClickableNode(touchpoint.left, touchpoint.top, touchpoint.width, touchpoint.height, document);
+    if (!allowTextNodes && adjustedNode && adjustedNode.nodeType == 3)
+        adjustedNode = adjustedNode.parentNode;
+    shouldBeNode(adjustedNode, targetNode);
+}
+
+function testTouchPointContextMenu(touchpoint, targetNode, allowTextNodes)
+{
+    var adjustedNode = internals.touchNodeAdjustedToBestContextMenuNode(touchpoint.left, touchpoint.top, touchpoint.width, touchpoint.height, document);
+    if (!allowTextNodes && adjustedNode && adjustedNode.nodeType == 3)
+        adjustedNode = adjustedNode.parentNode;
+    shouldBeNode(adjustedNode, targetNode);
+}
+
+function adjustTouchPointContextMenu(touchpoint)
+{
+    var adjustedPoint = internals.touchPositionAdjustedToBestContextMenuNode(touchpoint.left, touchpoint.top, touchpoint.width, touchpoint.height, document);
+    return adjustedPoint;
+}
+
 function touchPoint(x, y, radiusX, radiusY)
 {
     if (!radiusY)

Modified: trunk/Source/WebCore/ChangeLog (125897 => 125898)


--- trunk/Source/WebCore/ChangeLog	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/ChangeLog	2012-08-17 14:31:56 UTC (rev 125898)
@@ -1,3 +1,33 @@
+2012-08-17  Allan Sandfeld Jensen  <[email protected]>
+
+        Touch adjustment for context menu gestures
+        https://bugs.webkit.org/show_bug.cgi?id=94101
+
+        Reviewed by Antonio Gomes.
+
+        Adds a new filter for detecting nodes that provides extra context-menu items, 
+        and use that in a new set of functions for adjusting context-menu gestures.
+
+        Tests: touchadjustment/context-menu-select-text.html
+               touchadjustment/context-menu.html
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
+        (WebCore::EventHandler::adjustGesturePosition):
+        * page/EventHandler.h:
+        (EventHandler):
+        * page/TouchAdjustment.cpp:
+        (WebCore::TouchAdjustment::nodeProvidesContextMenuItems):
+        (TouchAdjustment):
+        (WebCore::findBestContextMenuCandidate):
+        * page/TouchAdjustment.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::touchPositionAdjustedToBestContextMenuNode):
+        (WebCore::Internals::touchNodeAdjustedToBestContextMenuNode):
+        * testing/Internals.h:
+        (Internals):
+        * testing/Internals.idl:
+
 2012-08-17  Pavel Feldman  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=94326

Modified: trunk/Source/WebCore/page/EventHandler.cpp (125897 => 125898)


--- trunk/Source/WebCore/page/EventHandler.cpp	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2012-08-17 14:31:56 UTC (rev 125898)
@@ -2522,6 +2522,17 @@
     return success;
 }
 
+bool EventHandler::bestContextMenuNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode)
+{
+    HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
+    IntPoint hitTestPoint = m_frame->view()->windowToContents(touchCenter);
+    HitTestResult result = hitTestResultAtPoint(hitTestPoint, /*allowShadowContent*/ true, /*ignoreClipping*/ false, DontHitTestScrollbars, hitType, touchRadius);
+
+    IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
+    RefPtr<StaticHashSetNodeList> nodeList = StaticHashSetNodeList::adopt(result.rectBasedTestResult());
+    return findBestContextMenuCandidate(targetNode, targetPoint, touchCenter, touchRect, *nodeList.get());
+}
+
 bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode)
 {
     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
@@ -2536,7 +2547,17 @@
 bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEvent, IntPoint& adjustedPoint)
 {
     Node* targetNode = 0;
-    bestClickableNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode);
+    switch (gestureEvent.type()) {
+    case PlatformEvent::GestureTap:
+        bestClickableNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode);
+        break;
+    case PlatformEvent::GestureLongPress:
+        bestContextMenuNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode);
+        break;
+    default:
+        // FIXME: Implement handling for other types as needed.
+        ASSERT_NOT_REACHED();
+    }
     return targetNode;
 }
 #endif

Modified: trunk/Source/WebCore/page/EventHandler.h (125897 => 125898)


--- trunk/Source/WebCore/page/EventHandler.h	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/page/EventHandler.h	2012-08-17 14:31:56 UTC (rev 125898)
@@ -169,10 +169,9 @@
 
 #if ENABLE(TOUCH_ADJUSTMENT)
     bool bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode);
+    bool bestContextMenuNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode);
     bool bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode);
 
-    // FIXME: Add a gesture type parameter so that different candidate selection criteria may be used for
-    // different gesture types. Currently TouchAdjustment::nodeRespondsToTapGesture is used for all types.
     bool adjustGesturePosition(const PlatformGestureEvent&, IntPoint& adjustedPoint);
 #endif
 

Modified: trunk/Source/WebCore/page/TouchAdjustment.cpp (125897 => 125898)


--- trunk/Source/WebCore/page/TouchAdjustment.cpp	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/page/TouchAdjustment.cpp	2012-08-17 14:31:56 UTC (rev 125898)
@@ -88,6 +88,32 @@
     return node->renderer()->isBox();
 }
 
+bool providesContextMenuItems(Node* node)
+{
+    // This function tries to match the nodes that receive special context-menu items in
+    // ContextMenuController::populate(), and should be kept uptodate with those.
+    if (node->isContentEditable())
+        return true;
+    if (node->isLink())
+        return true;
+    if (node->renderer()->isImage())
+        return true;
+    if (node->renderer()->isMedia())
+        return true;
+    if (node->renderer()->canBeSelectionLeaf()) {
+        // If the context menu gesture will trigger a selection all selectable nodes are targets.
+        // FIXME: To improve the adjusted point, each individual word should be a separate subtarget,
+        // see for example FatFingers::checkForText() in WebKit/blackberry.
+        if (node->renderer()->frame()->editor()->behavior().shouldSelectOnContextualMenuClick())
+            return true;
+        // FIXME: A selected text might only be partially selected, and we should only append
+        // the selected subtargets of it in appendSubtargetsForNodeToList().
+        if (node->renderer()->selectionState() != RenderObject::SelectionNone)
+            return true;
+    }
+    return false;
+}
+
 static inline void appendSubtargetsForNodeToList(Node* node, SubtargetGeometryList& subtargets)
 {
     // Since the node is a result of a hit test, we are already ensured it has a renderer.
@@ -386,6 +412,14 @@
     return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetPoint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::hybridDistanceFunction);
 }
 
+bool findBestContextMenuCandidate(Node*& targetNode, IntPoint &targetPoint, const IntPoint &touchHotspot, const IntRect &touchArea, const NodeList& nodeList)
+{
+    IntRect targetArea;
+    TouchAdjustment::SubtargetGeometryList subtargets;
+    TouchAdjustment::compileSubtargetList(nodeList, subtargets, TouchAdjustment::providesContextMenuItems);
+    return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetPoint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::hybridDistanceFunction);
+}
+
 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList& nodeList)
 {
     IntPoint targetPoint;

Modified: trunk/Source/WebCore/page/TouchAdjustment.h (125897 => 125898)


--- trunk/Source/WebCore/page/TouchAdjustment.h	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/page/TouchAdjustment.h	2012-08-17 14:31:56 UTC (rev 125898)
@@ -29,6 +29,7 @@
 namespace WebCore {
 
 bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList&);
+bool findBestContextMenuCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList&);
 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList&);
 // FIXME: Implement the similar functions for other gestures here as well.
 

Modified: trunk/Source/WebCore/testing/Internals.cpp (125897 => 125898)


--- trunk/Source/WebCore/testing/Internals.cpp	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/testing/Internals.cpp	2012-08-17 14:31:56 UTC (rev 125898)
@@ -844,6 +844,42 @@
     return targetNode;
 }
 
+PassRefPtr<WebKitPoint> Internals::touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
+{
+    if (!document || !document->frame()) {
+        ec = INVALID_ACCESS_ERR;
+        return 0;
+    }
+
+    IntSize radius(width / 2, height / 2);
+    IntPoint point(x + radius.width(), y + radius.height());
+
+    Node* targetNode = 0;
+    IntPoint adjustedPoint;
+
+    bool foundNode = document->frame()->eventHandler()->bestContextMenuNodeForTouchPoint(point, radius, adjustedPoint, targetNode);
+    if (foundNode)
+        return WebKitPoint::create(adjustedPoint.x(), adjustedPoint.y());
+
+    return WebKitPoint::create(x, y);
+}
+
+Node* Internals::touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
+{
+    if (!document || !document->frame()) {
+        ec = INVALID_ACCESS_ERR;
+        return 0;
+    }
+
+    IntSize radius(width / 2, height / 2);
+    IntPoint point(x + radius.width(), y + radius.height());
+
+    Node* targetNode = 0;
+    IntPoint adjustedPoint;
+    document->frame()->eventHandler()->bestContextMenuNodeForTouchPoint(point, radius, adjustedPoint, targetNode);
+    return targetNode;
+}
+
 PassRefPtr<ClientRect> Internals::bestZoomableAreaForTouchPoint(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
 {
     if (!document || !document->frame()) {

Modified: trunk/Source/WebCore/testing/Internals.h (125897 => 125898)


--- trunk/Source/WebCore/testing/Internals.h	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/testing/Internals.h	2012-08-17 14:31:56 UTC (rev 125898)
@@ -142,6 +142,8 @@
 #if ENABLE(TOUCH_ADJUSTMENT)
     PassRefPtr<WebKitPoint> touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document*, ExceptionCode&);
     Node* touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document*, ExceptionCode&);
+    PassRefPtr<WebKitPoint> touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document*, ExceptionCode&);
+    Node* touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document*, ExceptionCode&);
     PassRefPtr<ClientRect> bestZoomableAreaForTouchPoint(long x, long y, long width, long height, Document*, ExceptionCode&);
 #endif
 

Modified: trunk/Source/WebCore/testing/Internals.idl (125897 => 125898)


--- trunk/Source/WebCore/testing/Internals.idl	2012-08-17 14:28:22 UTC (rev 125897)
+++ trunk/Source/WebCore/testing/Internals.idl	2012-08-17 14:31:56 UTC (rev 125898)
@@ -117,6 +117,8 @@
 #if defined(ENABLE_TOUCH_ADJUSTMENT) && ENABLE_TOUCH_ADJUSTMENT
         WebKitPoint touchPositionAdjustedToBestClickableNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
         Node touchNodeAdjustedToBestClickableNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
+        WebKitPoint touchPositionAdjustedToBestContextMenuNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
+        Node touchNodeAdjustedToBestContextMenuNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
         ClientRect bestZoomableAreaForTouchPoint(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to