Bug 47454

Summary: FileWriter sends write event instead of progress event
Product: WebKit Reporter: Eric U. <ericu>
Component: DOMAssignee: Eric U. <ericu>
Status: RESOLVED FIXED    
Severity: Enhancement CC: commit-queue, kinuko, kling, michaeln
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 44358    
Attachments:
Description Flags
Patch none

Description Eric U. 2010-10-09 10:53:40 PDT
The FileWriter is currently sending the write event where it should be sending a progress event.
Write happens only at the end of a successful truncate or write, whereas progress happens throughout an ongoing write.
Comment 1 Eric U. 2010-10-09 17:21:45 PDT
Created attachment 70381 [details]
Patch
Comment 2 Andreas Kling 2010-10-09 18:55:51 PDT
Comment on attachment 70381 [details]
Patch

According to the spec, readyState should be DONE when the "write" event fires:
http://www.w3.org/TR/file-writer-api/#widl-FileWriter-write  (steps 6, 7 and 8.)
Comment 3 Andreas Kling 2010-10-09 18:59:18 PDT
Comment on attachment 70381 [details]
Patch

D'oh, that's my bad. I was looking at an outdated version of the spec.

Here's the relevant one:
http://dev.w3.org/2009/dap/file-system/file-writer.html#widl-FileWriter-write

r=me
Comment 4 WebKit Commit Bot 2010-10-09 19:16:11 PDT
Comment on attachment 70381 [details]
Patch

Clearing flags on attachment: 70381

Committed r69463: <http://trac.webkit.org/changeset/69463>
Comment 5 WebKit Commit Bot 2010-10-09 19:16:16 PDT
All reviewed patches have been landed.  Closing bug.