Changeset 188672 in webkit
- Timestamp:
- Aug 19, 2015 5:55:10 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r188666 r188672 1 2015-08-19 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Select validation does not correctly work when handling change event 4 https://bugs.webkit.org/show_bug.cgi?id=145869 5 6 Reviewed by Dean Jackson. 7 8 Tests that checkValidity() returns correct results from within the onchange handler of a 9 <select> when the validity of the selected option changes. 10 11 * fast/forms/onchange-select-check-validity-expected.txt: Added. 12 * fast/forms/onchange-select-check-validity.html: Added. 13 1 14 2015-08-19 Jinyoung Hur <hur.ims@navercorp.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r188666 r188672 1 2015-08-19 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Select validation does not correctly work when handling change event 4 https://bugs.webkit.org/show_bug.cgi?id=145869 5 6 Reviewed by Dean Jackson. 7 8 When selecting an option in a <select> with validation that also has an onchange listener, calling 9 checkValidity() for the select within the onchange handler would produce incorrect results and (on 10 a debug build) crash at an assertion. This is because the change events were being dispatched before 11 form validity was updated. Making the validation step come before the change event dispatch fixes 12 this issue. 13 14 Test: fast/forms/onchange-select-check-validity.html 15 16 * html/HTMLSelectElement.cpp: 17 (WebCore::HTMLSelectElement::selectOption): Update validity before dispatching change events. 18 1 19 2015-08-19 Jinyoung Hur <hur.ims@navercorp.com> 2 20 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r188520 r188672 902 902 scrollToSelection(); 903 903 904 updateValidity(); 904 905 if (usesMenuList()) { 905 906 m_isProcessingUserDrivenChange = flags & UserDriven; … … 913 914 } 914 915 } 915 916 updateValidity();917 916 } 918 917
Note: See TracChangeset
for help on using the changeset viewer.