To detect bad type casts, it would be good to use toHTMLFormElement() instead of using manual type cast. Additionally, FORM_ASSOCIATED_ELEMENT_TYPE_CASTS is introduced newly to do it.
Created attachment 220134 [details] Patch
Comment on attachment 220134 [details] Patch Clearing flags on attachment: 220134 Committed r161166: <http://trac.webkit.org/changeset/161166>
All reviewed patches have been landed. Closing bug.