REGRESSION(r154586): Past names map should only be used when named item is empty
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Aug 2013 19:00:01 +0000 (19:00 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Aug 2013 19:00:01 +0000 (19:00 +0000)
commite120ed724dfb3e43ae342f5a12867e329f74cdb1
tree7c51bf9baf67f31e742b73d12677144240aecaee
parent3c2f29579722e8cfd0c7c57117d7e0dd72cfdd05
REGRESSION(r154586): Past names map should only be used when named item is empty
https://bugs.webkit.org/show_bug.cgi?id=120432

Reviewed by Anders Carlsson.

Source/WebCore:

Don't add the element from the past names map if we've found elements of the given name.

Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):

LayoutTests:

Add a regression test so that we never regress again.

* fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty-expected.txt: Added.
* fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFormElement.cpp