summaryrefslogtreecommitdiffstats
path: root/webkit/port/bindings/v8/v8_custom.h
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 00:04:27 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 00:04:27 +0000
commitacfff58ef26770ba012abf51b4d1cedb8f058a9c (patch)
tree3ee2fdacf96fd705eb800e17ebc5bac068db4942 /webkit/port/bindings/v8/v8_custom.h
parent796de69f454b9de23ce143687fdbd76a9b3c9d54 (diff)
downloadchromium_src-acfff58ef26770ba012abf51b4d1cedb8f058a9c.zip
chromium_src-acfff58ef26770ba012abf51b4d1cedb8f058a9c.tar.gz
chromium_src-acfff58ef26770ba012abf51b4d1cedb8f058a9c.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/69014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8/v8_custom.h')
-rw-r--r--webkit/port/bindings/v8/v8_custom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h
index 73b5f96..e8a0bad 100644
--- a/webkit/port/bindings/v8/v8_custom.h
+++ b/webkit/port/bindings/v8/v8_custom.h
@@ -477,6 +477,7 @@ DECLARE_INDEXED_PROPERTY_GETTER(NamedNodeMap)
DECLARE_INDEXED_PROPERTY_GETTER(HTMLFormElement)
DECLARE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection)
+DECLARE_NAMED_PROPERTY_GETTER(HTMLSelectElementCollection)
DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection)
DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection)