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

Unified Diff: Source/core/html/HTMLFormControlElement.h

Issue 23680013: Add const versions of some toHTMLFooElement(). (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/html/FormAssociatedElement.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/html/FormAssociatedElement.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698