[webkit-reviews] review requested: [Bug 32641] The selected property of <option> elements is not always up to date : [Attachment 46080] Much better patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 7 13:15:55 PST 2010
James Robinson <jamesr at chromium.org> has asked for review:
Bug 32641: The selected property of <option> elements is not always up to date
https://bugs.webkit.org/show_bug.cgi?id=32641
Attachment 46080: Much better patch
https://bugs.webkit.org/attachment.cgi?id=46080&action=review
------- Additional Comments from James Robinson <jamesr at chromium.org>
This patch adds a check in the OptionElement::selected() getter and
recalculates everything if items are out of date. It also adds two new tests,
one that checks selected and selectedIndex right after the </select> and one
right before it.
On HTMLOptionElement_selected2.html, we previously did not match FFx 3.5 or
IE8. With this patch we match them both (with the correct behavior).
On HTMLOptionElement_selected3.html, we previously matched IE8 but had a very
weird behavior (the 'selected' attribute was out of date until 'selectedIndex'
was queried). FFx 3.5 completely chokes on this test (it shows 'selected' as
false on every <option> and shows 'selectedIndex' as -1 until the </select> is
parsed). With this patch we show the correct values for 'selected' and
'selectedIndex' before the </select> which seems like the most sane behavior.
We also now match FFx 3.5 on
fast/forms/add-remove-option-modification-event.html, which was previously
marked as an expected failure. Plus, this patch doesn't depend on
recalcStyle() side effects.
More information about the webkit-reviews
mailing list