[Webkit-unassigned] [Bug 19079] Send the submissions character encoding in hidden _charset_ field

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 4 09:36:39 PDT 2011


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


Darin Adler <darin at apple.com> changed:

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




--- Comment #10 from Darin Adler <darin at apple.com>  2011-11-04 09:36:38 PST ---
(From update of attachment 113639)
View in context: https://bugs.webkit.org/attachment.cgi?id=113639&action=review

Seems fine, but implementation is not quite right.

> Source/WebCore/html/InputType.cpp:178
> +    if (equalIgnoringCase(element()->name(), "_charset_") && element()->isInputTypeHidden())

This is the wrong way to code something that’s type specific in InputType objects. Instead, HiddenInputType should override the appendFormData function.

The InputType objects were created to avoid having type-specific code mixed in with type-independent code, making use of isXXX checks like the one here.

> Source/WebCore/html/InputType.cpp:179
> +        encoding.appendData(element()->name(), String(encoding.encoding().name()));

Why is an explicit String() needed here? Did you try compiling without it?

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