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


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

    Extend keyboard navigation to allow directional navigation (LayoutTests - part IV)
    https://bugs.webkit.org/show_bug.cgi?id=18662
    
    Reviewed by Dave Hyatt.
    Patch by Antonio Gomes <tonikitoo at webkit.org>
    
    This patch adds a LayoutTest that ensures that:
    
    1) There is no unit overflow in the Spatial Navigation algorithm while
       calculating the best node candidate to move focus to. To test that this
       page positions some elements 10000000 pixels far from each other (distance
       that can considered large enough for most of the Web Pages on the
       Internet).
    
    2) A best focusable candidate only gets focused if it is visible in the
       current Viewport. Scroll-in-direction is performed otherwise.
    
    * fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index eed82ab..8438e30 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -3,6 +3,27 @@
         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
+
+        This patch adds a LayoutTest that ensures that:
+
+        1) There is no unit overflow in the Spatial Navigation algorithm while
+           calculating the best node candidate to move focus to. To test that this
+           page positions some elements 10000000 pixels far from each other (distance
+           that can considered large enough for most of the Web Pages on the
+           Internet).
+
+        2) A best focusable candidate only gets focused if it is visible in the
+           current Viewport. Scroll-in-direction is performed otherwise.
+
+        * fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.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 III)
         https://bugs.webkit.org/show_bug.cgi?id=18662
 
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt
new file mode 100644
index 0000000..12a5316
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt
@@ -0,0 +1,6 @@
+Start
+End
+PASS document.activeElement.getAttribute("id") is "start"
+PASS true is true
+PASS document.activeElement.getAttribute("id") is "end"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html b/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
new file mode 100644
index 0000000..4e8641d
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
@@ -0,0 +1,96 @@
+<html>
+  <!--
+    This test ensures the correctness the following Spatial Navigation
+    (SNav) algorithm features.
+
+    1) There is no unit overflow in the Spatial Navigation algorithm while
+       calculating the best node candidate to move focus to. To test that this
+       page positions some elements 10000000 pixels far from each other (distance
+       that can considered large enough for most of the Web Pages on the
+       Internet).
+
+    2) Make sure that a best focusable candidate only gets focused
+       if it is visible in the current Viewport. Scroll-in-direction
+       is performed otherwise.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Attempt to move focus down to "end. As it is too far and out of
+       viewport, focus change will not happen and page will be scrolled
+       a step down.
+    3) By sending an "End" keypress, page gets scrolled down to a place
+       where the "end" node gets visible in the viewport.
+    4) Step _1_ is ran again, and "end" gets focused. -->
+  <head>
+    <script src="../../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap1 = [
+      ["Down", "start"],
+      ["", ""]
+    ];
+
+    var resultMap2 = [
+      ["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();
+
+      setTimeout(step1 , 0);
+      setTimeout(step2 , 500);
+    }
+
+    function step1()
+    {
+      // Actions in 'resultMap1' should keep the focus in the currently
+      // focused element ('start') once the best candidate ('end') is not
+      // visible in current viewport.
+      initTest(resultMap1);
+    }
+
+    function step2()
+    {
+      shouldBeTrue(String(document.body.scrollTop != 0));
+
+      // Then it scrolls down to the end of the page ...
+      if (window.eventSender)
+        eventSender.keyDown("end");
+
+      // And 'resultMap2' re-tries to move focus down.
+      initTest(resultMap2, 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">Start</a>
+    <div style='margin-top:100000000px'>
+        <a id="end" href="a">End</a>
+    </div>
+    <div id="console"></div>
+  </body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list