[webkit-reviews] review granted: [Bug 67233] Setting value on a select element to a non existing option value should clear selection : [Attachment 120984] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 10 11:44:24 PST 2012


Darin Adler <darin at apple.com> has granted Jon Lee <jonlee at apple.com>'s request
for review:
Bug 67233: Setting value on a select element to a non existing option value
should clear selection
https://bugs.webkit.org/show_bug.cgi?id=67233

Attachment 120984: Patch
https://bugs.webkit.org/attachment.cgi?id=120984&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=120984&action=review


> Source/WebCore/html/HTMLSelectElement.cpp:257
> +    // Setting the value clears the selectedness of all options.
> +    setSelectedIndex(-1);

Does calling setSelectedIndex twice have any additional effect? For example, do
we get additional change events?

To word this another way, why isn’t this call in the return statement and then
again at the end of the function?


More information about the webkit-reviews mailing list