Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 0e3d2cb0e0128ad9d41ed42a2eb9dfc42a453c71..1d62f6a3bd5c6240506f11f6ab2dea17170c3ffe 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -910,7 +910,7 @@ bool Node::isDescendantOf(const Node *other) const |
// Return true if other is an ancestor of this, otherwise false |
if (!other || !other->hasChildNodes() || inDocument() != other->inDocument()) |
return false; |
- if (&other->treeScope() != &treeScope()) |
+ if (other->treeScope() != treeScope()) |
return false; |
if (other->isTreeScope()) |
return !isTreeScope(); |
@@ -948,7 +948,7 @@ bool Node::containsIncludingShadowDOM(const Node* node) const |
return false; |
for (; node; node = node->shadowHost()) { |
- if (&treeScope() == &node->treeScope()) |
+ if (treeScope() == node->treeScope()) |
return contains(node); |
} |
@@ -1159,7 +1159,7 @@ Node* Node::deprecatedShadowAncestorNode() const |
ShadowRoot* Node::containingShadowRoot() const |
{ |
- Node* root = treeScope().rootNode(); |
+ Node* root = treeScope()->rootNode(); |
return root && root->isShadowRoot() ? toShadowRoot(root) : 0; |
} |
@@ -1707,7 +1707,7 @@ unsigned short Node::compareDocumentPositionInternal(const Node* otherNode, Shad |
// If one node is in the document and the other is not, we must be disconnected. |
// If the nodes have different owning documents, they must be disconnected. Note that we avoid |
// comparing Attr nodes here, since they return false from inDocument() all the time (which seems like a bug). |
- if (start1->inDocument() != start2->inDocument() || (treatment == TreatShadowTreesAsDisconnected && &start1->treeScope() != &start2->treeScope())) { |
+ if (start1->inDocument() != start2->inDocument() || (treatment == TreatShadowTreesAsDisconnected && start1->treeScope() != start2->treeScope())) { |
unsigned short direction = (this > otherNode) ? DOCUMENT_POSITION_PRECEDING : DOCUMENT_POSITION_FOLLOWING; |
return DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | direction; |
} |
@@ -1728,7 +1728,7 @@ unsigned short Node::compareDocumentPositionInternal(const Node* otherNode, Shad |
return DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | direction; |
} |
- unsigned connection = &start1->treeScope() != &start2->treeScope() ? DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC : 0; |
+ unsigned connection = start1->treeScope() != start2->treeScope() ? DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC : 0; |
// Walk the two chains backwards and look for the first difference. |
for (unsigned i = min(index1, index2); i; --i) { |
@@ -2507,7 +2507,7 @@ void Node::removedLastRef() |
// faster for non-Document nodes, and because the call to removedLastRef that is inlined |
// at all deref call sites is smaller if it's a non-virtual function. |
if (isTreeScope()) { |
- treeScope().removedLastRefToScope(); |
+ treeScope()->removedLastRefToScope(); |
return; |
} |