Changeset 102741 in webkit
- Timestamp:
- Dec 13, 2011 10:14:46 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r102734 r102741 1 2011-12-13 Yosifumi Inoue <yosin@chromium.org> 2 3 [Forms] Default selection of select(menulist) should not be disabled 4 https://bugs.webkit.org/show_bug.cgi?id=74270 5 6 Reviewed by Kent Tamura. 7 8 basic-selects.html will fail because select element displays disabled 9 option element "foo" at index 0 as default selection. This should be 10 non-disabled option "bar" at index 1. 11 12 menulist-disabled-option-expected.html checks default selection of 13 select(menulist) with disabled option element. 14 15 * fast/forms/select/menulist-disabled-option-expected.html: Added. 16 * fast/forms/select/menulist-disabled-option.html: Added. 17 * platform/chromium/test_expectations.txt: Add fast/forms/basic-selects.html 18 * platform/gtk/test_expectations.txt: Add fast/forms/basic-selects.html 19 * platform/mac/test_expectations.txt: Add fast/forms/basic-selects.html 20 * platform/qt/test_expectations.txt: Add fast/forms/basic-selects.html 21 * platform/win/test_expectations.txt: Add fast/forms/basic-selects.html 22 1 23 2011-12-13 Hajime Morrita <morrita@chromium.org> 2 24 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r102729 r102741 1107 1107 BUGWK70748 CPU : fast/css/nested-rounded-corners.html = IMAGE 1108 1108 BUGWK70748 CPU : fast/css/text-input-with-webkit-border-radius.html = IMAGE 1109 BUGWK70748 CPU : fast/forms/basic-selects.html = IMAGE1110 1109 BUGWK70748 CPU : fast/forms/validation-message-appearance.html = IMAGE 1111 1110 BUGWK70748 CPU : fast/repaint/shadow-multiple-horizontal.html = IMAGE … … 3955 3954 BUGWK73838 LEOPARD DEBUG : animations/animation-add-events-in-handler.html = CRASH 3956 3955 3956 BUGWK74270 : fast/forms/basic-selects.html = FAIL 3957 3957 3958 // Need rebaseline on Linux and Win GPU 3958 3959 BUGWK73905 GPU LINUX : media/video-layer-crash.html = IMAGE+TEXT -
trunk/LayoutTests/platform/gtk/test_expectations.txt
r102607 r102741 90 90 91 91 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL 92 93 BUGWK74270 : fast/forms/basic-selects.html = FAIL 94 -
trunk/LayoutTests/platform/mac/test_expectations.txt
r101950 r102741 37 37 38 38 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL 39 40 BUGWK74270 : fast/forms/basic-selects.html = FAIL 41 -
trunk/LayoutTests/platform/qt/test_expectations.txt
r101950 r102741 20 20 21 21 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL 22 23 BUGWK74270 : fast/forms/basic-selects.html = FAIL 24 -
trunk/LayoutTests/platform/win/test_expectations.txt
r101950 r102741 15 15 16 16 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL 17 18 BUGWK74270 : fast/forms/basic-selects.html = FAIL 19 -
trunk/Source/WebCore/ChangeLog
r102740 r102741 1 2011-12-13 Yosifumi Inoue <yosin@chromium.org> 2 3 [Forms] Default selection of select(menulist) should not be disabled 4 https://bugs.webkit.org/show_bug.cgi?id=74270 5 6 Reviewed by Kent Tamura. 7 8 This patch changes default selection of select(menulist) element to 9 1. Selected option element. If there are multiple options which have 10 selected state, we pick the largest index option up. (same as current) 11 2. Non-disabled option element (new behavior) 12 3. The first option if all options are disabled. (new behavior) 13 14 Tests: fast/forms/select/menulist-disabled-option-expected.html 15 fast/forms/select/menulist-disabled-option.html 16 17 * html/HTMLSelectElement.cpp: 18 (WebCore::HTMLSelectElement::recalcListItems): Implement new logic for selection. 19 1 20 2011-12-13 Simon Fraser <simon.fraser@apple.com> 2 21 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r102419 r102741 692 692 693 693 HTMLOptionElement* foundSelected = 0; 694 HTMLOptionElement* firstOption = 0; 694 695 for (Node* currentNode = this->firstChild(); currentNode;) { 695 696 if (!currentNode->isHTMLElement()) { … … 715 716 716 717 if (updateSelectedStates && !m_multiple) { 717 if (!foundSelected && (m_size <= 1 || toHTMLOptionElement(current)->selected())) { 718 foundSelected = toHTMLOptionElement(current); 718 HTMLOptionElement* option = toHTMLOptionElement(current); 719 if (!firstOption) 720 firstOption = option; 721 if (option->selected()) { 722 if (foundSelected) 723 foundSelected->setSelectedState(false); 724 foundSelected = option; 725 } else if (m_size <= 1 && !foundSelected && !option->disabled()) { 726 foundSelected = option; 719 727 foundSelected->setSelectedState(true); 720 } else if (foundSelected && toHTMLOptionElement(current)->selected()) {721 foundSelected->setSelectedState(false);722 foundSelected = toHTMLOptionElement(current);723 728 } 724 729 } … … 736 741 currentNode = currentNode->traverseNextSibling(this); 737 742 } 743 744 if (!foundSelected && m_size <= 1 && firstOption && !firstOption->selected()) 745 firstOption->setSelectedState(true); 738 746 } 739 747
Note: See TracChangeset
for help on using the changeset viewer.