[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

tonikitoo at webkit.org tonikitoo at webkit.org
Thu Apr 8 02:18:48 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit a14898baa87d4952d3198e79ac7de374562b600c
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 10 20:08:27 2010 +0000

    Extend keyboard navigation to allow directional navigation (LayoutTests - part III)
    https://bugs.webkit.org/show_bug.cgi?id=18662
    
    Reviewed by Dave Hyatt.
    Patch by Antonio Gomes <tonikitoo at webkit.org>
    
    This patch adds two LayoutTests to ensure the correctness of the "Fully aligned"
    precedence logic implemented by Spatial Navigation algorithm, either vertically or
    horizontally: targets whose middle falls between the top and bottom of the current
    focused element are preferably to move focus to, even if it is not the shortest distance.
    
    * fast/events/spatial-navigation/snav-fully-aligned-vertically.html: Added.
    * fast/events/spatial-navigation/snav-fully-aligned-horizontally.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55794 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f1c4010..eed82ab 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-03-10  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Dave Hyatt.
+        Patch by Antonio Gomes <tonikitoo at webkit.org>
+
+        Extend keyboard navigation to allow directional navigation (LayoutTests - part III)
+        https://bugs.webkit.org/show_bug.cgi?id=18662
+
+        This patch adds two LayoutTests to ensure the correctness of the "Fully aligned"
+        precedence logic implemented by Spatial Navigation algorithm, either vertically or
+        horizontally: targets whose middle falls between the top and bottom of the current
+        focused element are preferably to move focus to, even if it is not the shortest distance.
+
+        * fast/events/spatial-navigation/snav-fully-aligned-vertically.html: Added.
+        * fast/events/spatial-navigation/snav-fully-aligned-horizontally.html: Added.
+
 2010-03-05  Dimitri Glazkov  <dglazkov at chromium.org>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt
new file mode 100644
index 0000000..0370298
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt
@@ -0,0 +1,46 @@
+test
+H                               ow Now Brown Cow
+Ho                                w Now Brown Cow
+How                                 Now Brown Cow
+How N                                ow Brown Cow
+How No                                w Brown Cow
+How Now                                 Brown Cow
+How Now B                                rown Cow
+How Now Br                                own Cow
+How Now Bro                                wn Cow
+How Now Brow                                n Cow
+How Now Brown                                 Cow
+How Now Brown C                                ow
+How Now Brown Co                                w
+How Now Brown Cow
+
+test
+PASS document.activeElement.getAttribute("id") is "1"
+PASS document.activeElement.getAttribute("id") is "2"
+PASS document.activeElement.getAttribute("id") is "4"
+PASS document.activeElement.getAttribute("id") is "3"
+PASS document.activeElement.getAttribute("id") is "5"
+PASS document.activeElement.getAttribute("id") is "6"
+PASS document.activeElement.getAttribute("id") is "8"
+PASS document.activeElement.getAttribute("id") is "7"
+PASS document.activeElement.getAttribute("id") is "9"
+PASS document.activeElement.getAttribute("id") is "10"
+PASS document.activeElement.getAttribute("id") is "12"
+PASS document.activeElement.getAttribute("id") is "11"
+PASS document.activeElement.getAttribute("id") is "13"
+PASS document.activeElement.getAttribute("id") is "14"
+PASS document.activeElement.getAttribute("id") is "16"
+PASS document.activeElement.getAttribute("id") is "15"
+PASS document.activeElement.getAttribute("id") is "17"
+PASS document.activeElement.getAttribute("id") is "18"
+PASS document.activeElement.getAttribute("id") is "20"
+PASS document.activeElement.getAttribute("id") is "19"
+PASS document.activeElement.getAttribute("id") is "21"
+PASS document.activeElement.getAttribute("id") is "22"
+PASS document.activeElement.getAttribute("id") is "24"
+PASS document.activeElement.getAttribute("id") is "23"
+PASS document.activeElement.getAttribute("id") is "25"
+PASS document.activeElement.getAttribute("id") is "26"
+PASS document.activeElement.getAttribute("id") is "27"
+PASS document.activeElement.getAttribute("id") is "end"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally.html b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally.html
new file mode 100644
index 0000000..9318dae
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally.html
@@ -0,0 +1,99 @@
+<html>
+  <!--
+    This test ensures the correctness of the "Fully aligned" precedence
+    logic implemented by Spatial Navigation algorithm in an horizontal direction:
+    targets whose middle falls between the top and bottom of the current focused
+    element are preferably to move focus to, even if it is not the shortest distance.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves preferably to elements right up or above the
+       current focused element, even when there are some other closer
+       but not vertically aligned elements in the same direction.
+  -->
+  <head>
+    <script src="../../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Right", "2"],
+      ["Down", "4"],
+      ["Left", "3"],
+      ["Down", "5"],
+      ["Right", "6"],
+      ["Down", "8"],
+      ["Left", "7"],
+      ["Down", "9"],
+      ["Right", "10"],
+      ["Down", "12"],
+      ["Left", "11"],
+      ["Down", "13"],
+      ["Right", "14"],
+      ["Down", "16"],
+      ["Left", "15"],
+      ["Down", "17"],
+      ["Right", "18"],
+      ["Down", "20"],
+      ["Left", "19"],
+      ["Down", "21"],
+      ["Right", "22"],
+      ["Down", "24"],
+      ["Left", "23"],
+      ["Down", "25"],
+      ["Right", "26"],
+      ["Down", "27"],
+      ["Down", "end"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      // starting the test itself: get to a known place.
+      document.getElementById("start").focus();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+    </script>
+    <script src="../js/resources/js-test-post.js"></script>
+  </head>
+  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
+    <a id="start" href="a">test<br></a>
+    <a id="1" href="a">H</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<a id="2" href="p">ow Now Brown Cow</a><br>
+    <a id="3" href="a">Ho</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a id="4" href="p">w Now Brown Cow</a><br>
+    <a id="5" href="a">How</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="6" href="p">Now Brown Cow</a><br>
+    <a id="7" href="a">How N</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <a id="8" href="p">ow Brown Cow</a><br>
+    <a id="9" href="a">How No</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="10" href="p">w Brown Cow</a><br>
+    <a id="11" href="a">How Now </a>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="12" href="p">Brown Cow</a><br>
+    <a id="13" href="a">How Now B</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="14" href="p">rown Cow</a><br>
+    <a id="15" href="a">How Now Br</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="16" href="p">own Cow</a><br>
+    <a id="17" href="a">How Now Bro</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="18" href="p">wn Cow</a><br>
+    <a id="19" href="a">How Now Brow</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="20" href="p">n Cow</a><br>
+    <a id="21" href="a">How Now Brown</a> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; <a id="22" href="p">Cow</a><br>
+    <a id="23" href="a">How Now Brown C</a> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="24" href="p">ow</a><br>
+    <a id="25" href="a">How Now Brown Co</a> &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="26" href="p">w</a><br>
+    <a id="27" href="a">How Now Brown Cow</a><br><br>
+    <a id="end" href="a">test<br></a>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt
new file mode 100644
index 0000000..8eb0d31
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt
@@ -0,0 +1,19 @@
+test
+test             test
+test
+test
+test
+test
+
+
+
+
+test
+test
+PASS document.activeElement.getAttribute("id") is "4"
+PASS document.activeElement.getAttribute("id") is "6"
+PASS document.activeElement.getAttribute("id") is "8"
+PASS document.activeElement.getAttribute("id") is "end"
+PASS document.activeElement.getAttribute("id") is "7"
+PASS document.activeElement.getAttribute("id") is "2"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically.html b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically.html
new file mode 100644
index 0000000..00a5455
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically.html
@@ -0,0 +1,82 @@
+<html>
+  <!--
+    This test ensures the correctness of the "Fully aligned" precedence
+    logic implemented by Spatial Navigation algorithm in an vertical direction:
+    targets whose middle falls between the top and bottom of the current focused
+    element are preferably to move focus to, even if it is not the shortest distance.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves preferably to elements right up or above the
+       current focused element, even when there are some other closer
+       but not vertically aligned elements in the same direction.
+  -->
+  <head>
+    <script src="../../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "4"],
+      ["Down", "6"],
+      ["Down", "8"],
+      ["Down", "end"],
+      ["Up", "7"],
+      ["Up", "2"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      // starting the test itself: get to a known place.
+      document.getElementById("start").focus();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+    </script>
+    <script src="../js/resources/js-test-post.js"></script>
+  </head>
+  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
+    <div style="margin-left: 40px; text-align: left;">
+      <div style="margin-left: 40px;">
+        <a id="start" href="a">test<br></a>
+      </div>
+      <a id="2" href="a">test</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="3" href="a">test</a><br>
+      <div style="margin-left: 40px;">
+        <a id="4" href="a">test<br></a>
+      </div>
+      <div style="margin-left: 80px;">
+        <a id="5" href="a">test<br></a>
+      </div>
+      <div style="margin-left: 40px;">
+        <a id="6" href="a">test<br></a>
+      </div>
+      <a id="7" href="a">test<br></a>
+      <br><br><br><br>
+      <div style="margin-left: 40px;">
+        <a id="8" href="a">test<br></a>
+      </div>
+      <a id="end" href="a">test<br></a>
+    </div>
+    <div id="console"></div>
+  </body>
+</html>
+

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list