Changeset 69068 in webkit


Ignore:
Timestamp:
Oct 4, 2010 9:28:54 PM (14 years ago)
Author:
yael.aharon@nokia.com
Message:

2010-10-04 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Antonio Gomes.

Spatial Navigation: select element does not release focus with Spatial Navigation
https://bugs.webkit.org/show_bug.cgi?id=46896

  • fast/events/spatial-navigation/snav-multiple-select-expected.txt: Added.
  • fast/events/spatial-navigation/snav-multiple-select.html: Added.
  • fast/events/spatial-navigation/snav-single-select-expected.txt: Added.
  • fast/events/spatial-navigation/snav-single-select.html: Added.

2010-10-04 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Antonio Gomes.

Spatial Navigation: select element does not release focus with Spatial Navigation
https://bugs.webkit.org/show_bug.cgi?id=46896

When using Spatial Navigation, once a select element is focused, you cannot use arrow keys
to navigate out of the select element. That is because select element currently uses the
arrow keys to change the selected element.
Change the behavior of select element so it does not change selection, if Spatial Navigation
is on.

This patch is addressing the case where Spatial Navigation is used
in a mobile device, and the flag ENABLE_NO_LISTBOX_RENDERING is on.
In the future we can add support for the case where the flag is off, and
the user needs to traverse the select element inline.

Tests: fast/events/spatial-navigation/snav-multiple-select.html

fast/events/spatial-navigation/snav-single-select.html

  • dom/SelectElement.cpp: (WebCore::SelectElement::menuListDefaultEventHandler):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69063 r69068  
     12010-10-04  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        Spatial Navigation: select element does not release focus with Spatial Navigation
     6        https://bugs.webkit.org/show_bug.cgi?id=46896
     7
     8        * fast/events/spatial-navigation/snav-multiple-select-expected.txt: Added.
     9        * fast/events/spatial-navigation/snav-multiple-select.html: Added.
     10        * fast/events/spatial-navigation/snav-single-select-expected.txt: Added.
     11        * fast/events/spatial-navigation/snav-single-select.html: Added.
     12
    1132010-10-04  Chang Shu  <chang.shu@nokia.com>
    214
  • trunk/WebCore/ChangeLog

    r69064 r69068  
     12010-10-04  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        Spatial Navigation: select element does not release focus with Spatial Navigation
     6        https://bugs.webkit.org/show_bug.cgi?id=46896
     7
     8        When using Spatial Navigation, once a select element is focused, you cannot use arrow keys
     9        to navigate out of the select element. That is because select element currently uses the
     10        arrow keys to change the selected element.
     11        Change the behavior of select element so it does not change selection, if Spatial Navigation
     12        is on.
     13
     14        This patch is addressing the case where Spatial Navigation is used
     15        in a mobile device, and the flag ENABLE_NO_LISTBOX_RENDERING is on.
     16        In the future we can add support for the case where the flag is off, and
     17        the user needs to traverse the select element inline.
     18
     19        Tests: fast/events/spatial-navigation/snav-multiple-select.html
     20               fast/events/spatial-navigation/snav-single-select.html
     21
     22        * dom/SelectElement.cpp:
     23        (WebCore::SelectElement::menuListDefaultEventHandler):
     24
    1252010-10-04  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
    226
  • trunk/WebCore/dom/SelectElement.cpp

    r68112 r69068  
    4242#include "RenderListBox.h"
    4343#include "RenderMenuList.h"
     44#include "Settings.h"
    4445#include <wtf/Assertions.h>
    4546
     
    555556        }
    556557#else
     558        // When using spatial navigation, we want to be able to navigate away from the select element
     559        // when the user hits any of the arrow keys, instead of changing the selection.
     560        if (Frame* frame = element->document()->frame()) {
     561            if (frame->settings() && frame->settings()->isSpatialNavigationEnabled())
     562                return;
     563        }
     564
    557565        UNUSED_PARAM(htmlForm);
    558566        const Vector<Element*>& listItems = data.listItems(element);
Note: See TracChangeset for help on using the changeset viewer.