Adopt is/toHTMLInputElement for code cleanup
authorkangil.han@samsung.com <kangil.han@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jun 2013 02:26:41 +0000 (02:26 +0000)
committerkangil.han@samsung.com <kangil.han@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jun 2013 02:26:41 +0000 (02:26 +0000)
commit2cda0c12cc805e4d36e4b095c6744e92a0b6980a
tree62f633626142b3366e2b37fb5cb9f1d96eabffad
parent1c650f025d4ab8a5e401b7ee889da79055cd9a0e
Adopt is/toHTMLInputElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118130

Reviewed by Antti Koivisto.

To enhance readability, this patch adopts is/toHTMLInputElement.
This also helps out to reduce duplicated use of static_cast.

Source/WebCore:

* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaTimeline::valueDescription):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isNativeImage):
(WebCore::AccessibilityNodeObject::isInputImage):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):
(WebCore::AccessibilityNodeObject::actionElement):
(WebCore::AccessibilityNodeObject::titleElementText):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
(WebCore::AccessibilityNodeObject::text):
(WebCore::AccessibilityNodeObject::colorValue):
(WebCore::accessibleNameForNode):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFileUploadButton):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::url):
(WebCore::AccessibilityRenderObject::setValue):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::element):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* bindings/js/JSHTMLInputElementCustom.cpp:
(WebCore::JSHTMLInputElement::selectionStart):
(WebCore::JSHTMLInputElement::setSelectionStart):
(WebCore::JSHTMLInputElement::selectionEnd):
(WebCore::JSHTMLInputElement::setSelectionEnd):
(WebCore::JSHTMLInputElement::selectionDirection):
(WebCore::JSHTMLInputElement::setSelectionDirection):
(WebCore::JSHTMLInputElement::setSelectionRange):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::isInPasswordField):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
(WebCore::toHTMLInputElement):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::mediaControlElementType):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* page/Chrome.cpp:
(WebCore::Chrome::setToolTip):
* page/EventHandler.cpp:
(WebCore::isSubmitImage):
(WebCore::EventHandler::handleMousePressEvent):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::RenderThemeQtMobile::paintSliderTrack):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
(WebCore::RenderButton::canHaveGeneratedChildren):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::isOpen):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::updateFromElement):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::uploadButton):
(WebCore::RenderFileUploadControl::fileTextValue):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateAltText):
* testing/Internals.cpp:
(WebCore::Internals::selectColorInColorChooser):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
* WebCoreSupport/CredentialTransformData.cpp:
(WebCore::CredentialTransformData::findPasswordFormFields):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::isPasswordElement):
(BlackBerry::WebKit::DOMSupport::inputElementText):
(BlackBerry::WebKit::DOMSupport::isDateTimeInputField):
(BlackBerry::WebKit::DOMSupport::isColorInputField):
(BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesNoAutocomplete):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::elementType):
(BlackBerry::WebKit::InputHandler::setInputValue):
(BlackBerry::WebKit::InputHandler::extractedTextRequest):
(BlackBerry::WebKit::InputHandler::showTextInputTypeSuggestionBox):

Source/WebKit/efl:

* ewk/ewk_view.cpp:
(ewk_view_input_method_state_set):

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(-[DOMHTMLInputElement _setAutofilled:]):
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedNodeChanged):
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::textFieldDidBeginEditing):
(WebEditorClient::textFieldDidEndEditing):
(WebEditorClient::textDidChangeInTextField):
(WebEditorClient::doTextFieldCommandFromEvent):
(WebEditorClient::textWillBeDeletedInTextField):
* WebView/WebHTMLRepresentation.mm:
(inputElementFromDOMElement):

Source/WebKit/qt:

* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::setInputMethodState):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::inputMethodQuery):

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMElement::createInstance):
* DOMHTMLClasses.cpp:
(DOMHTMLInputElement::form):
(DOMHTMLInputElement::disabled):
(DOMHTMLInputElement::readOnly):
(DOMHTMLInputElement::setType):
(DOMHTMLInputElement::value):
(DOMHTMLInputElement::setValue):
(DOMHTMLInputElement::setValueForUser):
(DOMHTMLInputElement::select):
(DOMHTMLInputElement::setSelectionStart):
(DOMHTMLInputElement::selectionStart):
(DOMHTMLInputElement::setSelectionEnd):
(DOMHTMLInputElement::selectionEnd):
(DOMHTMLInputElement::isTextField):
(DOMHTMLInputElement::rectOnScreen):
(DOMHTMLInputElement::replaceCharactersInRange):
(DOMHTMLInputElement::selectedRange):
(DOMHTMLInputElement::setAutofilled):
(DOMHTMLInputElement::isAutofilled):
(DOMHTMLInputElement::isUserEdited):
* WebFrame.cpp:
(inputElementFromDOMElement):

Source/WebKit2:

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::createAnnotationElement):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedNodeChanged):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormControls):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
58 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityMediaControls.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilitySlider.cpp
Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm
Source/WebCore/bindings/js/JSHTMLInputElementCustom.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/loader/FormSubmission.cpp
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/platform/gtk/PasteboardGtk.cpp
Source/WebCore/platform/qt/RenderThemeQt.cpp
Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderDetailsMarker.cpp
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp
Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DOM/WebDOMOperations.mm
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMCoreClasses.cpp
Source/WebKit/win/DOMHTMLClasses.cpp
Source/WebKit/win/WebFrame.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp