Index: trunk/Source/core/dom/Node.h |
=================================================================== |
--- trunk/Source/core/dom/Node.h (revision 162247) |
+++ trunk/Source/core/dom/Node.h (working copy) |
@@ -916,6 +916,16 @@ |
return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyleRecalc(); |
} |
+inline bool isTreeScopeRoot(const Node* node) |
+{ |
+ return !node || node->isDocumentNode() || node->isShadowRoot(); |
+} |
+ |
+inline bool isTreeScopeRoot(const Node& node) |
+{ |
+ return node.isDocumentNode() || node.isShadowRoot(); |
+} |
+ |
// Allow equality comparisons of Nodes by reference or pointer, interchangeably. |
inline bool operator==(const Node& a, const Node& b) { return &a == &b; } |
inline bool operator==(const Node& a, const Node* b) { return &a == b; } |