[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:50 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit bf2402957908419ee63f66b06820cb0adbe14802
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 10 20:13:41 2010 +0000
Extend keyboard navigation to allow directional navigation (LayoutTests - part V)
https://bugs.webkit.org/show_bug.cgi?id=18662
Reviewed by Dave Hyatt.
Patch by Antonio Gomes <tonikitoo at webkit.org>
This patch adds three LayoutTests that ensure the correctness of Spatial Navigation algorithm
in the following iframe related traversals:
1) All focusable elements in a <iframe> should be accessible.
2) Focusable elements in an <iframe> should be accessible even when
current focused element is in another <iframe> in the same page.
* fast/events/spatial-navigation/snav-iframe-no-focusable-content.html: Added.
* fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html: Added.
* fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8438e30..a2d4782 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -3,6 +3,25 @@
Reviewed by Dave Hyatt.
Patch by Antonio Gomes <tonikitoo at webkit.org>
+ Extend keyboard navigation to allow directional navigation (LayoutTests - part V)
+ https://bugs.webkit.org/show_bug.cgi?id=18662
+
+ This patch adds three LayoutTests that ensure the correctness of Spatial Navigation algorithm
+ in the following iframe related traversals:
+
+ 1) All focusable elements in a <iframe> should be accessible.
+ 2) Focusable elements in an <iframe> should be accessible even when
+ current focused element is in another <iframe> in the same page.
+
+ * fast/events/spatial-navigation/snav-iframe-no-focusable-content.html: Added.
+ * fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html: Added.
+ * fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html: Added.
+
+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 IV)
https://bugs.webkit.org/show_bug.cgi?id=18662
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/iframe.html b/LayoutTests/fast/events/spatial-navigation/resources/iframe.html
new file mode 100755
index 0000000..c5f1712
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/resources/iframe.html
@@ -0,0 +1,10 @@
+<html>
+ <body>
+ <a id="1" href="a">b</a><br>
+ <a id="2" href="a">c</a><br>
+ <a id="3" href="a">d</a><br>
+ <div style="margin-left:80px" >
+ <a id="7" href="a">e</a>
+ </div>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/iframe2.html b/LayoutTests/fast/events/spatial-navigation/resources/iframe2.html
new file mode 100644
index 0000000..ea97c02
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/resources/iframe2.html
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ <a id="4" href="a">g</a>
+ <a id="5" href="a">h</a>
+ <a id="6" href="a">i</a>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/iframe3.html b/LayoutTests/fast/events/spatial-navigation/resources/iframe3.html
new file mode 100644
index 0000000..01ad9f5
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/resources/iframe3.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <a id="1" href="a">b</a>
+ <div style="margin-top:120px">
+ <a id="2" href="a">d</a>
+ </div>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/iframe4.html b/LayoutTests/fast/events/spatial-navigation/resources/iframe4.html
new file mode 100644
index 0000000..17f48fe
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/resources/iframe4.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <div style="margin-top:120px">
+ <p>This frame has some text and no focusable element ...</a>
+ </div>
+ <p>... and some more text ...</a>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
new file mode 100644
index 0000000..25664ac
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
@@ -0,0 +1,7 @@
+a
+
+
+e
+PASS document.activeElement.getAttribute("id") is "end"
+PASS document.activeElement.getAttribute("id") is "start"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content.html
new file mode 100644
index 0000000..9fbf165
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content.html
@@ -0,0 +1,57 @@
+<html>
+ <!--
+ This test ensures the basic traversal correctness of Spatial Navigation
+ algorithm: iframes without any focusable content should be ignored.
+
+ * Pre-conditions:
+ 1) DRT support for SNav enable/disable.
+
+ * Navigation steps:
+ 1) Loads this page, focus goes to "start" automatically.
+ 2) Focus moves from "start" to "end" bypassing the two iframes
+ in between them, once both have no focusable elements inside.
+ -->
+ <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", "end"],
+ ["Up" , "start"],
+ ["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><a id="start" href="a">a</a></div>
+ <iframe src="resources/iframe4.html" width="80" height="80" scrolling="auto"></iframe><br>
+ <iframe src="resources/iframe4.html" scrolling="auto"></iframe><br>
+ <div><a id="end" href="a">e</a></div>
+ <div id="console"></div>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
new file mode 100644
index 0000000..3f928b2
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
@@ -0,0 +1,17 @@
+a
+
+
+a
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "3"
+PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "4"
+PASS document.activeElement.getAttribute("id") is "end"
+PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "4"
+PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "5"
+PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "6"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "7"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "3"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html
new file mode 100644
index 0000000..e320db9
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html
@@ -0,0 +1,68 @@
+<html>
+ <!--
+ This test ensures the basic iframe traversal correctness of Spatial Navigation
+ algorithm: focusable elements in a <iframe> 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 two iframes in the
+ Web page, eventually going to outer an southward link, but
+ going back to the iframe on the top 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", "2"],
+ ["Down", "3"],
+ ["Down", "4"],
+ ["Down", "end"],
+ ["Up", "4"],
+ ["Right", "5"],
+ ["Right", "6"],
+ ["Right", "7"],
+ ["Up", "3"],
+ ["Up", "2"],
+ ["Up", "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">
+ <div><a id="start" href="a">a</a></div>
+ <iframe src="resources/iframe.html"></iframe><br>
+ <iframe src="resources/iframe2.html"></iframe>
+ <div><a id="end" href="a">a</a></div>
+ <div id="console"></div>
+ </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
new file mode 100644
index 0000000..c33aa1c
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
@@ -0,0 +1,14 @@
+a
+
+e
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"
+PASS document.activeElement.getAttribute("id") is "end"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"
+PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"
+PASS document.activeElement.getAttribute("id") is "start"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
new file mode 100644
index 0000000..6c5f47f
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
@@ -0,0 +1,66 @@
+<html>
+ <!--
+ This test ensures the cross iframe traversal correctness of Spatial Navigation
+ algorithm: focusable elements in an <iframe> should be accessible even when
+ the current focused element is in another <iframe> in the same page.
+
+ * 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 two iframes in the
+ Web page, eventually going to outer an southward link, but
+ going back to the iframe on the top 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", "1"],
+ ["Down", "1"],
+ ["Down", "2"],
+ ["Down", "end"],
+ ["Up", "2"],
+ ["Up", "2"],
+ ["Up", "2"],
+ ["Up", "1"],
+ ["Up", "start"],
+ ["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><a id="start" href="a">a</a></div>
+ <iframe src="resources/iframe3.html" width="80" height="80" scrolling="auto"></iframe><br>
+ <div><a id="end" href="a">e</a></div>
+ <div id="console"></div>
+ </body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list