Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ContainerNode.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index bfa2f957134104d4f3a4c2938b652eb75623b341..1cefbd5b634c66d41e044f9e31e479ec5bf7e893 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -231,7 +231,7 @@ Node* ContainerNode::insertBefore(Node* newChild, Node* refChild, ExceptionState
EventDispatchForbiddenScope assertNoEventDispatch;
ScriptForbiddenScope forbidScript;
- treeScope().adoptIfNeeded(child);
+ treeScopeOrDocument().adoptIfNeeded(child);
insertBeforeCommon(*next, child);
}
@@ -321,7 +321,7 @@ void ContainerNode::parserInsertBefore(Node* newChild, Node& nextChild)
EventDispatchForbiddenScope assertNoEventDispatch;
ScriptForbiddenScope forbidScript;
- treeScope().adoptIfNeeded(*newChild);
+ treeScopeOrDocument().adoptIfNeeded(*newChild);
insertBeforeCommon(nextChild, *newChild);
DCHECK_EQ(newChild->connectedSubframeCount(), 0u);
ChildListMutationScope(*this).childAdded(*newChild);
@@ -408,7 +408,7 @@ Node* ContainerNode::replaceChild(Node* newChild, Node* oldChild, ExceptionState
if (child.parentNode())
break;
- treeScope().adoptIfNeeded(child);
+ treeScopeOrDocument().adoptIfNeeded(child);
// Add child before "next".
{
@@ -757,7 +757,7 @@ Node* ContainerNode::appendChild(Node* newChild, ExceptionState& exceptionState)
EventDispatchForbiddenScope assertNoEventDispatch;
ScriptForbiddenScope forbidScript;
- treeScope().adoptIfNeeded(child);
+ treeScopeOrDocument().adoptIfNeeded(child);
appendChildCommon(child);
}
@@ -790,7 +790,7 @@ void ContainerNode::parserAppendChild(Node* newChild)
EventDispatchForbiddenScope assertNoEventDispatch;
ScriptForbiddenScope forbidScript;
- treeScope().adoptIfNeeded(*newChild);
+ treeScopeOrDocument().adoptIfNeeded(*newChild);
appendChildCommon(*newChild);
DCHECK_EQ(newChild->connectedSubframeCount(), 0u);
ChildListMutationScope(*this).childAdded(*newChild);
@@ -1466,7 +1466,7 @@ Element* ContainerNode::getElementById(const AtomicString& id) const
if (isInTreeScope()) {
// Fast path if we are in a tree scope: call getElementById() on tree scope
// and check if the matching element is in our subtree.
- Element* element = treeScope().getElementById(id);
+ Element* element = treeScopeOrDocument().getElementById(id);
if (!element)
return nullptr;
if (element->isDescendantOf(this))
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698