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

Unified Diff: Source/core/dom/Element.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/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 87bfbafc953d3d5d3598181af30e6ac662893794..e684735f7f2dd4ece71cc6d3bfd551b17d6890b3 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -801,6 +801,12 @@ inline const Element* toElement(const Node* node)
return static_cast<const Element*>(node);
}
+inline const Element& toElement(const Node& node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(node.isElementNode());
+ return static_cast<const Element&>(node);
+}
+
// This will catch anyone doing an unnecessary cast.
void toElement(const Element*);
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698