| Index: Source/core/dom/shadow/ComposedTreeTraversal.h
|
| diff --git a/Source/core/dom/shadow/ComposedTreeTraversal.h b/Source/core/dom/shadow/ComposedTreeTraversal.h
|
| index ed4a9ad06a59c00fb3b1bf9e45133c252c081670..e75780cd848a7acaa2ccb81234ba74864601b929 100644
|
| --- a/Source/core/dom/shadow/ComposedTreeTraversal.h
|
| +++ b/Source/core/dom/shadow/ComposedTreeTraversal.h
|
| @@ -84,6 +84,13 @@ public:
|
| // false. If |other| is |node|, this function returns false.
|
| static bool isDescendantOf(const Node& /*node*/, const Node& other);
|
|
|
| + static bool contains(const ContainerNode& container, const Node& node)
|
| + {
|
| + assertPrecondition(container);
|
| + assertPrecondition(node);
|
| + return container == node || isDescendantOf(node, container);
|
| + }
|
| +
|
| // Returns a common ancestor of |nodeA| and |nodeB| if exists, otherwise
|
| // returns |nullptr|.
|
| static Node* commonAncestor(const Node& nodeA, const Node& nodeB);
|
|
|