Use is<>() / downcast<>() for Element
[WebKit-https.git] / Source / WebCore / css / StyleResolver.cpp
index db4a4b1..078a5ca 100644 (file)
@@ -467,7 +467,7 @@ Node* StyleResolver::locateCousinList(Element* parent, unsigned& visitedNodeCoun
         while (currentNode) {
             ++subcount;
             if (currentNode->renderStyle() == parentStyle && currentNode->lastChild()
-                && currentNode->isElementNode() && !parentElementPreventsSharing(toElement(currentNode))
+                && is<Element>(currentNode) && !parentElementPreventsSharing(downcast<Element>(currentNode))
                 ) {
                 // Adjust for unused reserved tries.
                 visitedNodeCount -= cStyleSearchThreshold - subcount;