WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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.
Jeff Schiller
Comment 2
2011-12-20 10:34:31 PST
It's in the spec too:
http://www.w3.org/TR/FileAPI/#FileReader-interface
http://www.w3.org/TR/domcore/#eventtarget
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
Committed as
http://trac.webkit.org/changeset/104180
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug