[Webkit-unassigned] [Bug 48821] Let HTMLObjectElement be a form associated element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 5 21:37:26 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=48821


Kent Tamura <tkent at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #75593|review?                     |review-
               Flag|                            |




--- Comment #28 from Kent Tamura <tkent at chromium.org>  2010-12-05 21:37:25 PST ---
(From update of attachment 75593)
View in context: https://bugs.webkit.org/attachment.cgi?id=75593&action=review

Looks almost ok.  r- for minor issues and patch conflict.

We should address the FIXME in HTMLObjectElement::appendFormData(), and adding validation properties of HTMLObjectElement.idl later.

> WebCore/html/FormAssociatedElement.cpp:55
> +static HTMLFormElement* findFormOwner(HTMLElement* element)

This function is very similar to HTMLElement::findFormAncestor().  We had better unify them, or should name this findFormAncestor() too.

> WebCore/html/HTMLFormCollection.cpp:116
> +        if (associatedElement->isEnumeratable()
> +            && element->getAttribute(attrName) == name) {

You don't need to wrap the line.

> WebCore/html/HTMLFormControlElement.h:58
> +    virtual void setDisabled(bool);

Do we need to add "virtual"?

> WebCore/html/HTMLFormElement.cpp:221
>      for (unsigned i = 0; i < m_associatedElements.size(); ++i)
> -        m_associatedElements[i]->hideVisibleValidationMessage();
> +        if (m_associatedElements[i]->isFormControlElement())
> +            static_cast<HTMLFormControlElement*>(m_associatedElements[i])->hideVisibleValidationMessage();

We should add { } to the "for" because the content has two physical lines.

> WebCore/html/HTMLFormElement.cpp:357
>      for (unsigned i = 0; i < m_associatedElements.size(); ++i)
> -        m_associatedElements[i]->reset();
> +        if (m_associatedElements[i]->isFormControlElement())
> +            static_cast<HTMLFormControlElement*>(m_associatedElements[i])->reset();

ditto.

> WebCore/html/HTMLFormElement.cpp:652
>      for (unsigned i = 0; i < m_associatedElements.size(); ++i)
> -        m_associatedElements[i]->reset();
> +        if (m_associatedElements[i]->isFormControlElement())
> +            static_cast<HTMLFormControlElement*>(m_associatedElements[i])->reset();

ditto.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list