Changeset 136198 in webkit
- Timestamp:
- Nov 29, 2012, 7:26:09 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dom/Node.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r136197 r136198 1 2012-11-29 Elliott Sprehn <esprehn@chromium.org> 2 3 Node::isDescendantOf contains logic that duplicates isDocumentNode 4 https://bugs.webkit.org/show_bug.cgi?id=103698 5 6 Reviewed by Hajime Morita. 7 8 Instead of checking for documents with node->document() == node just 9 use node->isDocumentNode(). 10 11 * dom/Node.cpp: 12 (WebCore::Node::isDescendantOf): 13 1 14 2012-11-29 Alexey Proskuryakov <ap@apple.com> 2 15 -
trunk/Source/WebCore/dom/Node.cpp
r136087 r136198 1158 1158 if (!other || !other->hasChildNodes() || inDocument() != other->inDocument()) 1159 1159 return false; 1160 if (other == other->document())1161 return document() == other && this != document() && inDocument();1160 if (other->isDocumentNode()) 1161 return document() == other && !isDocumentNode() && inDocument(); 1162 1162 for (const ContainerNode* n = parentNode(); n; n = n->parentNode()) { 1163 1163 if (n == other)
Note:
See TracChangeset
for help on using the changeset viewer.