Cleanup static_cast<HTMLFormElement*> by using toHTMLFormElement()
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Dec 2013 02:58:28 +0000 (02:58 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Dec 2013 02:58:28 +0000 (02:58 +0000)
commitcbea6cc2c746448aa1ac7483469fc73f71e6cfd8
treeac78f686b3f080433c05814555b4c74370447214
parenta19de8b919f6bca549076db743832d16abb30e7b
Cleanup static_cast<HTMLFormElement*> by using toHTMLFormElement()
https://bugs.webkit.org/show_bug.cgi?id=126309

Reviewed by Andreas Kling.

To detect bad type casts, it would be good to use toHTMLFormElement() instead of
using manual type cast. Additionally FORM_ASSOCIATED_ELEMENT_TYPE_CASTS is introduced newly
to do it.

Source/WebCore:

No new tests, no behavior changes.

* html/FormAssociatedElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submitImplicitly):
(WebCore::HTMLFormElement::validateInteractively):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::reset):
(WebCore::HTMLFormElement::defaultButton):
(WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
(WebCore::HTMLFormElement::documentDidResumeFromPageCache):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):

Source/WebKit/blackberry:

* WebCoreSupport/CredentialTransformData.cpp:
(WebCore::CredentialTransformData::findPasswordFormFields):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::toTextControlElement):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::updateFormState):
(BlackBerry::WebKit::InputHandler::submitForm):

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::elementWithName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/FormAssociatedElement.h
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/loader/FormSubmission.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp
Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebFrame.cpp