Bug 97177 - [Forms] HTMLSelectElement should call formStateDidChange on both menulist and lisbox mode
Summary: [Forms] HTMLSelectElement should call formStateDidChange on both menulist and...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: yosin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 23:33 PDT by yosin
Modified: 2012-09-20 01:41 PDT (History)
3 users (show)

See Also:


Attachments
Patch 1 (6.65 KB, patch)
2012-09-20 01:22 PDT, yosin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yosin 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
Comment 1 yosin 2012-09-20 01:22:45 PDT
Created attachment 164857 [details]
Patch 1
Comment 2 yosin 2012-09-20 01:23:32 PDT
Comment on attachment 164857 [details]
Patch 1

Could you review this patch?
Thanks in advance.
Comment 3 Kent Tamura 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.
Comment 4 Kent Tamura 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.
Comment 5 yosin 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.
Comment 6 yosin 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>
Comment 7 yosin 2012-09-20 01:41:05 PDT
All reviewed patches have been landed.  Closing bug.