Changeset 71094 in webkit


Ignore:
Timestamp:
Nov 1, 2010 6:56:45 PM (13 years ago)
Author:
chang.shu@nokia.com
Message:

2010-11-01 Chang Shu <chang.shu@nokia.com>

Reviewed by Antonio Gomes.

Leave SelectElement key handling without setting event default
handled when the selection reaches the boundary so focus can
move to neighbor nodes in spatial navigation.
https://bugs.webkit.org/show_bug.cgi?id=48145

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

2010-11-01 Chang Shu <chang.shu@nokia.com>

Reviewed by Antonio Gomes.

Leave SelectElement key handling without setting event default
handled when the selection reaches the boundary so focus can
move to neighbor nodes in spatial navigation.
https://bugs.webkit.org/show_bug.cgi?id=48145

  • dom/SelectElement.cpp: (WebCore::SelectElement::listBoxDefaultEventHandler):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r71093 r71094  
     12010-11-01  Chang Shu  <chang.shu@nokia.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        Leave SelectElement key handling without setting event default
     6        handled when the selection reaches the boundary so focus can
     7        move to neighbor nodes in spatial navigation.
     8        https://bugs.webkit.org/show_bug.cgi?id=48145
     9
     10        * fast/events/spatial-navigation/snav-multiple-select-expected.txt:
     11        * fast/events/spatial-navigation/snav-multiple-select.html:
     12
    1132010-11-01  Dmitry Titov  <dimich@chromium.org>
    214
  • trunk/LayoutTests/fast/events/spatial-navigation/snav-multiple-select-expected.txt

    r70481 r71094  
    224               6
    338       
    4 FAIL gFocusedDocument.activeElement.getAttribute("id") should be 8. Was start.
    54PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
    6 FAIL gFocusedDocument.activeElement.getAttribute("id") should be 2. Was start.
     5PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
     6PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
     7PASS gFocusedDocument.activeElement.getAttribute("id") is "8"
     8PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
     9PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
     10PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
     11PASS gFocusedDocument.activeElement.getAttribute("id") is "2"
    712PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
    813PASS gFocusedDocument.activeElement.getAttribute("id") is "6"
  • trunk/LayoutTests/fast/events/spatial-navigation/snav-multiple-select.html

    r69068 r71094  
    1616
    1717    var resultMap = [
     18      ["Down", "start"],
     19      ["Down", "start"],
     20      ["Down", "start"],
    1821      ["Down", "8"],
     22      ["Up", "start"],
     23      ["Up", "start"],
    1924      ["Up", "start"],
    2025      ["Up", "2"],
  • trunk/WebCore/ChangeLog

    r71091 r71094  
     12010-11-01  Chang Shu  <chang.shu@nokia.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        Leave SelectElement key handling without setting event default
     6        handled when the selection reaches the boundary so focus can
     7        move to neighbor nodes in spatial navigation.
     8        https://bugs.webkit.org/show_bug.cgi?id=48145
     9
     10        * dom/SelectElement.cpp:
     11        (WebCore::SelectElement::listBoxDefaultEventHandler):
     12
    1132010-11-01  Sheriff Bot  <webkit.review.bot@gmail.com>
    214
  • trunk/WebCore/dom/SelectElement.cpp

    r69827 r71094  
    763763                endIndex = previousSelectableListIndex(data, element, data.activeSelectionEndIndex());   
    764764        }
    765        
     765
     766        if (Frame* frame = element->document()->frame()) {
     767            if (frame->settings() && frame->settings()->isSpatialNavigationEnabled()) {
     768                // Check if the selection moves to the boundary.
     769                if (keyIdentifier == "Left" || keyIdentifier == "Right" || ((keyIdentifier == "Down" || keyIdentifier == "Up") && endIndex == data.activeSelectionEndIndex()))
     770                    return;
     771            }
     772        }
     773
    766774        if (keyIdentifier == "Down" || keyIdentifier == "Up") {
    767775            // Save the selection so it can be compared to the new selection when dispatching change events immediately after making the new selection.
Note: See TracChangeset for help on using the changeset viewer.