Index: Source/core/html/HTMLFormControlElement.h |
diff --git a/Source/core/html/HTMLFormControlElement.h b/Source/core/html/HTMLFormControlElement.h |
index 27f8656b90e9bb5d445d37a02cb66344e402dba1..afdafdeb1f6d53062ab552dceb3f515488f203d0 100644 |
--- a/Source/core/html/HTMLFormControlElement.h |
+++ b/Source/core/html/HTMLFormControlElement.h |
@@ -171,6 +171,18 @@ private: |
bool m_hasAutofocused : 1; |
}; |
+inline HTMLFormControlElement* toHTMLFormControlElement(Node* node) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || (node->isElementNode() && toElement(node)->isFormControlElement())); |
+ return static_cast<HTMLFormControlElement*>(node); |
+} |
+ |
+inline HTMLFormControlElement* toHTMLFormControlElement(FormAssociatedElement* control) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!control || control->isFormControlElement()); |
+ return static_cast<HTMLFormControlElement*>(control); |
+} |
+ |
} // namespace |
#endif |