diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 18:07:56 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 18:07:56 +0000 |
commit | 8aa31e5bb274abd6f5eb43e6297e00cf6d365856 (patch) | |
tree | e2531465857525f8344007a9c38818e5d0bb2d3b /chrome/browser/browser_window.h | |
parent | 4e827189e8f3c3b8c06d4bde33d743faf7535e2b (diff) | |
download | chromium_src-8aa31e5bb274abd6f5eb43e6297e00cf6d365856.zip chromium_src-8aa31e5bb274abd6f5eb43e6297e00cf6d365856.tar.gz chromium_src-8aa31e5bb274abd6f5eb43e6297e00cf6d365856.tar.bz2 |
Make HTMLSelectElement and HTMLOptionsCollection return collections of options
elements if there are multiple options that share a name.
Currently Safari and chromium differ in their behavior in this area. Safari returns
multiple options in a collection if necessary, but only for HTMLOptionsCollection. For
HTMLSelectElement it always returns null.
Chromium returns a single option no matter what, but for both HTMLSelectElement
and HTMLOptionsCollection. It's also very slow at this, as it bypasses a webkit cache.
The HTML5 doc states that a collection should be returned if necessary for both.
The relevant parts of the spec are:
http://dev.w3.org/html5/spec/Overview.html#the-select-element
and
http://dev.w3.org/html5/spec/Overview.html#htmloptionscollection-0
So if you have:
<select id="sl1"><option value="Value" name="test" /></select>
and in JS code you do:
var test = document.getElementById("sl1").test
test should be a single HTMLOptionElement.
If instead you have:
<select id="sl2"><option value="Value1" name="test" /><option value="Value2"
name="test" /></select>
test should be a collection with 2 HTMLOptionElements.
This bug: https://bugs.webkit.org/show_bug.cgi?id=25191 has been filed against
webkit, with a new layout test to confirm the behavior
Review URL: http://codereview.chromium.org/67148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_window.h')
0 files changed, 0 insertions, 0 deletions