[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Dec 22 14:45:33 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6f361ac2dabe5fae95f91401d0b24368960bfb28
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 19 15:12:04 2010 +0000

    2010-10-18 Antonio Gomes <agomes at rim.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Add a test to nodesFromRect involving links and text nodes
            https://bugs.webkit.org/show_bug.cgi?id=47795
    
            Similarly to bug 47766 (Enrich /fast/dom/nodesFromRect-basic.html test,
            this patch continues to improve the test coverage for Document::nodesFromRect.
            This time tests involving links and text nodes are being added this time. Basically
            it performs various rect hit tests involving the positions of the elements.
    
            * fast/dom/nodesFromRect-links-and-text-expected.html: Added.
            * fast/dom/nodesFromRect-links-and-text.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6db13ae..e4f7f0e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-18  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add a test to nodesFromRect involving links and text nodes
+        https://bugs.webkit.org/show_bug.cgi?id=47795
+
+        Similarly to bug 47766 (Enrich /fast/dom/nodesFromRect-basic.html test,
+        this patch continues to improve the test coverage for Document::nodesFromRect.
+        This time tests involving links and text nodes are being added this time. Basically
+        it performs various rect hit tests involving the positions of the elements.
+
+        * fast/dom/nodesFromRect-links-and-text-expected.html: Added.
+        * fast/dom/nodesFromRect-links-and-text.html: Added.
+
 2010-10-19  Andreas Kling  <kling at webkit.org>
 
         Unreviewed, skip fast/canvas/canvas-getImageData-negative-source.html on Mac.
diff --git a/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.html b/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.html
new file mode 100644
index 0000000..c9bd96e
--- /dev/null
+++ b/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.html
@@ -0,0 +1,13 @@
+A / B
+C
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS All correct nodes found for rect [37,32], [0,0,0,0]
+PASS All correct nodes found for rect [37,32], [10,0,0,0]
+PASS All correct nodes found for rect [37,32], [0,0,18,0]
+PASS All correct nodes found for rect [37,32], [0,11.5,0,0]
+PASS All correct nodes found for rect [37,32], [0,23,0,0]
+PASS All correct nodes found for rect [37,32], [0,23,18,0]
+
diff --git a/LayoutTests/fast/dom/nodesFromRect-links-and-text.html b/LayoutTests/fast/dom/nodesFromRect-links-and-text.html
new file mode 100644
index 0000000..0b7b989
--- /dev/null
+++ b/LayoutTests/fast/dom/nodesFromRect-links-and-text.html
@@ -0,0 +1,54 @@
+<html>
+<head>
+  <title>Document::nodesFromRect : basic text nodes and links test - bug 47795</title>
+  <style type="text/css"> @import "resources/nodesFromRect.css"; </style>
+  <script src="../js/resources/js-test-pre.js"></script>
+  <script src="resources/nodesFromRect.js"></script>
+  <script type="application/javascript">
+    function runTest()
+    {
+      if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+      }
+
+      var e = {};
+
+      // Set up shortcut access to elements
+      e['html'] = document.getElementsByTagName("html")[0];
+      ['p1', 'a1', 'a2', 'a3', 'body'].forEach(function(a) {
+        e[a] = document.getElementById(a);
+      });
+
+      window.scrollTo(0, 0);
+
+      // Area with links and text nodes:
+      var centerA1 = getCenterFor(e.a1);
+      var centerA2 = getCenterFor(e.a2);
+      var centerA3 = getCenterFor(e.a3);
+      var centerText = { x : (centerA2.x + centerA1.x) / 2, y : centerA1.y }; //text node between a1 and a2
+
+      check(centerA1.x, centerA1.y, 0, 0, 0, 0, [e.a1.firstChild]);
+      check(centerA1.x, centerA1.y, 10, 0, 0, 0, [e.a1.firstChild, e.a1, e.p1]);
+
+      check(centerA1.x, centerA1.y, 0, 0, centerA3.y - centerA1.y, 0, [e.a3.firstChild, e.a3, e.p1, e.a1.firstChild, e.a1]);
+      check(centerA1.x, centerA1.y, 0, centerText.x - centerA1.x, 0, 0, [e.p1.childNodes[2], e.a1.firstChild, e.a1, e.p1]);
+      check(centerA1.x, centerA1.y, 0, centerA2.x - centerA1.x, 0, 0, [e.a2.firstChild, e.a2, e.p1.childNodes[2], e.a1.firstChild, e.a1, e.p1]);
+      check(centerA1.x, centerA1.y, 0, centerA2.x - centerA1.x, centerA3.y - centerA1.y, 0, [e.a3.firstChild, e.a3, e.p1, e.a2.firstChild, e.a2, e.p1.childNodes[2], e.a1.firstChild, e.a1]);
+
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+  </script>
+</head>
+<body id="body">
+  <p id="p1">
+    <a href="#" id="a1">A</a> / <a href="#" id="a2">B</a><br/><a href="#" id="a3">C</a>
+  </p>
+
+  <span id="console"></span>
+  <script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list