RESOLVED FIXED 42723
FileReader needs addEventListener
https://bugs.webkit.org/show_bug.cgi?id=42723
Summary FileReader needs addEventListener
Ridley Combs
Reported 2010-07-20 23:01:24 PDT
The FileReader class currently doesn't implement addEventListener, which it... should. Leaving defining object.oneventname as the only way to define events results in some pages not working in WebKit (i.e. those that use addEventListener).
Attachments
Proposed Patch (4.78 KB, patch)
2012-01-04 18:00 PST, Jian Li
abarth: review+
jianli: commit-queue-
Luis
Comment 1 2011-03-28 02:51:00 PDT
I confirm this in version 534.24 (branches/chromium/696@81543) with a few corrections. This applies to the WebCore component, not JavaScriptCore. (According to the JavaScript Console) the FileReader interface is missing the entire EventTarget interface despite the current File API specification's draft stipulating it (http://www.w3.org/TR/FileAPI/#FileReader-interface): 'FileReader implements EventTarget;'. Oddly, it's present in the source code http://trac.webkit.org/browser/trunk/Source/WebCore/fileapi/FileReader.idl and has been for a while. However, I'm not seeing a reference to 'FileReader' show up in 'EventTarget* toEventTarget(JSC::JSValue value)' where it perhaps should (I honestly don't know): http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/js/JSEventTarget.cpp Somewhere down the line, the right source code isn't getting generated.
Jian Li
Comment 3 2012-01-04 18:00:37 PST
Created attachment 121197 [details] Proposed Patch
Adam Barth
Comment 4 2012-01-04 23:40:01 PST
Comment on attachment 121197 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121197&action=review > LayoutTests/fast/files/file-reader-event-listener.html:40 > + if (layoutTestController.notifyDone) Do you mean: if (window.layoutTestController) layoutTestController.notifyDone(); ? > LayoutTests/fast/files/file-reader-event-listener.html:84 > + window.onload = runTests; Should we alert a message if eventSender isn't present?
David Levin
Comment 5 2012-01-04 23:45:04 PST
Comment on attachment 121197 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121197&action=review > LayoutTests/fast/files/file-reader-event-listener.html:82 > + layoutTestController.dumpAsText(); if (window.layoutTestController) around these lines.
Jian Li
Comment 6 2012-01-05 11:00:07 PST
Note You need to log in before you can comment on or make changes to this bug.