Add form delegate method that's invoked right before sending a submit event to a form element
https://bugs.webkit.org/show_bug.cgi?id=114575

Reviewed by Dan Bernstein.

Source/WebCore:

* WebCore.exp.in:
Export a symbol.

* WebCore.xcodeproj/project.pbxproj:
Make DOMHTMLFormElementInternal.h a private header.

Source/WebKit/mac:

* MigrateHeaders.make:
Copy DOMHTMLFormElementInternal.h over to WebKit.

* WebCoreSupport/WebFrameLoaderClient.mm:
(makeFormFieldValuesDictionary):
New helper function that returns the values of a form in dictionary form.

(WebFrameLoaderClient::dispatchWillSendSubmitEvent):
Call the right delegate method.

(WebFrameLoaderClient::dispatchWillSubmitForm):
Use the helper function.

* WebView/WebDelegateImplementationCaching.h:
* WebView/WebDelegateImplementationCaching.mm:
(CallFormDelegate):
Add another overload.

* WebView/WebFormDelegate.h:
* WebView/WebFormDelegate.m:
(-[WebFormDelegate willSendSubmitEventToForm:inFrame:withValues:]):
Add a default implementation.

Tools:

Add a test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm: Added.
(-[FormDelegate willSendSubmitEventToForm:inFrame:withValues:]):
(TestWebKitAPI):
(TestWebKitAPI::TEST):

* TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
(TestWebKitAPI::Util::toSTD):
Don't crash when a null NSString is passed to toSTD.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148368 268f45cc-cd09-0410-ab3c-d52691b4dbfc