Index: Source/core/dom/Element.h |
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h |
index 530c3abea4b1d0cd572573266ae7736743f01af7..a2324f3fc07fbc4a9332287bc85c4391a1053a17 100644 |
--- a/Source/core/dom/Element.h |
+++ b/Source/core/dom/Element.h |
@@ -842,6 +842,14 @@ inline bool isShadowHost(const Element* element) |
return element && element->shadow(); |
} |
+inline bool isAtShadowBoundary(const Element* element) |
+{ |
+ if (!element) |
+ return false; |
+ ContainerNode* parentNode = element->parentNode(); |
+ return parentNode && parentNode->isShadowRoot(); |
+} |
+ |
// These macros do the same as their NODE equivalents but additionally provide a template specialization |
// for isElementOfType<>() so that the Traversal<> API works for these Element types. |
#define DEFINE_ELEMENT_TYPE_CASTS(thisType, predicate) \ |