Title: [103701] trunk/Source/WebCore
- Revision
- 103701
- Author
- [email protected]
- Date
- 2011-12-26 23:12:57 -0800 (Mon, 26 Dec 2011)
Log Message
[Refactoring] Node::setTreeScopeRecursively() doesn't need includeRoot parameter
https://bugs.webkit.org/show_bug.cgi?id=75240
Reviewed by Anders Carlsson.
No new tests. No behavior change.
* dom/Node.cpp:
(WebCore::Node::setTreeScopeRecursively):
* dom/Node.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (103700 => 103701)
--- trunk/Source/WebCore/ChangeLog 2011-12-27 06:27:03 UTC (rev 103700)
+++ trunk/Source/WebCore/ChangeLog 2011-12-27 07:12:57 UTC (rev 103701)
@@ -1,3 +1,16 @@
+2011-12-26 Hajime Morrita <[email protected]>
+
+ [Refactoring] Node::setTreeScopeRecursively() doesn't need includeRoot parameter
+ https://bugs.webkit.org/show_bug.cgi?id=75240
+
+ Reviewed by Anders Carlsson.
+
+ No new tests. No behavior change.
+
+ * dom/Node.cpp:
+ (WebCore::Node::setTreeScopeRecursively):
+ * dom/Node.h:
+
2011-12-26 Darin Adler <[email protected]>
Use OwnPtr and OwnArrayPtr in a couple more places
Modified: trunk/Source/WebCore/dom/Node.cpp (103700 => 103701)
--- trunk/Source/WebCore/dom/Node.cpp 2011-12-27 06:27:03 UTC (rev 103700)
+++ trunk/Source/WebCore/dom/Node.cpp 2011-12-27 07:12:57 UTC (rev 103701)
@@ -459,10 +459,10 @@
return scope ? scope : m_document;
}
-void Node::setTreeScopeRecursively(TreeScope* newTreeScope, bool includeRoot)
+void Node::setTreeScopeRecursively(TreeScope* newTreeScope)
{
ASSERT(this);
- ASSERT(!includeRoot || !isDocumentNode());
+ ASSERT(!isDocumentNode());
ASSERT(newTreeScope);
ASSERT(!m_deletionHasBegun);
@@ -479,7 +479,7 @@
if (currentDocument && currentDocument != newDocument)
currentDocument->incDOMTreeVersion();
- for (Node* node = includeRoot ? this : traverseNextNode(this); node; node = node->traverseNextNode(this)) {
+ for (Node* node = this; node; node = node->traverseNextNode(this)) {
if (newTreeScope == newDocument) {
if (node->hasRareData())
node->rareData()->setTreeScope(0);
Modified: trunk/Source/WebCore/dom/Node.h (103700 => 103701)
--- trunk/Source/WebCore/dom/Node.h 2011-12-27 06:27:03 UTC (rev 103700)
+++ trunk/Source/WebCore/dom/Node.h 2011-12-27 07:12:57 UTC (rev 103701)
@@ -384,7 +384,7 @@
TreeScope* treeScope() const;
// Used by the basic DOM methods (e.g., appendChild()).
- void setTreeScopeRecursively(TreeScope*, bool includeRoot = true);
+ void setTreeScopeRecursively(TreeScope*);
// Returns true if this node is associated with a document and is in its associated document's
// node tree, false otherwise.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes