[Webkit-unassigned] [Bug 39430] Refactor form submission code in HTMLFormElement to remove hairballs and add logical clarity.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 12 17:56:01 PDT 2010


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #57594|review?                     |review+
               Flag|                            |




--- Comment #10 from Darin Adler <darin at apple.com>  2010-06-12 17:56:00 PST ---
(From update of attachment 57594)
> +            // FIXME: This may fire a DOM Mutation Event. Do we really want this here?

I don’t see any reason to capitalize “Mutation Event”. Also, I’m not sure about the use of the word “may” here. It either will fire the event or won‘t. Maybe the use of “may” is related to the fact that most likely no one is listening so we will optimize out the work.

> +            setEnctype("application/x-www-form-urlencoded");

It’s unfortunate that this function has to have a side effect at all. We should explore whether the form element’s enctype actually needs to be changed. I’m guessing that could be incorrect behavior. Sure, we want this encoding type to be used, but doing that by mutating the DOM seems wrong.

Thus the comment seems to miss a point that is even more pertinent than the the mutation event. Do we want to mutate the form element at all in this case, or is there a better way to handle it? Maybe the form data builder or some other transient object could hold the encoding type.

>      return result;

This really should be returning result.release().

-- 
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