Introduce toHTMLFormControlElement, and use it.

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.

BUG=none
TEST=none; no behavior changes.

Review URL: https://chromiumcodereview.appspot.com/17381010

git-svn-id: svn://svn.chromium.org/blink/trunk@152706 bbb929c8-8fbe-4397-9dbb-9b2b20218538
16 files changed