[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:47:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1e72eeb28f23a98be1bdaeb1d235c76b99022e77
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 20 15:10:54 2010 +0000

    2010-10-19 Antonio Gomes <agomes at rim.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Add an inner frame test to Document::nodesFromRect
            https://bugs.webkit.org/show_bug.cgi?id=47794
    
            Patch continues to improve the test coverage of Document::nodesFromRect,
            similarly to bugs 47795 (Add a test to nodesFromRect involving links and
            text nodes) and 47766 (Enrich /fast/dom/nodesFromRect-basic.html test).
            This time it is being adding tests involving inner frame contents.
    
            Three situations are added:
            1) Hit testing an inner frame from an outer document should not include
               nodes of the former in the returned result, but the inner frame itself;
            2) Hit testing inner frame and outer frame contents should return all
               nodes in the later whose area intersect with the hit area and the intersected
               inner frame itself;
            3) Hit testing an inner document content should return all nodes in the inner document
               whose area intersect the hit area.
    
            Tests skipped on Win, Qt, GTK and Chromium.
    
            * fast/dom/nodesFromRect-inner-documents-expected.txt: Added.
            * fast/dom/nodesFromRect-inner-documents.html: Added.
            * fast/dom/resources/nodesFromRect.css:
            * fast/dom/resources/nodesFromRect.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70147 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c650672..b11ebd1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,29 @@
+2010-10-19  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add an inner frame test to Document::nodesFromRect
+        https://bugs.webkit.org/show_bug.cgi?id=47794
+
+        Patch continues to improve the test coverage of Document::nodesFromRect,
+        similarly to bugs 47795 (Add a test to nodesFromRect involving links and
+        text nodes) and 47766 (Enrich /fast/dom/nodesFromRect-basic.html test).
+        This time it is being adding tests involving inner frame contents.
+
+        Three situations are added:
+        1) Hit testing an inner frame from an outer document should not include
+           nodes of the former in the returned result, but the inner frame itself;
+        2) Hit testing inner frame and outer frame contents should return all
+           nodes in the later whose area intersect with the hit area and the intersected
+           inner frame itself;
+        3) Hit testing an inner document content should return all nodes in the inner document
+           whose area intersect the hit area.
+
+        * fast/dom/nodesFromRect-inner-documents-expected.txt: Added.
+        * fast/dom/nodesFromRect-inner-documents.html: Added.
+        * fast/dom/resources/nodesFromRect.css:
+        * fast/dom/resources/nodesFromRect.js:
+
 2010-10-20  Dirk Schulze  <krit at webkit.org>
 
         Unreviewed rebaseline of Snow Leopard pixel result after commit r69922.
diff --git a/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt b/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt
new file mode 100644
index 0000000..e861ec3
--- /dev/null
+++ b/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt
@@ -0,0 +1,10 @@
+A   PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS All correct nodes found for rect [176,120], [0,0,0,0]
+PASS All correct nodes found for rect [176,120], [10,10,10,10]
+PASS All correct nodes found for rect [14,167], [0,10,0,0]
+PASS All correct nodes found for rect [150,17], [0,0,0,0]
+PASS All correct nodes found for rect [150,17], [0,0,10,0]
+PASS All correct nodes found for rect [150,17], [0,0,25,0]
+
diff --git a/LayoutTests/fast/dom/nodesFromRect-inner-documents.html b/LayoutTests/fast/dom/nodesFromRect-inner-documents.html
new file mode 100644
index 0000000..c13c9bb
--- /dev/null
+++ b/LayoutTests/fast/dom/nodesFromRect-inner-documents.html
@@ -0,0 +1,58 @@
+<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];
+      ['a1', 'iframe1', 'body'].forEach(function(a) {
+        e[a] = document.getElementById(a);
+      });
+
+      window.scrollTo(0, 0);
+
+      var a1Center = getCenterFor(e.a1);
+      var iframe1Center = getCenterFor(e.iframe1);
+
+      // Elements inside iframe shouldn't be returned:
+      check(iframe1Center.x, iframe1Center.y, 0, 0, 0, 0, [e.iframe1]);
+      check(iframe1Center.x, iframe1Center.y, 10, 10, 10, 10, [e.iframe1]);
+
+      // NOTE: e.body.childNodes[2] is a TextNode whose content is ' '.
+      check(a1Center.x, a1Center.y, 0, e.iframe1.getBoundingClientRect().left - a1Center.x, 0, 0, [e.iframe1, e.body.childNodes[2],  e.a1.firstChild, e.a1, e.body]);
+
+      // Testing nodesFromRect in an inner node.
+      var innerDocument = window.frames[0].document;
+      var div = innerDocument.getElementsByTagName('div')[0];
+      var p = innerDocument.getElementsByTagName('p')[0];
+      var body = innerDocument.getElementsByTagName('body')[0];
+      var divCenter = getCenterFor(div);
+      check(divCenter.x, divCenter.y, 0, 0, 0, 0, [div], innerDocument);
+      check(divCenter.x, divCenter.y, 0, 0, 10, 0, [div, body], innerDocument);
+      check(divCenter.x, divCenter.y, 0, 0, 25, 0, [p, div, body], innerDocument);
+
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+  </script>
+</head>
+<body id="body">
+  <a id="a1" href="#">A</a>
+  <iframe id="iframe1" src="data:text/html,<div>div</div><p>p</p>"></iframe>
+  <span id="console"></span>
+  <script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/resources/nodesFromRect.css b/LayoutTests/fast/dom/resources/nodesFromRect.css
index 72e6fc0..1fcc78e 100644
--- a/LayoutTests/fast/dom/resources/nodesFromRect.css
+++ b/LayoutTests/fast/dom/resources/nodesFromRect.css
@@ -3,7 +3,7 @@ body {
   padding: 0;
 }
 
-h1, div, p, iframe {
+h1, div, p {
   display: block;
   width: 100px;
   height: 30px;
diff --git a/LayoutTests/fast/dom/resources/nodesFromRect.js b/LayoutTests/fast/dom/resources/nodesFromRect.js
index 42d7f9b..29a02cf 100644
--- a/LayoutTests/fast/dom/resources/nodesFromRect.js
+++ b/LayoutTests/fast/dom/resources/nodesFromRect.js
@@ -3,12 +3,15 @@
  *     * Antonio Gomes <tonikitoo at webkit.org>
  **/
 
-function check(x, y, topPadding, rightPadding, bottomPadding, leftPadding, list)
+function check(x, y, topPadding, rightPadding, bottomPadding, leftPadding, list, doc)
 {
   if (!window.layoutTestController)
     return;
 
-  var nodes = layoutTestController.nodesFromRect(document, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */);
+  if (!doc)
+    doc = document;
+
+  var nodes = layoutTestController.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */);
   if (!nodes)
     return;
 
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 326c434..d32845a 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3219,6 +3219,7 @@ BUGWK47901 MAC : fast/canvas/canvas-getImageData-negative-source.html = TEXT
 
 // We don't support layoutTestController.nodesFromRect so this test just times out
 BUGWK46600 SKIP : fast/dom/nodesFromRect-links-and-text.html = TEXT
+BUGWK46600 SKIP : fast/dom/nodesFromRect-inner-documents.html = TEXT
 
 // Many flaky SVG tests
 BUG59671 LINUX : svg/W3C-SVG-1.1-SE/pservers-grad-17-b.svg = IMAGE+TEXT PASS
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 4277009..23741ec 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5868,6 +5868,7 @@ fast/filesystem
 # LayoutTestController::nodesFromRect is not supported.
 fast/dom/nodesFromRect-basic.html
 fast/dom/nodesFromRect-links-and-text.html
+fast/dom/nodesFromRect-inner-documents.html
 
 #  https://bugs.webkit.org/show_bug.cgi?id=46644
 fast/text/large-text-composed-char-dos.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 27432fd..ffb1e39 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5434,6 +5434,7 @@ fast/filesystem
 # LayoutTestController::nodesFromRect is not supported.
 fast/dom/nodesFromRect-basic.html
 fast/dom/nodesFromRect-links-and-text.html
+fast/dom/nodesFromRect-inner-documents.html
 
 # It fails, because 3D canvas is disabled by default.
 http/tests/canvas/webgl/origin-clean-conformance.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index e3c28d7..d92fe66 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1030,6 +1030,7 @@ fast/filesystem
 # LayoutTestController::nodesFromRect is not supported.
 fast/dom/nodesFromRect-basic.html
 fast/dom/nodesFromRect-links-and-text.html
+fast/dom/nodesFromRect-inner-documents.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=46223
 # The WebKit plugin implementation does not support iframe shims.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list