Index: Source/core/inspector/InspectorDOMAgent.cpp |
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp |
index 765a44fd6bb9116a21573741822a2c22fc1cb6bb..f1be89c6e9ea5082f0d1f39548fc88f4e19cd9d3 100644 |
--- a/Source/core/inspector/InspectorDOMAgent.cpp |
+++ b/Source/core/inspector/InspectorDOMAgent.cpp |
@@ -416,7 +416,7 @@ Element* InspectorDOMAgent::assertElement(ErrorString* errorString, int nodeId) |
if (!node) |
return 0; |
- if (node->nodeType() != Node::ELEMENT_NODE) { |
+ if (!node->isElementNode()) { |
*errorString = "Node is not an Element"; |
return 0; |
} |
@@ -519,7 +519,7 @@ void InspectorDOMAgent::getDocument(ErrorString* errorString, RefPtr<TypeBuilder |
void InspectorDOMAgent::pushChildNodesToFrontend(int nodeId, int depth) |
{ |
Node* node = nodeForId(nodeId); |
- if (!node || (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCUMENT_NODE && node->nodeType() != Node::DOCUMENT_FRAGMENT_NODE)) |
+ if (!node || (!node->isElementNode() && !node->isDocumentNode() && !node->isDocumentFragment())) |
return; |
NodeToIdMap* nodeMap = m_idToNodesMap.get(nodeId); |
@@ -1109,7 +1109,7 @@ void InspectorDOMAgent::inspect(Node* inspectedNode) |
return; |
Node* node = inspectedNode; |
- while (node && node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCUMENT_NODE && node->nodeType() != Node::DOCUMENT_FRAGMENT_NODE) |
+ while (node && !node->isElementNode() && !node->isDocumentNode() && !node->isDocumentFragment()) |
node = node->parentOrShadowHostNode(); |
if (!node) |