Bug 118007
| Summary: | Introduce toHTMLFormControlElement and use it | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | Forms | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
We have downcast<HTMLFormControlElement> now.