Last Comment Bug 596385 - Update File APIs to spec
: Update File APIs to spec
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Jonas Sicking (:sicking) No longer reading bugmail consistently
:
: Andrew Overholt [:overholt]
Mentors:
: 593762 (view as bug list)
Depends on: 599966
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-14 14:48 PDT by Jonas Sicking (:sicking) No longer reading bugmail consistently
Modified: 2010-09-27 12:53 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
beta7+


Attachments
Fix FormData (9.99 KB, patch)
2010-09-14 14:49 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
jst: review+
Details | Diff | Splinter Review
Fix File.url -> createBlobURL (12.04 KB, patch)
2010-09-14 14:50 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
jst: review+
Details | Diff | Splinter Review
Remove File.url (2.25 KB, patch)
2010-09-17 15:09 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
jst: review+
Details | Diff | Splinter Review

Description Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-14 14:48:03 PDT
There has been a few File-API related spec changes to features that we've added since FF3.6. In particular:

myFormData = formelement.getFormData();
is now
myFormData = new FormData(formelement);

and

img.src = file.url
is now
img.src = window.createBlobURL(file);
and comes with a matching
window.revokeBlobURL(someurl);


Patches coming up
Comment 1 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-14 14:49:52 PDT
Created attachment 475245 [details] [diff] [review]
Fix FormData
Comment 2 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-14 14:50:42 PDT
Created attachment 475246 [details] [diff] [review]
Fix File.url -> createBlobURL
Comment 3 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-14 14:51:09 PDT
Since this is new syntax, I suspect we should treat it as a beta7 blocker.
Comment 4 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-16 02:45:56 PDT
Checked in

http://hg.mozilla.org/mozilla-central/rev/1cfb952b69be
http://hg.mozilla.org/mozilla-central/rev/7fff69efb85e

Thanks for the quick review
Comment 5 :Ms2ger (⌚ UTC+1/+2) 2010-09-16 06:13:42 PDT
*** Bug 593762 has been marked as a duplicate of this bug. ***
Comment 6 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-17 15:09:04 PDT
Crap! I missed to remove the existing File.url property. Patch coming up to do that.
Comment 7 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-17 15:09:52 PDT
Created attachment 476401 [details] [diff] [review]
Remove File.url
Comment 8 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-17 17:31:00 PDT
http://hg.mozilla.org/mozilla-central/rev/905b39a5523c

Checked in last patch
Comment 9 Olli Pettay [:smaug] 2010-09-18 07:29:33 PDT
So does this all work properly when we're reusing inner window for different documents?
Comment 10 Jonas Sicking (:sicking) No longer reading bugmail consistently 2010-09-18 19:46:39 PDT
Can you describe the situation you are concerned about?
Comment 11 Eric Shepherd [:sheppy] 2010-09-21 11:14:58 PDT
The text for this has been updated here:

https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Using_FormData_objects

And the url property has been removed from the File object reference:

https://developer.mozilla.org/en/DOM/File

That should cover this.

Note You need to log in before you can comment on or make changes to this bug.