[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

chang.shu at nokia.com chang.shu at nokia.com
Wed Dec 22 14:08:45 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 00f4650a541d05dfd66686d91351972771b569b1
Author: chang.shu at nokia.com <chang.shu at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 5 04:03:35 2010 +0000

    2010-10-04  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            Fixed the typo that searches the wrong direction in the no-focus-node case.
            As a result, after page is loaded, pressing key "arrowdown" will bring the
            focus to the 1st element instead of the last element.
            https://bugs.webkit.org/show_bug.cgi?id=46901
    
            * fast/events/spatial-navigation/snav-1st-stop-expected.txt: Added.
            * fast/events/spatial-navigation/snav-1st-stop.html: Added.
    2010-10-04  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            Fixed the typo that searches the wrong direction in the no-focus-node case.
            As a result, after page is loaded, pressing key "arrowdown" will bring the
            focus to the 1st element instead of the last element.
            https://bugs.webkit.org/show_bug.cgi?id=46901
    
            Test: fast/events/spatial-navigation/snav-1st-stop.html
    
            * page/FocusController.cpp:
            (WebCore::FocusController::advanceFocusDirectionally):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 93137e9..bb919b9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-04  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        Fixed the typo that searches the wrong direction in the no-focus-node case.
+        As a result, after page is loaded, pressing key "arrowdown" will bring the
+        focus to the 1st element instead of the last element.
+        https://bugs.webkit.org/show_bug.cgi?id=46901
+
+        * fast/events/spatial-navigation/snav-1st-stop-expected.txt: Added.
+        * fast/events/spatial-navigation/snav-1st-stop.html: Added.
+
 2010-10-04  Kent Tamura  <tkent at chromium.org>
 
         Unreviewed, test expectation update.
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-1st-stop-expected.txt b/LayoutTests/fast/events/spatial-navigation/snav-1st-stop-expected.txt
new file mode 100644
index 0000000..4d72870
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-1st-stop-expected.txt
@@ -0,0 +1,5 @@
+1	2	3
+4	5	6
+7	8	9
+PASS gFocusedDocument.activeElement.getAttribute("id") is "1"
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-1st-stop.html b/LayoutTests/fast/events/spatial-navigation/snav-1st-stop.html
new file mode 100644
index 0000000..98f2657
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/snav-1st-stop.html
@@ -0,0 +1,68 @@
+<html>
+  <!--
+    This test ensures the correctness of Spatial Navigation (SNav) algorithm from a non-focus scenario.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page and send key down.
+    2) The 1st link should be focused.
+  -->
+  <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"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      // starting the test from no focused node.
+      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="1" href="a">1</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="3" href="a">3</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="5" href="a">5</td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="7" href="a">7</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="9" href="a">9</a></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b839850..8d8d69b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-04  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        Fixed the typo that searches the wrong direction in the no-focus-node case.
+        As a result, after page is loaded, pressing key "arrowdown" will bring the
+        focus to the 1st element instead of the last element.
+        https://bugs.webkit.org/show_bug.cgi?id=46901
+
+        Test: fast/events/spatial-navigation/snav-1st-stop.html
+
+        * page/FocusController.cpp:
+        (WebCore::FocusController::advanceFocusDirectionally):
+
 2010-10-04  Simon Fraser  <simon.fraser at apple.com>
 
         No review.
diff --git a/WebCore/page/FocusController.cpp b/WebCore/page/FocusController.cpp
index 1ac50cb..622bf39 100644
--- a/WebCore/page/FocusController.cpp
+++ b/WebCore/page/FocusController.cpp
@@ -298,7 +298,7 @@ bool FocusController::advanceFocusDirectionally(FocusDirection direction, Keyboa
     if (!focusedNode) {
         // Just move to the first focusable node.
         FocusDirection tabDirection = (direction == FocusDirectionUp || direction == FocusDirectionLeft) ?
-                                       FocusDirectionForward : FocusDirectionBackward;
+                                       FocusDirectionBackward : FocusDirectionForward;
         // 'initialFocus' is set to true so the chrome is not focused.
         return advanceFocusInDocumentOrder(tabDirection, event, true);
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list