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: http://svn.webkit.org/repository/webkit/trunk@145596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled Chromium DEPS to r187660.  Requested by
"Adam Barth" <abarth@webkit.org> via sheriffbot.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-12

* DEPS:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace static_casts for SVG transformable and locatable elements
https://bugs.webkit.org/show_bug.cgi?id=111651

Reviewed by Abhishek Arya.

toSVGStyledTransformableElement and toSVGStyledLocatableElement are preferred over
static_casts because bad casts can be caught on our testing infrastructure. This patch
replaces all static_casts for SVGStyledTransformableElement and SVGStyledLocatableElement
with toSVGStyledTransformableElement and toSVGStyledLocatableElement, respectively.

No new tests as this is covered with existing tests.

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::updateShapeFromElement):
(WebCore::RenderSVGShape::layout):
(WebCore::RenderSVGShape::nonScalingStrokeTransform):
(WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* svg/SVGAnimatedLength.cpp:
(WebCore::SVGAnimatedLengthAnimator::calculateDistance):

    This was an unnecessary cast and has been removed.

* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGStyledLocatableElement.h:
(WebCore):
(WebCore::toSVGStyledLocatableElement):
* svg/SVGStyledTransformableElement.h:
(WebCore):
(WebCore::toSVGStyledTransformableElement):

    It makes the code cleaner to pass Node* in here, rather than converting the Node*
    to an SVGElement* before calling this function. The same was not necessary for
    SVGStyledLocatable.

* svg/SVGSVGElement.h:
(WebCore):
(WebCore::toSVGSVGElement):

    This code has been cleaned up. During the review of this patch, a similar cleanup
    was done in toSVGStyledTransformableElement.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::toClipPath):


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