[Webkit-unassigned] [Bug 63929] A 'change' event is not triggered on a multiple file form when selected files are changed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 5 18:45:38 PDT 2011


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


Kentaro Hara <haraken at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #99694|1                           |0
        is obsolete|                            |




--- Comment #5 from Kentaro Hara <haraken at google.com>  2011-07-05 18:45:39 PST ---
(From update of attachment 99694)
View in context: https://bugs.webkit.org/attachment.cgi?id=99694&action=review

>> LayoutTests/fast/forms/file-input-change-event.html:19
>> +    var multiple_files_input = document.getElementById("multiple_files");
> 
> We don't have a formal JavaScript style guide, but we usually use rules similar to C++. So variable names and function names should be like singleFileInput.

Done.

>> Source/WebCore/ChangeLog:19
>> +        (WebCore::HTMLTextFormControlElement::setPathsAsOfLastFormControlChangeEvent): Records the newly selected files
> 
> This approach is not acceptable.  We don't want to add type-specific data members to HTMLInputElement.
> FileInputType::filesChosen() knows both of the previously-selected files (m_fileList) and newly-selected files. We can check the need to dispatch 'change' in filesChosen().

Done.

>> Source/WebCore/html/HTMLFormControlElement.cpp:690
>> +    setChangedSinceLastFormControlChangeEvent(false);
> 
> dispatchChangeEvent() invokes a JavaScript code, and it can delete 'this' object.  So you can't access 'this' after dispatchChangeEvent().
> You can avoid such problem by the protector idiom.

I see. Anyway, I removed this method.

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