Index: Source/core/dom/shadow/ShadowRoot.h |
diff --git a/Source/core/dom/shadow/ShadowRoot.h b/Source/core/dom/shadow/ShadowRoot.h |
index 738c7bebc2b8d443ebc7427b388e148621690201..df0b5186c308974e025cf4ffc724ccedeb9959da 100644 |
--- a/Source/core/dom/shadow/ShadowRoot.h |
+++ b/Source/core/dom/shadow/ShadowRoot.h |
@@ -166,6 +166,12 @@ inline ShadowRoot* toShadowRoot(Node* node) |
return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const Node*>(node))); |
} |
+inline ShadowRoot& toShadowRoot(Node& node) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(node.isShadowRoot()); |
+ return static_cast<ShadowRoot&>(node); |
+} |
+ |
inline const ShadowRoot& toShadowRoot(const Node& node) |
{ |
ASSERT_WITH_SECURITY_IMPLICATION(node.isShadowRoot()); |