Bug 118007

Summary: Introduce toHTMLFormControlElement and use it
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: jonlee, kling, koivisto, ruthiecftg, tkent
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Ryosuke Niwa
Reported 2013-06-25 19:17:52 PDT
https://chromium.googlesource.com/chromium/blink/+/6808b29390234652e9a3b30fe2bba67b83247134 Note for 'alias'-related changes in HTMLFormElement: We had unnecessary cast from Node to HTMLFormControlElement. m_elementAliases can contain HTMLImageElement and HTMLObjectElement in addition to HTMLFormControlElement. A node was cast to HTMLFormControlElement wrongly, but it was harmless because nodes stored in m_elementAliases are used as Node*. Note for the HTMLSelectElement.h change: HTMLKeyGenElement::reset() wants to call HTMLSelectElement::reset(), and it was realized by a cast to HTMLFormControlElement, of which reset() is public. Replacing the cast to toHTMLFormControlElement doesn't work because both of toHTMLFormControlElement(Node*) and toHTMLFormControlElement(FormAssociatedElement*) match to an HTMLSelectElement argument. The public reset() makes the code simpler.
Attachments
Ryosuke Niwa
Comment 1 2019-08-16 17:40:05 PDT
We have downcast<HTMLFormControlElement> now.
Note You need to log in before you can comment on or make changes to this bug.