Cleanup HTMLFormCollection
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 23:01:06 +0000 (23:01 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 23:01:06 +0000 (23:01 +0000)
commitad574ca97762f855d5ef59eb1bc2dd6c041a38b4
tree2c1dd00f93b8c221061f876a051cac29b4f22322
parent9e0c4f706dc9d4ed0c8a58fa6c807b40a0dc9c3d
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
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFormCollection.cpp
Source/WebCore/html/HTMLFormCollection.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.html [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm [new file with mode: 0644]