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

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

Issue 23851003: Have StyleSheetCollections constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Have StyleSheetCollection constructor take a Document reference as well Created 7 years, 4 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/StyleSheetCollections.cpp ('k') | no next file » | 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 018f8e854d40cee992362ed5f5014bd69f1ca113..c70c0e26e060cb98ab56323c864a16f3ecb933b0 100644
--- a/Source/core/dom/shadow/ShadowRoot.h
+++ b/Source/core/dom/shadow/ShadowRoot.h
@@ -172,6 +172,12 @@ inline ShadowRoot* toShadowRoot(TreeScope* treeScope)
return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const TreeScope*>(treeScope)));
}
+inline ShadowRoot& toShadowRoot(TreeScope& treeScope)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(treeScope.rootNode() && treeScope.rootNode()->isShadowRoot());
+ return static_cast<ShadowRoot&>(treeScope);
+}
+
} // namespace
#endif
« no previous file with comments | « Source/core/dom/StyleSheetCollections.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698