Bug 118007 - Introduce toHTMLFormControlElement and use it
Summary: Introduce toHTMLFormControlElement and use it
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-06-25 19:17 PDT by Ryosuke Niwa
Modified: 2019-08-16 17:40 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 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.
Comment 1 Ryosuke Niwa 2019-08-16 17:40:05 PDT
We have downcast<HTMLFormControlElement> now.