Revert r127457 and following fixes due to several hit-testing regressions
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Sep 2012 01:24:30 +0000 (01:24 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Sep 2012 01:24:30 +0000 (01:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=96830

Reviewed by Antonio Gomes.

.:

This change reverts r127457, r127863 and r128505.

* Source/autotools/symbols.filter:

Source/WebCore:

This change reverts r127457, r127863 and r128505.

* WebCore.exp.in:
* WebCore.order:
* dom/Document.cpp:
(WebCore::Document::nodesFromRect):
* dom/Document.h:
(Document):
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
* rendering/HitTestRequest.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestLocation::HitTestLocation):
* rendering/HitTestResult.h:
(HitTestLocation):
* rendering/RenderFrameBase.cpp:
* rendering/RenderFrameBase.h:
(RenderFrameBase):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit/chromium:

This change reverts r127457, r127863 and r128505.

* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):

Source/WebKit2:

This change reverts r127457, r127863 and r128505.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

This change reverts r127457, r127863 and r128505. As the tests relies on the extended API
after r127457, we cannot keep them.

* fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt: Removed.
* fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: Removed.
* fast/dom/nodesFromRect/resources/child-frame.html: Removed.
* fast/dom/nodesFromRect/resources/nodesFromRect.js:
(check):
(checkShadowContent):
* touchadjustment/iframe-boundary-expected.txt: Removed.
* touchadjustment/iframe-boundary.html: Removed.
* touchadjustment/resources/inner-content-page.html: Removed.
* touchadjustment/resources/inner-navigation-frame.html: Removed.

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

31 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt [deleted file]
LayoutTests/fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html [deleted file]
LayoutTests/fast/dom/nodesFromRect/resources/child-frame.html [deleted file]
LayoutTests/fast/dom/nodesFromRect/resources/nodesFromRect.js
LayoutTests/touchadjustment/iframe-boundary-expected.txt [deleted file]
LayoutTests/touchadjustment/iframe-boundary.html [deleted file]
LayoutTests/touchadjustment/resources/inner-content-page.html [deleted file]
LayoutTests/touchadjustment/resources/inner-navigation-frame.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.order
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/rendering/HitTestRequest.h
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/HitTestResult.h
Source/WebCore/rendering/RenderFrameBase.cpp
Source/WebCore/rendering/RenderFrameBase.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter

index f2214d2..d23bdac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-09-14  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        Revert r127457 and following fixes due to several hit-testing regressions
+        https://bugs.webkit.org/show_bug.cgi?id=96830
+
+        Reviewed by Antonio Gomes.
+
+        This change reverts r127457, r127863 and r128505.
+
+        * Source/autotools/symbols.filter:
+
 2012-09-14  Adam Barth  <abarth@webkit.org>
 
         Remove webkitPostMessage
index aa52fc4..16e9e07 100644 (file)
@@ -1,3 +1,24 @@
+2012-09-14  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        Revert r127457 and following fixes due to several hit-testing regressions
+        https://bugs.webkit.org/show_bug.cgi?id=96830
+
+        Reviewed by Antonio Gomes.
+
+        This change reverts r127457, r127863 and r128505. As the tests relies on the extended API
+        after r127457, we cannot keep them.
+
+        * fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt: Removed.
+        * fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: Removed.
+        * fast/dom/nodesFromRect/resources/child-frame.html: Removed.
+        * fast/dom/nodesFromRect/resources/nodesFromRect.js:
+        (check):
+        (checkShadowContent):
+        * touchadjustment/iframe-boundary-expected.txt: Removed.
+        * touchadjustment/iframe-boundary.html: Removed.
+        * touchadjustment/resources/inner-content-page.html: Removed.
+        * touchadjustment/resources/inner-navigation-frame.html: Removed.
+
 2012-09-14  Bo Liu  <boliu@chromium.org>
 
         Skip image load tests that requires queueReload in WebKit2
diff --git a/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt b/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt
deleted file mode 100644 (file)
index 9c1c970..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Document::nodesFromRect : Allow child-frame content - bug 95204
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS All correct nodes found for rect
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html b/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html
deleted file mode 100644 (file)
index adb4167..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>Document::nodesFromRect : Allow child-frame content - bug 95204</title>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/nodesFromRect.js"></script>
-    <style>
-        body { margin: 0px; }
-        #sandbox {
-            width: 400px;
-            height: 200px;
-        }
-        #sandbox #layer {
-            float: right;
-        }
-        #sandbox iframe {
-            display: block;
-            box-sizing: border-box;
-            width: 200px;
-            height: 200px;
-            border: none;
-        }
-        .rotate180 { -webkit-transform: rotate(180deg); }
-        .rotate90 { -webkit-transform: rotate(90deg); }
-        #sandbox .box {
-            box-sizing: border-box;
-            height: 100px;
-            width: 200px;
-            border: 1px solid black;
-        }
-    </style>
-</head>
-<body id="body">
-    <div id=sandbox>
-        <div id=layer>
-            <iframe id="iframe1" src="resources/child-frame.html"></iframe>
-        </div>
-        <div id=div1 class=box></div>
-        <div id=div2 class=box></div>
-    </div>
-
-    <p id='description'></p>
-    <div id="console"></div>
-    <script type="application/javascript">
-        function runTest()
-        {
-            description(document.title);
-
-            // Set up shortcut access to elements
-            var e = {};
-            ['sandbox', 'layer'].forEach(function(a) {
-                e[a] = document.getElementById(a);
-            });
-
-            checkRect(25, 25, 100, 100, "DIV#div2, DIV#div1, DIV#sandbox");
-            checkRect(220, 20, 70, 70, "DIV#left");
-            checkRect(250, 20, 100, 70, "DIV#right, DIV#left, HTML");
-
-            checkRect(150, 50, 100, 100, "DIV#left, HTML, #document, IFRAME#iframe1, DIV#layer, DIV#div2, DIV#div1, DIV#sandbox");
-
-            e.layer.setAttribute('class', 'rotate180');
-            checkRect(220, 20, 70, 70, "DIV#right");
-            checkRect(150, 50, 100, 100, "DIV#right, HTML, #document, IFRAME#iframe1, DIV#layer, DIV#div2, DIV#div1, DIV#sandbox");
-
-            e.layer.setAttribute('class', 'rotate90');
-            checkRect(250, 20, 100, 70, "DIV#left");
-            checkRect(150, 20, 200, 60, "DIV#left, HTML, #document, IFRAME#iframe1, DIV#layer, DIV#div1, DIV#sandbox");
-
-            e.sandbox.display = 'none';
-            finishJSTest();
-        }
-        jsTestIsAsync = true;
-        window.onload = runTest;
-    </script>
-    <script src="../../js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/nodesFromRect/resources/child-frame.html b/LayoutTests/fast/dom/nodesFromRect/resources/child-frame.html
deleted file mode 100644 (file)
index 204d7fa..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-    body { margin: 0px; }
-    div { 
-        box-sizing: border-box;
-        border: 1px solid black;
-    }
-    #left {
-        float:left;
-        width: 90px;
-        height: 190px;
-    }
-    #right {
-        float:right;
-        width: 90px;
-        height: 190px;
-    }
-</style>
-</head>
-<body>
-    <div id=left></div>
-    <div id=right></div>
-</body>
-</html>
-
index 14ccf62..2e83a75 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * Contributors:
  *     * Antonio Gomes <tonikitoo@webkit.org>
- *     * Allan Sandfeld Jensen <allan.jensen@nokia.com>
-**/
+ **/
 
 function check(x, y, topPadding, rightPadding, bottomPadding, leftPadding, list, doc)
 {
@@ -12,7 +11,7 @@ function check(x, y, topPadding, rightPadding, bottomPadding, leftPadding, list,
   if (!doc)
     doc = document;
 
-  var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow shadow content */, false /* allow child-frame content */);
+  var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow shadow content */);
   if (!nodes)
     return;
 
@@ -46,7 +45,7 @@ function checkShadowContent(x, y, topPadding, rightPadding, bottomPadding, leftP
   if (!doc)
     doc = document;
 
-  var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allowShadowContent */, false /* allow child-frame content */);
+  var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allowShadowContent */);
   if (!nodes)
     return;
 
@@ -68,61 +67,6 @@ function checkShadowContent(x, y, topPadding, rightPadding, bottomPadding, leftP
   testPassed("All correct nodes found for rect");
 }
 
-function checkRect(left, top, width, height, expectedNodeString, doc)
-{
-    if (!window.internals)
-        return;
-
-    if (height <=0 || width <= 0)
-        return;
-
-    if (!doc)
-        doc = document;
-
-    var topPadding = height / 2;
-    var leftPadding =  width / 2;
-    // FIXME: When nodesFromRect is changed to not add 1 to width and height, remove the correction here.
-    var bottomPadding = (height - 1) - topPadding;
-    var rightPadding = (width - 1) - leftPadding;
-
-    var nodeString = nodesFromRectAsString(doc, left + leftPadding, top + topPadding, topPadding, rightPadding, bottomPadding, leftPadding);
-
-    if (nodeString == expectedNodeString) {
-        testPassed("All correct nodes found for rect");
-    } else {
-        testFailed("NodesFromRect should be [" + expectedNodeString + "] was [" + nodeString + "]");
-    }
-}
-
-function nodesFromRectAsString(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding)
-{
-    var nodeString = "";
-    var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allow shadow content */, true /* allow child-frame content */);
-    if (!nodes)
-        return nodeString;
-
-    for (var i = 0; i < nodes.length; i++) {
-        if (nodes[i].nodeType == 1) {
-            nodeString += nodes[i].nodeName;
-            if (nodes[i].id)
-                nodeString += '#' + nodes[i].id;
-            else if (nodes[i].class) {
-                nodeString += '.' + nodes[i].class;
-            }
-        } else if (nodes[i].nodeType == 3) {
-            nodeString += "'" + nodes[i].data + "'";
-        } else if (nodes[i].nodeType == 9) {
-            nodeString += "#document";
-        } else {
-            continue;
-        }
-        if (i + 1 < nodes.length) {
-            nodeString += ", ";
-        }
-    }
-    return nodeString;
-}
-
 function getCenterFor(element)
 {
   var rect = element.getBoundingClientRect();
diff --git a/LayoutTests/touchadjustment/iframe-boundary-expected.txt b/LayoutTests/touchadjustment/iframe-boundary-expected.txt
deleted file mode 100644 (file)
index 761d369..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-Test touch-adjustment at the boundary of an 
-
-
-Test direct touches.
-PASS adjustedNode.id is "checkbox-1"
-PASS adjustedNode.id is "button-1"
-PASS adjustedNode.id is "checkbox-2"
-PASS adjustedNode.id is "button-2"
-PASS adjustedNode.id is "checkbox-3"
-PASS adjustedNode.id is "button-3"
-PASS adjustedNode.id is "checkbox-4"
-PASS adjustedNode.id is "button-4"
-Test indirect touches.
-PASS adjustedNode.id is "checkbox-1"
-PASS adjustedNode.id is "button-1"
-PASS adjustedNode.id is "checkbox-2"
-PASS adjustedNode.id is "button-2"
-PASS adjustedNode.id is "checkbox-3"
-PASS adjustedNode.id is "button-3"
-PASS adjustedNode.id is "checkbox-4"
-PASS adjustedNode.id is "button-4"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/touchadjustment/iframe-boundary.html b/LayoutTests/touchadjustment/iframe-boundary.html
deleted file mode 100644 (file)
index 8634083..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>Touch Adjustment : Test touch adjustment at an iframe boundary - bug 94936</title>
-    <script src="../fast/js/resources/js-test-pre.js"></script>
-    <script src="resources/touchadjustment.js"></script>
-    <style>
-        #navbar {
-            background: #eee;
-            height: 100%;
-            left: 0;
-            padding: 0;
-            position: absolute;
-            margin: 0;
-            top: 0;
-            width: 100px;
-        }
-
-        #content-page {
-            height: 100%;
-            left: 100px;
-            position: absolute;
-            right: 0;
-            top: 0;
-        }
-
-        iframe {
-            border: none;
-            width: 100%;
-            height: 100%;
-            margin: 0;
-            padding: 0;
-        }
-    </style>
-</head>
-<body id="main" onload="runTests()">
-<div id="navbar"  style="-webkit-transform: translateX(0px);">
-    <iframe id="nav-frame" src="resources/inner-navigation-frame.html"></iframe>
-</div>
-<div id="content-page">
-    <iframe id="content-frame" src="resources/inner-content-page.html"></iframe>
-</div>
-
-<p id='description'></p>
-<div id='console'></div>
-
-<script> 
-    var itemHeight = 32;
-    var borderOffset = 100;
-    var checkboxOffset = 15;
-    var linkOffset = -15;
-    var checkboxOffsetIndirect = 5;
-    var linkOffsetIndirect = -5;
-    var touchRadius = 30;
-
-    function testRoundTouch(x, y, radius)
-    {
-        var x = x - radius;
-        var y = y - radius;
-        var width = radius * 2;
-        var height = radius * 2;
-        var adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
-        if (adjustedNode.nodeType == 3) // TEXT node
-            adjustedNode = adjustedNode.parentNode;
-        return adjustedNode;
-    }
-    function testDirectTouches()
-    {
-        debug('Test direct touches.');
-        for (var i = 0; i < 4; i++) {
-            adjustedNode = testRoundTouch(borderOffset + checkboxOffset, (i + 0.5) * itemHeight, touchRadius);
-            shouldBeEqualToString('adjustedNode.id', 'checkbox-' + (i + 1));
-            adjustedNode = testRoundTouch(borderOffset + linkOffset, (i + 0.5) * itemHeight, touchRadius);
-            shouldBeEqualToString('adjustedNode.id', 'button-' + (i + 1));
-        }
-    }
-    function testIndirectTouches() {
-         debug('Test indirect touches.');
-         for (var i = 0; i < 4; i++) {
-            adjustedNode = testRoundTouch(borderOffset + checkboxOffsetIndirect, (i + 0.5) * itemHeight, touchRadius);
-            shouldBeEqualToString('adjustedNode.id', 'checkbox-' + (i + 1));
-            adjustedNode = testRoundTouch(borderOffset + linkOffsetIndirect, (i + 0.5) * itemHeight, touchRadius);
-            shouldBeEqualToString('adjustedNode.id', 'button-' + (i + 1));
-        }
-    }
-
-    function runTests()
-    {
-        if (window.testRunner && window.internals && internals.touchNodeAdjustedToBestClickableNode) {
-            description('Test touch-adjustment at the boundary of an <iframe>.  Ensure that touch adjustment propagates into children of an <iframe>.  Test expected to contain failures until bug 95204 is fixed.');
-            testDirectTouches();
-            testIndirectTouches();
-            finishJSTest();
-        }
-    }
-    jsTestIsAsync = true;
-</script>
-<script src="../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/touchadjustment/resources/inner-content-page.html b/LayoutTests/touchadjustment/resources/inner-content-page.html
deleted file mode 100644 (file)
index 7deb507..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE="html">
-<html>
-<head>
-    <style>
-        body {
-            background: white;
-            padding: 0;
-            margin: 0;
-            margin-left: 10px;
-        }
-
-        label {
-            display: block;
-            line-height: 22px;
-            margin: 5px;
-        }
-    </style>
-</head>
-<body>
-<label><input id="checkbox-1" type="checkbox">Checkbox 1</label>
-<label><input id="checkbox-2" type="checkbox">Checkbox 2</label>
-<label><input id="checkbox-3" type="checkbox">Checkbox 3</label>
-<label><input id="checkbox-4" type="checkbox">Checkbox 4</label>
-</body>
-</html>
diff --git a/LayoutTests/touchadjustment/resources/inner-navigation-frame.html b/LayoutTests/touchadjustment/resources/inner-navigation-frame.html
deleted file mode 100644 (file)
index 33dc13a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE="html">
-<html>
-<head>
-    <style>
-        body {
-            padding: 0;
-            margin: 0;
-        }
-
-        div.button {
-            display: block;
-            text-align: center;
-            line-height: 18px;
-            margin: 5px;
-            width: 85px;
-            padding: 4px;
-            border: 1px solid black;
-            border-radius: 5px;
-        }
-    </style>
-</head>
-<body>
-<script>
-    function onClick() {
-    }
-</script>
-<div class="button" id="button-1" onclick=onClick>Button 1</div>
-<div class="button" id="button-2" onclick=onClick>Button 2</div>
-<div class="button" id="button-3" onclick=onClick>Button 3</div>
-<div class="button" id="button-4" onclick=onClick>Button 4</div>
-</body>
-</html>
index caad8eb..43b2f43 100644 (file)
@@ -1,3 +1,36 @@
+2012-09-14  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        Revert r127457 and following fixes due to several hit-testing regressions
+        https://bugs.webkit.org/show_bug.cgi?id=96830
+
+        Reviewed by Antonio Gomes.
+
+        This change reverts r127457, r127863 and r128505.
+
+        * WebCore.exp.in:
+        * WebCore.order:
+        * dom/Document.cpp:
+        (WebCore::Document::nodesFromRect):
+        * dom/Document.h:
+        (Document):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::hitTestResultAtPoint):
+        * rendering/HitTestRequest.h:
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestLocation::HitTestLocation):
+        * rendering/HitTestResult.h:
+        (HitTestLocation):
+        * rendering/RenderFrameBase.cpp:
+        * rendering/RenderFrameBase.h:
+        (RenderFrameBase):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::hitTest):
+        * testing/Internals.cpp:
+        (WebCore::Internals::nodesFromRect):
+        * testing/Internals.h:
+        (Internals):
+        * testing/Internals.idl:
+
 2012-09-14  Joshua Bell  <jsbell@chromium.org>
 
         IndexedDB: Calling close() during upgradeneeded handler should fire error at open request
index 9ff85bb..4c62b3e 100644 (file)
@@ -1360,7 +1360,7 @@ __ZNK7WebCore7RunLoop9TimerBase8isActiveEv
 __ZNK7WebCore8Document10renderViewEv
 __ZNK7WebCore8Document11completeURLERKN3WTF6StringE
 __ZNK7WebCore8Document13axObjectCacheEv
-__ZNK7WebCore8Document13nodesFromRectEiijjjjbbb
+__ZNK7WebCore8Document13nodesFromRectEiijjjjbb
 __ZNK7WebCore8Document14getElementByIdERKN3WTF12AtomicStringE
 __ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE
 __ZNK7WebCore8Document4bodyEv
index a243432..5744c07 100644 (file)
@@ -22785,7 +22785,7 @@ __ZNK7WebCore12NodeIterator20updateForNodeRemovalEPNS_4NodeERNS0_11NodePointerE
 __ZN7WebCore27jsNodeIteratorReferenceNodeEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
 __ZNK7WebCore4Node20traversePreviousNodeEPKS0_
 __ZN7WebCore37jsNodeIteratorPrototypeFunctionDetachEPN3JSC9ExecStateE
-__ZNK7WebCore8Document13nodesFromRectEiijjjjbbb
+__ZNK7WebCore8Document13nodesFromRectEiijjjjb
 __ZNK7WebCore8Document17handleZeroPaddingERKNS_14HitTestRequestERNS_13HitTestResultE
 __ZN3WTF21ListHashSetTranslatorINS_6RefPtrIN7WebCore4NodeEEELm256ENS_7PtrHashIS4_EEE9translateERPNS_15ListHashSetNodeIS4_Lm256EEERKS4_PNS_24ListHashSetNodeAllocatorIS4_Lm256EEE
 __ZN7WebCore21StaticHashSetNodeListC1ERN3WTF11ListHashSetINS1_6RefPtrINS_4NodeEEELm256ENS1_7PtrHashIS5_EEEE
index c09b6e2..8785a79 100644 (file)
@@ -1392,7 +1392,7 @@ String Document::suggestedMIMEType() const
 // * making it receive a rect as parameter, i.e. nodesFromRect(x, y, w, h);
 // * making it receive the expading size of each direction separately,
 //   i.e. nodesFromRect(x, y, topSize, rightSize, bottomSize, leftSize);
-PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent) const
+PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent) const
 {
     // FIXME: Share code between this, elementFromPoint and caretRangeFromPoint.
     if (!renderer())
@@ -1416,8 +1416,6 @@ PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned
         return 0;
     if (allowShadowContent)
         type |= HitTestRequest::AllowShadowContent;
-    if (allowChildFrameContent)
-        type |= HitTestRequest::AllowChildFrameContent;
 
     HitTestRequest request(type);
 
index 684500d..d8119c3 100644 (file)
@@ -381,9 +381,8 @@ public:
      * @param ignoreClipping whether or not to ignore the root scroll frame when retrieving the element.
      *        If false, this method returns null for coordinates outside of the viewport.
      */
-    PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY,
-                                       unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding,
-                                       bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent = false) const;
+    PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
+                                       unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent) const;
     Element* elementFromPoint(int x, int y) const;
     PassRefPtr<Range> caretRangeFromPoint(int x, int y);
 
index 48d079e..2de82bd 100644 (file)
@@ -1049,13 +1049,33 @@ HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, bool
         hitType |= HitTestRequest::IgnoreClipping;
     if (allowShadowContent)
         hitType |= HitTestRequest::AllowShadowContent;
-    if (testScrollbars == ShouldHitTestScrollbars)
-        hitType |= HitTestRequest::TestChildFrameScrollBars;
-    // We always need to handle child frame content.
-    hitType |= HitTestRequest::AllowChildFrameContent;
-
     m_frame->contentRenderer()->hitTest(HitTestRequest(hitType), result);
 
+    while (true) {
+        Node* n = result.innerNode();
+        if (!result.isOverWidget() || !n || !n->renderer() || !n->renderer()->isWidget())
+            break;
+        RenderWidget* renderWidget = toRenderWidget(n->renderer());
+        Widget* widget = renderWidget->widget();
+        if (!widget || !widget->isFrameView())
+            break;
+        Frame* frame = static_cast<HTMLFrameElementBase*>(n)->contentFrame();
+        if (!frame || !frame->contentRenderer())
+            break;
+        FrameView* view = static_cast<FrameView*>(widget);
+        LayoutPoint widgetPoint(result.localPoint().x() + view->scrollX() - renderWidget->borderLeft() - renderWidget->paddingLeft(), 
+            result.localPoint().y() + view->scrollY() - renderWidget->borderTop() - renderWidget->paddingTop());
+        HitTestResult widgetHitTestResult(widgetPoint, padding.height(), padding.width(), padding.height(), padding.width());
+        frame->contentRenderer()->hitTest(HitTestRequest(hitType), widgetHitTestResult);
+        result = widgetHitTestResult;
+
+        if (testScrollbars == ShouldHitTestScrollbars) {
+            Scrollbar* eventScrollbar = view->scrollbarAtPoint(roundedIntPoint(point));
+            if (eventScrollbar)
+                result.setScrollbar(eventScrollbar);
+        }
+    }
+    
     // If our HitTestResult is not visible, then we started hit testing too far down the frame chain. 
     // Another hit test at the main frame level should get us the correct visible result.
     Frame* resultFrame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : 0;
index 3faf88a..d937c25 100644 (file)
@@ -35,10 +35,7 @@ public:
         IgnoreClipping = 1 << 5,
         SVGClipContent = 1 << 6,
         TouchEvent = 1 << 7,
-        AllowShadowContent = 1 << 8,
-        AllowChildFrameContent = 1 << 9,
-        ChildFrameHitTest = 1 << 10,
-        TestChildFrameScrollBars = 1 << 11
+        AllowShadowContent = 1 << 8
     };
 
     typedef unsigned HitTestRequestType;
@@ -57,9 +54,6 @@ public:
     bool touchEvent() const { return m_requestType & TouchEvent; }
     bool mouseEvent() const { return !touchEvent(); }
     bool allowsShadowContent() const { return m_requestType & AllowShadowContent; }
-    bool allowsChildFrameContent() const { return m_requestType & AllowChildFrameContent; }
-    bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }
-    bool shouldTestChildFrameScrollBars() const { return m_requestType & TestChildFrameScrollBars; }
 
     // Convenience functions
     bool touchMove() const { return move() && touchEvent(); }
index 8063c81..cc39056 100644 (file)
@@ -104,7 +104,7 @@ HitTestLocation::HitTestLocation(const HitTestLocation& other, const LayoutSize&
     , m_boundingBox(other.m_boundingBox)
     , m_transformedPoint(other.m_transformedPoint)
     , m_transformedRect(other.m_transformedRect)
-    , m_region(region ? region : other.m_region)
+    , m_region(region)
     , m_isRectBased(other.m_isRectBased)
     , m_isRectilinear(other.m_isRectilinear)
 {
index bac96a2..9129eed 100644 (file)
@@ -55,7 +55,7 @@ public:
     // Pass non-zero padding values to perform a rect-based hit test.
     HitTestLocation(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
     // Make a copy the HitTestLocation in a new region by applying given offset to internal point and area.
-    HitTestLocation(const HitTestLocation&, const LayoutSize& offset, RenderRegion* = 0);
+    HitTestLocation(const HitTestLocation&, const LayoutSize& offset, RenderRegion*);
     HitTestLocation(const HitTestLocation&);
     ~HitTestLocation();
     HitTestLocation& operator=(const HitTestLocation&);
index da2dc5a..aa82870 100644 (file)
@@ -29,8 +29,6 @@
 #include "Frame.h"
 #include "FrameView.h"
 #include "HTMLFrameElementBase.h"
-#include "HitTestResult.h"
-#include "RenderLayer.h"
 #include "RenderView.h"
 
 namespace WebCore {
@@ -106,34 +104,4 @@ void RenderFrameBase::layoutWithFlattening(bool hasFixedWidth, bool hasFixedHeig
     setNeedsLayout(false);
 }
 
-bool RenderFrameBase::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action)
-{
-    if (request.allowsChildFrameContent()) {
-        FrameView* childFrameView = static_cast<FrameView*>(widget());
-        RenderView* childRoot = childFrameView ? static_cast<RenderView*>(childFrameView->frame()->contentRenderer()) : 0;
-
-        if (childRoot) {
-            LayoutPoint adjustedLocation = accumulatedOffset + location();
-            LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), borderTop() + paddingTop()) - childFrameView->scrollOffset();
-            HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocation - contentOffset);
-            HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildFrameHitTest);
-
-            bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTestLocation, result);
-            if (isInsideChildFrame)
-                return true;
-
-            if (request.shouldTestChildFrameScrollBars()) {
-                // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls,
-                // so we need to test ScrollView scrollbars separately here.
-                // FIXME: Consider if this test could be done unconditionally.
-                Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitTestLocation.roundedPoint());
-                if (frameScrollbar)
-                    result.setScrollbar(frameScrollbar);
-            }
-        }
-    }
-
-    return RenderPart::nodeAtPoint(request, result, locationInContainer, accumulatedOffset, action);
-}
-
 }
index a7deeda..4fad560 100644 (file)
@@ -36,7 +36,6 @@ protected:
     explicit RenderFrameBase(Element*);
 
 public:
-    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
     void layoutWithFlattening(bool fixedWidth, bool fixedHeight);
 };
 
index 4daeecf..02e1f17 100644 (file)
@@ -3461,7 +3461,7 @@ bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
         // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, 
         // return ourselves. We do this so mouse events continue getting delivered after a drag has 
         // exited the WebView, and so hit testing over a scrollbar hits the content document.
-        if (!request.isChildFrameHitTest() && (request.active() || request.release()) && isRootLayer()) {
+        if ((request.active() || request.release()) && isRootLayer()) {
             renderer()->updateHitTestResult(result, toRenderView(renderer())->flipForWritingMode(result.point()));
             insideLayer = this;
         }
index 3694814..3afb334 100644 (file)
@@ -966,14 +966,14 @@ unsigned Internals::touchEventHandlerCount(Document* document, ExceptionCode& ec
 }
 
 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y, unsigned topPadding, unsigned rightPadding,
-    unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const
+    unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, ExceptionCode& ec) const
 {
     if (!document || !document->frame() || !document->frame()->view()) {
         ec = INVALID_ACCESS_ERR;
         return 0;
     }
 
-    return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, ignoreClipping, allowShadowContent, allowChildFrameContent);
+    return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, ignoreClipping, allowShadowContent);
 }
 
 void Internals::emitInspectorDidBeginFrame()
index b0f1604..d2d452e 100644 (file)
@@ -160,7 +160,7 @@ public:
     unsigned touchEventHandlerCount(Document*, ExceptionCode&);
 
     PassRefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding,
-        unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&) const;
+        unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, ExceptionCode&) const;
 
     void emitInspectorDidBeginFrame();
     void emitInspectorDidCancelFrame();
index f62ceac..3bd9129 100644 (file)
@@ -138,7 +138,7 @@ module window {
 
         NodeList nodesFromRect(in Document document, in long x, in long y,
             in unsigned long topPadding, in unsigned long rightPadding, in unsigned long bottomPadding, in unsigned long leftPadding,
-            in boolean ignoreClipping, in boolean allowShadowContent, in boolean allowChildFrameContent) raises (DOMException);
+            in boolean ignoreClipping, in boolean allowShadowContent) raises (DOMException);
 
         void emitInspectorDidBeginFrame();
         void emitInspectorDidCancelFrame();
index 4c30b7a..0358cb3 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-14  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        Revert r127457 and following fixes due to several hit-testing regressions
+        https://bugs.webkit.org/show_bug.cgi?id=96830
+
+        Reviewed by Antonio Gomes.
+
+        This change reverts r127457, r127863 and r128505.
+
+        * src/ContextMenuClientImpl.cpp:
+        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+
 2012-09-14  Ojan Vafai  <ojan@chromium.org>
 
         Provide a runtime setting to disable position:sticky
index 5b0b010..641a585 100644 (file)
@@ -160,7 +160,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
     Frame* selectedFrame = r.innerNonSharedNode()->document()->frame();
 
     WebContextMenuData data;
-    data.mousePosition = r.roundedPoint();
+    data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint());
 
     // Compute edit flags.
     data.editFlags = WebContextMenuData::CanDoNone;
index 6fe93ca..5509ffd 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-14  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        Revert r127457 and following fixes due to several hit-testing regressions
+        https://bugs.webkit.org/show_bug.cgi?id=96830
+
+        Reviewed by Antonio Gomes.
+
+        This change reverts r127457, r127863 and r128505.
+
+        * win/WebKit2.def:
+        * win/WebKit2CFLite.def:
+
 2012-09-14  Adam Barth  <abarth@webkit.org>
 
         Remove webkitPostMessage
index 8423aa3..fbfb9d5 100644 (file)
@@ -266,7 +266,7 @@ EXPORTS
         ??1ContextDestructionObserver@WebCore@@MAE@XZ
         ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ
         ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z
-        ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N00@Z
+        ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0@Z
         ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z
         ?webkitWillEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z
         ?webkitDidEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z
index 3ec5b55..28ce495 100644 (file)
@@ -257,7 +257,7 @@ EXPORTS
         ??1ContextDestructionObserver@WebCore@@MAE@XZ
         ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ
         ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z
-        ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N00@Z
+        ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0@Z
         ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z
         ?restrictScaleFactorToInitialScaleIfNotUserScalable@WebCore@@YAXAAUViewportAttributes@1@@Z
         ?restrictMinimumScaleFactorToViewportSize@WebCore@@YAXAAUViewportAttributes@1@VIntSize@1@@Z
index c7f575e..2af7e76 100644 (file)
@@ -166,7 +166,7 @@ _ZN7WebCore22RuntimeEnabledFeatures22isCSSExclusionsEnabledE;
 _ZN7WebCore22RuntimeEnabledFeatures40isLangAttributeAwareFormControlUIEnabledE;
 _ZN7WebCore22RuntimeEnabledFeatures22isDialogElementEnabledE;
 _ZN7WebCore22RuntimeEnabledFeatures37isAuthorShadowDOMForAnyElementEnabledE;
-_ZNK7WebCore8Document13nodesFromRectEiijjjjbbb;
+_ZNK7WebCore8Document13nodesFromRectEiijjjjbb;
 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE;
 _ZNK7WebCore6Editor26selectionStartHasMarkerForENS_14DocumentMarker10MarkerTypeEii;
 _ZN7WebCore8Document33webkitDidExitFullScreenForElementEPNS_7ElementE;