2011-02-09  Yael Aharon  <yael.aharon@nokia.com>

        Reviewed by Darin Adler.

        Replace static_cast<HTMLElement*> with toHTMLElement
        https://bugs.webkit.org/show_bug.cgi?id=54117

        No new tests since no new functionality was introduced.

        * accessibility/AccessibilityListBox.cpp:
        (WebCore::AccessibilityListBox::addChildren):
        * accessibility/AccessibilityMenuListPopup.cpp:
        (WebCore::AccessibilityMenuListPopup::addChildren):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::accessibleNameForNode):
        (WebCore::AccessibilityRenderObject::accessibilityDescription):
        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
        (webkit_accessible_get_name):
        (webkit_accessible_get_description):
        * bindings/gobject/WebKitDOMBinding.cpp:
        (WebKit::createWrapper):
        (WebKit::kit):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSHTMLFrameSetElementCustom.cpp:
        (WebCore::JSHTMLFrameSetElement::nameGetter):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * bindings/v8/custom/V8ElementCustom.cpp:
        (WebCore::toV8):
        * dom/Document.cpp:
        (WebCore::Document::body):
        * dom/Element.cpp:
        (WebCore::Element::deprecatedCreateContextualFragment):
        * dom/Range.cpp:
        (WebCore::Range::createContextualFragment):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle):
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
        (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
        (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
        (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
        (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
        (WebCore::ApplyStyleCommand::removeInlineStyle):
        (WebCore::ApplyStyleCommand::shouldSplitTextElement):
        (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
        * editing/DeleteButtonController.cpp:
        (WebCore::enclosingDeletableElement):
        (WebCore::DeleteButtonController::show):
        * editing/Editor.cpp:
        (WebCore::Editor::setBaseWritingDirection):
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::mergeWithNeighboringLists):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
        (WebCore::ReplaceSelectionCommand::handleStyleSpans):
        (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
        * editing/SelectionController.cpp:
        (WebCore::scanForForm):
        (WebCore::SelectionController::currentForm):
        * editing/htmlediting.cpp:
        (WebCore::enclosingList):
        (WebCore::enclosingListChild):
        (WebCore::embeddedSublist):
        (WebCore::appendedSublist):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::appendElement):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::checkForNameMatch):
        (WebCore::HTMLCollection::updateNameCache):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::setOuterHTML):
        (WebCore::HTMLElement::shadowAncestorOwnerForm):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formElementIndex):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::setOption):
        (WebCore::HTMLSelectElement::setLength):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::getOuterHTML):
        (WebCore::InspectorDOMAgent::setOuterHTML):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseMoveEvent):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::createPart):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::createSubtreeIfNeeded):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/html/HTMLCollection.cpp b/Source/WebCore/html/HTMLCollection.cpp
index 87e1d8b..6d64f5c 100644
--- a/Source/WebCore/html/HTMLCollection.cpp
+++ b/Source/WebCore/html/HTMLCollection.cpp
@@ -264,7 +264,7 @@
     if (!element->isHTMLElement())
         return false;
     
-    HTMLElement* e = static_cast<HTMLElement*>(element);
+    HTMLElement* e = toHTMLElement(element);
     if (!checkName)
         return e->getIdAttribute() == name;
 
@@ -318,7 +318,7 @@
     for (Element* element = itemAfter(0); element; element = itemAfter(element)) {
         if (!element->isHTMLElement())
             continue;
-        HTMLElement* e = static_cast<HTMLElement*>(element);
+        HTMLElement* e = toHTMLElement(element);
         const AtomicString& idAttrVal = e->getIdAttribute();
         const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
         if (!idAttrVal.isEmpty()) {