[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
tonikitoo at webkit.org
tonikitoo at webkit.org
Wed Mar 17 18:20:23 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 8cc3b9fc5ff282dd922a5c5548127858b228181f
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 5 15:48:12 2010 +0000
Extend keyboard navigation to allow directional navigation (LayoutTests - part II)
https://bugs.webkit.org/show_bug.cgi?id=18662
Reviewed by Kenneth Christiansen.
Patch by Antonio Gomes <tonikitoo at webkit.org>
This patch adds two LayoutTest to ensure the basic table traversal correctness of
Spatial Navigation (SNav) algorithm: focusable elements in a <table> should be accessible.
* fast/events/spatial-navigation/snav-table-traversal.html: Added.
Makes sure all elements in a <table> are accessible via Spatial Navigation.
* fast/events/spatial-navigation/snav-tiny-table-traversal.html: Added.
Tests the similar table traversal scenario as above, but in this case the elements
in the <table> are styled with 'font-size: small'. That way this test also validades
that overlapping rects of elements too closed from each other are correctly handled.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 896089f..e6f1ada 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-03-03 Antonio Gomes <tonikitoo at webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+ Patch by Antonio Gomes <tonikitoo at webkit.org>
+
+ Extend keyboard navigation to allow directional navigation (LayoutTests - part II)
+ https://bugs.webkit.org/show_bug.cgi?id=18662
+
+ This patch adds two LayoutTest to ensure the basic table traversal correctness of
+ Spatial Navigation (SNav) algorithm: focusable elements in a <table> should be accessible.
+
+ * fast/events/spatial-navigation/snav-table-traversal.html: Added.
+ Makes sure all elements in a <table> are accessible via Spatial Navigation.
+ * fast/events/spatial-navigation/snav-tiny-table-traversal.html: Added.
+ Tests the similar table traversal scenario as above, but in this case the elements
+ in the <table> are styled with 'font-size: small'. That way this test also validades
+ that overlapping rects of elements too closed from each other are correctly handled.
+
2010-03-02 Antonio Gomes <tonikitoo at webkit.org>
Reviewed by Kenneth Christiansen.
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-table-traversal-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-table-traversal-expected.txt
new file mode 100644
index 0000000..b30b946
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-table-traversal-expected.txt
@@ -0,0 +1,15 @@
+a a a
+a a a
+a a a
+End of table traversal test
+PASS document.activeElement.getAttribute("id") is "4"
+PASS document.activeElement.getAttribute("id") is "7"
+PASS document.activeElement.getAttribute("id") is "end"
+PASS document.activeElement.getAttribute("id") is "7"
+PASS document.activeElement.getAttribute("id") is "8"
+PASS document.activeElement.getAttribute("id") is "9"
+PASS document.activeElement.getAttribute("id") is "6"
+PASS document.activeElement.getAttribute("id") is "3"
+PASS document.activeElement.getAttribute("id") is "2"
+FAIL document.activeElement.getAttribute("id") should be 1. Was start.
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-table-traversal.html b/LayoutTests/fast/events/spatial-navigation/snav-table-traversal.html
new file mode 100644
index 0000000..572f6db
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-table-traversal.html
@@ -0,0 +1,86 @@
+<html>
+ <!--
+ This test ensures the basic table traversal correctness of
+ Spatial Navigation (SNav) algorithm: focusable elements in a
+ <table> should be accessible.
+
+ * Pre-conditions:
+ 1) DRT support for SNav enable/disable.
+
+ * Navigation steps:
+ 1) Loads this page, focus goes to "start" automatically.
+ 2) Focus moves along through the sparsely positioned elements
+ in the table, eventually going to an outer southward link,
+ but going back inside the table later on.
+ -->
+ <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", "7"],
+ ["Down", "end"],
+ ["Up", "7"],
+ ["Right", "8"],
+ ["Right", "9"],
+ ["Up", "6"],
+ ["Up", "3"],
+ ["Left", "2"],
+ ["Left", "1"],
+ ["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">
+ <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top; text-align: center;"><a id="start" href="a">a</a></td>
+ <td style="vertical-align: top; text-align: center;"><a id="2" href="a">a</a></td>
+ <td style="vertical-align: top; text-align: center;"><a id="3" href="a">a</a></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: center;"><a id="4" href="a">a</a></td>
+ <td style="vertical-align: top; text-align: center;"><a id="5" href="a">a</a></td>
+ <td style="vertical-align: top; text-align: center;"><a id="6" href="a">a</a></td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: center;"><a id="7" href="a">a</a></td>
+ <td style="vertical-align: top; text-align: center;"><a id="8" href="a">a</a></td>
+ <td style="vertical-align: top; text-align: center;"><a id="9" href="a">a</a></td>
+ </tr>
+ </tbody>
+ </table>
+ <div style='margin-top:100px'>
+ <a id="end" href="a">End of table traversal test</a>
+ </div>
+ <div id="console"></div>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt
new file mode 100644
index 0000000..3ae08bc
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt
@@ -0,0 +1,20 @@
+a
+a a a
+a a a
+a a a
+a
+a
+PASS document.activeElement.getAttribute("id") is "1"
+PASS document.activeElement.getAttribute("id") is "4"
+PASS document.activeElement.getAttribute("id") is "7"
+PASS document.activeElement.getAttribute("id") is "end"
+PASS document.activeElement.getAttribute("id") is "7"
+PASS document.activeElement.getAttribute("id") is "8"
+PASS document.activeElement.getAttribute("id") is "9"
+PASS document.activeElement.getAttribute("id") is "6"
+PASS document.activeElement.getAttribute("id") is "right"
+PASS document.activeElement.getAttribute("id") is "6"
+PASS document.activeElement.getAttribute("id") is "3"
+PASS document.activeElement.getAttribute("id") is "2"
+PASS document.activeElement.getAttribute("id") is "1"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal.html b/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal.html
new file mode 100644
index 0000000..de5a003
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal.html
@@ -0,0 +1,93 @@
+<html>
+ <!--
+ This test ensures the basic table traversal correctness of
+ Spatial Navigation (SNav) algorithm: focusable elements in a
+ <table> should be accessible.
+
+ * Pre-conditions:
+ 1) DRT support for SNav enable/disable.
+
+ * Navigation steps:
+ 1) Loads this page, focus goes to "start" automatically.
+ 2) Focus moves along the elements in the table, eventually
+ going to outer southward and eastward links, but going
+ back inside the table later on.
+ -->
+ <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"],
+ ["Down", "4"],
+ ["Down", "7"],
+ ["Down", "end"],
+ ["Up", "7"],
+ ["Right", "8"],
+ ["Right", "9"],
+ ["Up", "6"],
+ ["Right", "right"],
+ ["Left", "6"],
+ ["Up", "3"],
+ ["Left", "2"],
+ ["Left", "1"],
+ ["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">a</a><br>
+ <table>
+ <tbody>
+ <tr>
+ <td style="font-size: small;"><a id="1" href="a">a</a></td>
+ <td style="font-size: small;"><a id="2" href="a">a</a></td>
+ <td style="font-size: small;"><a id="3" href="a">a</a></td>
+ </tr>
+ <tr>
+ <td style="font-size: small;"><a id="4" href="a">a</a></td>
+ <td style="font-size: small;"><a id="5" href="a">a</a></td>
+ <td style="font-size: small;"><a id="6" href="a">a</a></td>
+ </tr>
+ <tr>
+ <td style="font-size: small;"><a id="7" href="a">a</a></td>
+ <td style="font-size: small;"><a id="8" href="a">a</a></td>
+ <td style="font-size: small;"><a id="9" href="a">a</a></td>
+ </tr>
+ </tbody>
+ </table>
+ <div style='margin-top:8px'>
+ <a id="end" href="a">a<a>
+ </div>
+ <div style="margin-left: 50px; margin-top:-70px">
+ <a id="right" href="http://www.google.com">a</a>
+ </div>
+ <div style="margin-top:100px" id="console"></div>
+ </body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list