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

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

Issue 1868433002: Rename function names to match the DOM Standard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index cfabb0f2f5256b758ea29e5b0619b660c05c840f..b1503e728a45d3b962953ca5e1223aaa61658fdf 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -616,11 +616,11 @@ inline static ShadowRoot* oldestShadowRootFor(const Node* node)
}
#endif
-inline static Node& rootInComposedTree(const Node& node)
+Node& Node::shadowIncludingRoot() const
{
- if (node.inDocument())
- return node.document();
- Node* root = const_cast<Node*>(&node);
+ if (inDocument())
+ return document();
+ Node* root = const_cast<Node*>(this);
while (Node* host = root->shadowHost())
root = host;
while (Node* ancestor = root->parentNode())
@@ -632,7 +632,7 @@ inline static Node& rootInComposedTree(const Node& node)
#if ENABLE(ASSERT)
bool Node::needsDistributionRecalc() const
{
- return rootInComposedTree(*this).childNeedsDistributionRecalc();
+ return shadowIncludingRoot().childNeedsDistributionRecalc();
}
#endif
@@ -643,7 +643,7 @@ void Node::updateDistribution()
return;
TRACE_EVENT0("blink", "Node::updateDistribution");
ScriptForbiddenScope forbidScript;
- Node& root = rootInComposedTree(*this);
+ Node& root = shadowIncludingRoot();
if (root.childNeedsDistributionRecalc())
root.recalcDistribution();
}
@@ -816,7 +816,7 @@ bool Node::contains(const Node* node) const
return this == node || node->isDescendantOf(this);
}
-bool Node::containsIncludingShadowDOM(const Node* node) const
+bool Node::isShadowIncludingInclusiveAncestorOf(const Node* node) const
{
if (!node)
return false;

Powered by Google App Engine
This is Rietveld 408576698