WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
26521
Expose file size to chromium
https://bugs.webkit.org/show_bug.cgi?id=26521
Summary
Expose file size to chromium
Victor Wang
Reported
2009-06-18 15:35:47 PDT
Need to implement getFileSize in WebCore/platform/chromium/FileSystemChromium.cpp.
Attachments
Expose file size to chromium
(2.09 KB, patch)
2009-06-18 16:04 PDT
,
Victor Wang
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Victor Wang
Comment 1
2009-06-18 16:04:50 PDT
Created
attachment 31515
[details]
Expose file size to chromium
Tony Chang
Comment 2
2009-06-18 16:07:03 PDT
What is this method used for? I'm worried that an 0wned renderer can start reading to see if certain files exist or not.
Victor Wang
Comment 3
2009-06-18 17:14:50 PDT
(In reply to
comment #2
)
> What is this method used for? I'm worried that an 0wned renderer can start > reading to see if certain files exist or not. >
This is only allowed in uploading file. see bug:
http://code.google.com/p/chromium/issues/detail?id=9102
Here is the Chromium patch that supports this:
http://codereview.chromium.org/131082
Tony Chang
Comment 4
2009-06-18 17:34:50 PDT
Comment on
attachment 31515
[details]
Expose file size to chromium I see, we validate the filename on the browser side. Seems like it would be nice if we could get the filesize information when the user picks a file and pass it through the IPC then (the FileChooser in the RenderFileUploadControl would get filename, size pairs). It would avoid the extra calls IPC calls back to the browser, but this seems like the easier change to make.
Victor Wang
Comment 5
2009-06-18 17:44:33 PDT
I was thinking about getting the filesize info and passing it through IPC with file name user selected, but the FileChooser allows selecting multiple files and more changes on the existing IPC. Discussed with Darin and think having a separate IPC to browser seems easier. (In reply to
comment #4
)
> (From update of
attachment 31515
[details]
[review]) > I see, we validate the filename on the browser side. > > Seems like it would be nice if we could get the filesize information when the > user picks a file and pass it through the IPC then (the FileChooser in the > RenderFileUploadControl would get filename, size pairs). It would avoid the > extra calls IPC calls back to the browser, but this seems like the easier > change to make. >
Eric Seidel (no email)
Comment 6
2009-06-18 18:51:41 PDT
Comment on
attachment 31515
[details]
Expose file size to chromium Looks fine to me.
Victor Wang
Comment 7
2009-06-18 19:22:23 PDT
(In reply to
comment #6
)
> (From update of
attachment 31515
[details]
[review]) > Looks fine to me. >
could you hold landing this patch? would like to wait for the change in Chromium codebase to be reviewed. Will update this bug once the Chromium one is ready.
Darin Fisher (:fishd, Google)
Comment 8
2009-06-22 11:25:24 PDT
(In reply to
comment #4
) ...
> Seems like it would be nice if we could get the filesize information when the > user picks a file and pass it through the IPC then (the FileChooser in the > RenderFileUploadControl would get filename, size pairs). It would avoid the > extra calls IPC calls back to the browser, but this seems like the easier > change to make.
This seems like an interesting idea to me. It would mean changing FileChooser to hand back not just a list of file names but also the sizes of those files. One downside is that the file size returned to script would not be dynamic. That may actually be a deal breaker since I think it is normally valid for users to change the file to be uploaded before actually submitting the form.
Darin Adler
Comment 9
2009-06-22 11:32:04 PDT
(In reply to
comment #8
)
> I think it is normally valid for users to > change the file to be uploaded before actually submitting the form.
Yes, it normally is.
Eric Seidel (no email)
Comment 10
2009-06-24 18:30:29 PDT
Can this be landed now?
Victor Wang
Comment 11
2009-06-24 21:03:42 PDT
Not yet. Still waiting for the patch in chromium.
Eric Seidel (no email)
Comment 12
2009-06-29 13:26:02 PDT
Looks like
http://codereview.chromium.org/131082
was just approved by fishd. Let me know when this should go in. Any commiter can easily land this with: bugzilla-tool land-patches 26521 --no-build (--no-build because there is no way to build these chromium-only changes in WebKit).
Victor Wang
Comment 13
2009-06-29 13:37:56 PDT
Thanks Eric! Both patches are ready, but we need to sync the webkit patch with the Chromium change. Dimitri is the sheriff for Chromium webkit integration and he is going to land this one while he is doing the merging. (In reply to
comment #12
)
> Looks like
http://codereview.chromium.org/131082
was just approved by fishd. > Let me know when this should go in. > > Any commiter can easily land this with: > > bugzilla-tool land-patches 26521 --no-build > > (--no-build because there is no way to build these chromium-only changes in > WebKit). >
Dimitri Glazkov (Google)
Comment 14
2009-07-02 15:23:25 PDT
Landed as
http://trac.webkit.org/changeset/45494
.
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