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