Replace static_casts with to* functions.
authorinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 01:59:09 +0000 (01:59 +0000)
committerinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 01:59:09 +0000 (01:59 +0000)
commit18e4abdd0295f7254062aecaa7f85f1b670c2064
tree13386e235d5f51dacba3d2b3846353627bb85866
parent244a7e2154e1dcf1b012492ba96707ca882d714b
Replace static_casts with to* functions.
https://bugs.webkit.org/show_bug.cgi?id=112072

Reviewed by Philip Rogers.

to* functions are preferred over static_cast calls since they
help to catch bad casts easily on the testing infrastructure.

Source/WebCore:

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::canSetFocusAttribute):
* bindings/objc/DOM.mm:
(kitClass):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* editing/ApplyStyleCommand.cpp:
(WebCore::isLegacyAppleStyleSpan):
(WebCore::isEmptyFontTag):
(WebCore::ApplyStyleCommand::applyBlockStyle):
* editing/FormatBlockCommand.cpp:
(WebCore::isElementForFormatBlock):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isMailPasteAsQuotationNode):
(WebCore::haveSameTagName):
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::suggestions):
* html/HTMLTableRowsCollection.cpp:
(WebCore::isInHead):
(WebCore::isInBody):
(WebCore::isInFoot):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::innerPatchNode):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
* plugins/PluginView.cpp:
(WebCore::PluginView::getValue):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::name):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::mediaElement):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::autosaveName):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textFormControlElement):
(WebCore::updateUserModifyProperty):
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::updateFromElement):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::endElementNs):

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::focusedNodeChanged):
* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/DOMUtilitiesPrivate.cpp:
(WebCore::toHTMLElement):
* src/WebSearchableFormData.cpp:
(HTMLNames::IsSelectInDefaultState):

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _enterFullscreenForNode:WebCore::]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/bindings/objc/DOM.mm
Source/WebCore/bindings/v8/V8LazyEventListener.cpp
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/FormatBlockCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/history/CachedPage.cpp
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/HTMLTableRowsCollection.cpp
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/plugins/PluginView.cpp
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderMedia.cpp
Source/WebCore/rendering/RenderSearchField.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp
Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
Source/WebKit/chromium/src/DOMUtilitiesPrivate.cpp
Source/WebKit/chromium/src/WebSearchableFormData.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm