Index: Source/core/html/HTMLFormControlElement.h |
diff --git a/Source/core/html/HTMLFormControlElement.h b/Source/core/html/HTMLFormControlElement.h |
index d9a64f53c67d2c447f816266bf602e2dab8e4ed4..2189f95a3b09a0f20cc1b7e36d3bdd9a14729aaa 100644 |
--- a/Source/core/html/HTMLFormControlElement.h |
+++ b/Source/core/html/HTMLFormControlElement.h |
@@ -182,6 +182,12 @@ inline HTMLFormControlElement* toHTMLFormControlElement(FormAssociatedElement* c |
return static_cast<HTMLFormControlElement*>(control); |
} |
+inline const HTMLFormControlElement* toHTMLFormControlElement(const FormAssociatedElement* control) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!control || control->isFormControlElement()); |
+ return static_cast<const HTMLFormControlElement*>(control); |
+} |
+ |
} // namespace |
#endif |