2011-04-06 Naoki Takano <takano.naoki@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 20:52:17 +0000 (20:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 20:52:17 +0000 (20:52 +0000)
commit86f405cd05fdef132cf9ede21519af82f4f37986
tree68382aeed28bc6f1ec31a70e1a8a2d37e82fee71
parentfae041ed76b56b295da45e7e5ec94d5dd68f6e72
2011-04-06  Naoki Takano  <takano.naoki@gmail.com>

        Reviewed by David Levin.

        Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
        https://bugs.webkit.org/show_bug.cgi?id=27658

        * fast/events/select-element-expected.txt: Added to check PgUp/PgDown/Home/End keys are working correctly in SELECT tag.
        * fast/events/select-element.html: Added for expectation.
2011-04-06  Naoki Takano  <takano.naoki@gmail.com>

        Reviewed by David Levin.

        Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
        https://bugs.webkit.org/show_bug.cgi?id=27658

        Test: fast/events/select-element.html

        * dom/SelectElement.cpp:
        (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
        (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
        (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
        And converted to a normal static function from a private function of SelectElement.
        (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
        And converted to a normal static function from a private function of SelectElement.
        (WebCore::firstSelectableListIndex): Returns the first selectable index.
        (WebCore::lastSelectableListIndex): Returns the last selectable index.
        (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
        (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.

        * dom/SelectElement.h:
        (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().

        * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
        They can differ due to the minimum size imposed by RenderListBox.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/select-element-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/select-element.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/SelectElement.cpp
Source/WebCore/dom/SelectElement.h
Source/WebCore/rendering/RenderListBox.h