| 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*);
|
|
|
|
|