[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 15:59:04 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a3c1981435dee4a9ae89bdb897afec35a8b6ad2e
Author: chang.shu at nokia.com <chang.shu at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 17 16:48:16 2010 +0000

    2010-11-17  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            [Mac] Unskip the test that is passing now.
    
            Test: fast/events/spatial-navigation/snav-single-select.html
    
            * platform/mac/Skipped:
    2010-11-17  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            [Mac] Suppress single select popup menu when spatial navigation is enabled on Mac.
            This makes spatial navigation work properly for single select box.
    
            Test: fast/events/spatial-navigation/snav-single-select.html
    
            * dom/SelectElement.cpp:
            (WebCore::nextValidIndex):
            (WebCore::SelectElement::menuListDefaultEventHandler):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72210 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5d2c1de..fa1ba1a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-17  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        [Mac] Unskip the test that is passing now.
+
+        Test: fast/events/spatial-navigation/snav-single-select.html
+
+        * platform/mac/Skipped:
+
 2010-11-17  Anton Muhin  <antonm at chromium.org>
 
         Not reviewed, rebaselining fast/js/regexp-overflow.html
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index a0b2a72..25ed52d 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -265,9 +265,6 @@ fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
 # https://bugs.webkit.org/show_bug.cgi?id=47449
 fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
 
-# https://bugs.webkit.org/show_bug.cgi?id=48150
-fast/events/spatial-navigation/snav-single-select.html
-
 # Requires WebP support.
 fast/images/webp-image-decoding.html
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8fedd57..b57c5c8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-17  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        [Mac] Suppress single select popup menu when spatial navigation is enabled on Mac.
+        This makes spatial navigation work properly for single select box.
+
+        Test: fast/events/spatial-navigation/snav-single-select.html
+
+        * dom/SelectElement.cpp:
+        (WebCore::nextValidIndex):
+        (WebCore::SelectElement::menuListDefaultEventHandler):
+
 2010-11-17  Satish Sampath  <satish at chromium.org>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/dom/SelectElement.cpp b/WebCore/dom/SelectElement.cpp
index 31368fb..34a4961 100644
--- a/WebCore/dom/SelectElement.cpp
+++ b/WebCore/dom/SelectElement.cpp
@@ -512,7 +512,6 @@ void SelectElement::reset(SelectElementData& data, Element* element)
     element->setNeedsStyleRecalc();
 }
     
-#if !ARROW_KEYS_POP_MENU
 enum SkipDirection {
     SkipBackwards = -1,
     SkipForwards = 1
@@ -533,7 +532,6 @@ static int nextValidIndex(const Vector<Element*>& listItems, int listIndex, Skip
     }
     return lastGoodIndex;
 }
-#endif
 
 void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element* element, Event* event, HTMLFormElement* htmlForm)
 {
@@ -545,20 +543,24 @@ void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element
         bool handled = false;
 
 #if ARROW_KEYS_POP_MENU
-        if (keyIdentifier == "Down" || keyIdentifier == "Up") {
-            element->focus();
+        if (!isSpatialNavigationEnabled(element->document()->frame())) {
+            if (keyIdentifier == "Down" || keyIdentifier == "Up") {
+                element->focus();
 
-            if (!element->renderer()) // Calling focus() may cause us to lose our renderer, in which case do not want to handle the event.
-                return;
+                if (!element->renderer()) // Calling focus() may cause us to lose our renderer, in which case do not want to handle the event.
+                    return;
 
-            // Save the selection so it can be compared to the new selection when dispatching change events during setSelectedIndex,
-            // which gets called from RenderMenuList::valueChanged, which gets called after the user makes a selection from the menu.
-            saveLastSelection(data, element);
-            if (RenderMenuList* menuList = toRenderMenuList(element->renderer()))
-                menuList->showPopup();
-            handled = true;
+                // Save the selection so it can be compared to the new selection when dispatching change events during setSelectedIndex,
+                // which gets called from RenderMenuList::valueChanged, which gets called after the user makes a selection from the menu.
+                saveLastSelection(data, element);
+                if (RenderMenuList* menuList = toRenderMenuList(element->renderer()))
+                    menuList->showPopup();
+
+                event->setDefaultHandled();
+            }
+            return;
         }
-#else
+#endif
         // When using spatial navigation, we want to be able to navigate away from the select element
         // when the user hits any of the arrow keys, instead of changing the selection.
         if (isSpatialNavigationEnabled(element->document()->frame()))
@@ -591,7 +593,7 @@ void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element
         
         if (handled && listIndex >= 0 && (unsigned)listIndex < listItems.size())
             setSelectedIndex(data, element, listToOptionIndex(data, element, listIndex));
-#endif
+
         if (handled)
             event->setDefaultHandled();
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list