RESOLVED FIXED Bug 97177
[Forms] HTMLSelectElement should call formStateDidChange on both menulist and lisbox mode
https://bugs.webkit.org/show_bug.cgi?id=97177
Summary [Forms] HTMLSelectElement should call formStateDidChange on both menulist and...
yosin
Reported 2012-09-19 23:33:29 PDT
When HTMLSelectElement is menulist mode, it calls formStateDidChange(), however when it is listbox mode, it doesn't. There is a similar bug for multiple field time input UI: bug 97169 - [Forms] multiple fields time input UI should call notifyFormStateChanged() when value of field is changed
Attachments
Patch 1 (6.65 KB, patch)
2012-09-20 01:22 PDT, yosin
no flags
yosin
Comment 1 2012-09-20 01:22:45 PDT
yosin
Comment 2 2012-09-20 01:23:32 PDT
Comment on attachment 164857 [details] Patch 1 Could you review this patch? Thanks in advance.
Kent Tamura
Comment 3 2012-09-20 01:33:23 PDT
Comment on attachment 164857 [details] Patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=164857&action=review > Source/WebCore/html/HTMLSelectElement.cpp:635 > + notifyFormStateChanged(); Are there other places which should have notifyFromStateChanged()? I think calling notifyFromStateChanged() in listBoxOnChange() and dispatchChangeEventForMenuList() is more reliable.
Kent Tamura
Comment 4 2012-09-20 01:35:31 PDT
Comment on attachment 164857 [details] Patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=164857&action=review >> Source/WebCore/html/HTMLSelectElement.cpp:635 >> + notifyFormStateChanged(); > > Are there other places which should have notifyFromStateChanged()? > > I think calling notifyFromStateChanged() in listBoxOnChange() and dispatchChangeEventForMenuList() is more reliable. > I think calling notifyFromStateChanged() in listBoxOnChange() and dispatchChangeEventForMenuList() is more reliable. Ah, no. If we do so, state change by JavaScript won't update the state.
yosin
Comment 5 2012-09-20 01:40:10 PDT
(In reply to comment #4) > (From update of attachment 164857 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164857&action=review > > >> Source/WebCore/html/HTMLSelectElement.cpp:635 > >> + notifyFormStateChanged(); > > > > Are there other places which should have notifyFromStateChanged()? > > > > I think calling notifyFromStateChanged() in listBoxOnChange() and dispatchChangeEventForMenuList() is more reliable. > > > I think calling notifyFromStateChanged() in listBoxOnChange() and dispatchChangeEventForMenuList() is more reliable. > > Ah, no. If we do so, state change by JavaScript won't update the state. Agree, it seems notifyFormStateChanged() is called with setNeedValidityCheck() in other types.
yosin
Comment 6 2012-09-20 01:41:00 PDT
Comment on attachment 164857 [details] Patch 1 Clearing flags on attachment: 164857 Committed r129107: <http://trac.webkit.org/changeset/129107>
yosin
Comment 7 2012-09-20 01:41:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.