Use is<>() / downcast<>() for Element
[WebKit-https.git] / Source / WebCore / bindings / gobject / WebKitDOMPrivate.cpp
index e6c9504..08c5f02 100644 (file)
@@ -86,7 +86,7 @@ WebKitDOMNode* wrap(Node* node)
     case Node::ELEMENT_NODE:
         if (is<HTMLElement>(node))
             return WEBKIT_DOM_NODE(wrap(downcast<HTMLElement>(node)));
-        return WEBKIT_DOM_NODE(wrapElement(toElement(node)));
+        return WEBKIT_DOM_NODE(wrapElement(downcast<Element>(node)));
     case Node::ATTRIBUTE_NODE:
         return WEBKIT_DOM_NODE(wrapAttr(static_cast<Attr*>(node)));
     case Node::TEXT_NODE: