| 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 a7f51f704a679c10db793f474762e3b0348a759a..b2f45dc684c49b8f8f7ffaf3e9fdb02c00e89bcd 100644
|
| --- a/third_party/WebKit/Source/core/dom/Node.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Node.cpp
|
| @@ -635,6 +635,25 @@ Node& Node::shadowIncludingRoot() const
|
| return *root;
|
| }
|
|
|
| +bool Node::isUnclosedNodeOf(const Node& other) const
|
| +{
|
| + if (!isInShadowTree() || treeScope() == other.treeScope())
|
| + return true;
|
| +
|
| + const TreeScope* scope = &treeScope();
|
| + for (; scope->parentTreeScope(); scope = scope->parentTreeScope()) {
|
| + const ContainerNode& root = scope->rootNode();
|
| + if (root.isShadowRoot() && !toShadowRoot(root).isOpenOrV0())
|
| + break;
|
| + }
|
| +
|
| + for (TreeScope* otherScope = &other.treeScope(); otherScope; otherScope = otherScope->parentTreeScope()) {
|
| + if (otherScope == scope)
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| bool Node::needsDistributionRecalc() const
|
| {
|
| return shadowIncludingRoot().childNeedsDistributionRecalc();
|
|
|