Cleanup HTMLFormCollection
https://bugs.webkit.org/show_bug.cgi?id=90111
Reviewed by Andreas Kling.
Source/WebCore:
Got rid of getNamedItem and enamed getNamedFormItem to firstNamedItem and got rid of duplicateNumber argument since
it's always 0. Also made it a static local function. In addition, removed nextItem() since it's not used anywhere.
WebKit API Test: WebKit1.HTMLFormCollectionNamedItemTest
* html/HTMLFormCollection.cpp:
(WebCore::firstNamedItem):
(WebCore):
(WebCore::HTMLFormCollection::namedItem):
* html/HTMLFormCollection.h:
(HTMLFormCollection):
Tools:
Add a WebKit API test using copy-paste design pattern per kling's request.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.html: Added.
* TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm: Added.
(-[HTMLFormCollectionNamedItemTest webView:didFinishLoadForFrame:]):
(TestWebKitAPI):
(TestWebKitAPI::TEST):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121478
268f45cc-cd09-0410-ab3c-
d52691b4dbfc