Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: Source/core/dom/shadow/ShadowRoot.h

Issue 23567016: Have ScopedStyleResolver deal with ContainerNode references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/ShadowRoot.h
diff --git a/Source/core/dom/shadow/ShadowRoot.h b/Source/core/dom/shadow/ShadowRoot.h
index c70c0e26e060cb98ab56323c864a16f3ecb933b0..1ad8bf110816836edd644b3ed5d1d0f9b5009ff7 100644
--- a/Source/core/dom/shadow/ShadowRoot.h
+++ b/Source/core/dom/shadow/ShadowRoot.h
@@ -161,6 +161,12 @@ inline ShadowRoot* toShadowRoot(Node* node)
return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const Node*>(node)));
}
+inline const ShadowRoot& toShadowRoot(const Node& node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(node.isShadowRoot());
+ return static_cast<const ShadowRoot&>(node);
+}
+
inline const ShadowRoot* toShadowRoot(const TreeScope* treeScope)
{
ASSERT_WITH_SECURITY_IMPLICATION(!treeScope || (treeScope->rootNode() && treeScope->rootNode()->isShadowRoot()));
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698