notifyFormStateChanged is duplicated in HTMLInputElement and HTMLTextAreaElement (one is a static local function, and the other one is a member of HTMLInputElement). Also formControlValueMatchesRenderer and setFormControlValueMatchesRenderer are somehow member functions of Node, which is probably a left-over from WML.
Created attachment 105506 [details] cleanup
I just had to refactor code. The existing code was too disgusting.
Comment on attachment 105506 [details] cleanup LGTM.
Comment on attachment 105506 [details] cleanup Attachment 105506 [details] did not pass cr-mac-ews (chromium): Output: http://queues.webkit.org/results/9569063
Committed r94009: <http://trac.webkit.org/changeset/94009>