Replace static_casts with to* helper functions.
authorinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 22:21:28 +0000 (22:21 +0000)
committerinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 22:21:28 +0000 (22:21 +0000)
commit3026e8b0dab8346ca4f7cd44b3729775673cc6e0
tree3195a91d4b2bf7e8bb614ce33bd10045bd706781
parentc1b80d89adfd07d756d3fda8720dcf81518f41aa
Replace static_casts with to* helper functions.
https://bugs.webkit.org/show_bug.cgi?id=112164

Reviewed by Philip Rogers.

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

Source/WebCore:

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
(WebCore::Pasteboard::writeImage):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::getMediaElementFromRenderObject):
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::RenderThemeQtMobile::checkMultiple):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::title):
(WebCore::HitTestResult::absoluteImageURL):
(WebCore::HitTestResult::absolutePDFURL):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::hitTest):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::valueChanged):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addPDFURLRect):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::requiresAcceleratedCompositing):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::checkRegionStyle):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computePreferredLogicalWidths):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isEnabled):
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
(WebCore::RenderTheme::isHovered):
(WebCore::RenderTheme::isSpinUpButtonPartHovered):
(WebCore::RenderTheme::paintSliderTicks):
* rendering/RenderThemeWinCE.cpp:
(WebCore::mediaElementParent):
* rendering/RenderTreeAsText.cpp:
(WebCore::isEmptyOrUnstyledAppleStyleSpan):
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeRenderRegionList):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):

Source/WebKit/win:

* DOMHTMLClasses.cpp:
(DOMHTMLElement::idName):
(DOMHTMLElement::innerText):
(DOMHTMLElement::setInnerText):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/ElementRuleCollector.cpp
Source/WebCore/platform/gtk/PasteboardGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderPart.cpp
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderThemeWinCE.cpp
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMHTMLClasses.cpp