Bug 43993 - Add idl and mock classes for FileSystem API's {File,Directory}Entry and related interfaces
Summary: Add idl and mock classes for FileSystem API's {File,Directory}Entry and relat...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 42903
  Show dependency treegraph
 
Reported: 2010-08-13 15:22 PDT by Kinuko Yasuda
Modified: 2010-08-16 19:22 PDT (History)
4 users (show)

See Also:


Attachments
Patch (63.33 KB, patch)
2010-08-13 15:29 PDT, Kinuko Yasuda
no flags Details | Formatted Diff | Diff
Patch (93.90 KB, patch)
2010-08-16 15:13 PDT, Kinuko Yasuda
dumi: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kinuko Yasuda 2010-08-13 15:22:50 PDT
Add idl and mock classes for FileEntry, DirectoryEntry, DirectoryReader and EntriesCallback interfaces defined in HTML5 FileSystem API.
As defined in: http://dev.w3.org/2009/dap/file-system/file-dir-sys.html
Comment 1 Kinuko Yasuda 2010-08-13 15:29:33 PDT
Created attachment 64380 [details]
Patch
Comment 2 Dumitru Daniliuc 2010-08-13 17:33:31 PDT
Comment on attachment 64380 [details]
Patch

WebCore/ChangeLog:14
 +          * WebCore.xcodeproj/project.pbxproj:
you need to add these new files to a whole lot more build files (and possibly JSDerivedSources too): see http://trac.webkit.org/changeset/61531

WebCore/storage/DirectoryEntry.cpp:54
 +      // FIXME: to be implemented.
might be worth adding ASSERT_NOT_REACHED() to all methods that are not yet implemented.

WebCore/storage/DirectoryEntry.idl:38
 +          void getFile(in DOMString path, in [Optional] Flags options, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
will "[Optional] Flags options" generate "RefPtr<Flags> options;" or just "Flags* options"?


r- mostly because of the changes required to other build files.
Comment 3 Kinuko Yasuda 2010-08-16 15:13:47 PDT
Created attachment 64526 [details]
Patch
Comment 4 Kinuko Yasuda 2010-08-16 15:21:52 PDT
Thanks for reviewing.

(In reply to comment #2)
> (From update of attachment 64380 [details])
> WebCore/ChangeLog:14
>  +          * WebCore.xcodeproj/project.pbxproj:
> you need to add these new files to a whole lot more build files (and possibly JSDerivedSources too): see http://trac.webkit.org/changeset/61531

Fixed.  I also added entries for basic idls/classes added in changeset 64414.
I was assuming we wouldn't need to include them on other platforms yet but on the second thought not having them on some platforms might be confusing.

> WebCore/storage/DirectoryEntry.cpp:54
>  +      // FIXME: to be implemented.
> might be worth adding ASSERT_NOT_REACHED() to all methods that are not yet implemented.

Added.

> WebCore/storage/DirectoryEntry.idl:38
>  +          void getFile(in DOMString path, in [Optional] Flags options, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
> will "[Optional] Flags options" generate "RefPtr<Flags> options;" or just "Flags* options"?

Yes.

> r- mostly because of the changes required to other build files.
Comment 5 Kinuko Yasuda 2010-08-16 15:24:33 PDT
(In reply to comment #4)
> Thanks for reviewing.
> 
> (In reply to comment #2)
> > (From update of attachment 64380 [details] [details])
> > WebCore/ChangeLog:14
> >  +          * WebCore.xcodeproj/project.pbxproj:
> > you need to add these new files to a whole lot more build files (and possibly JSDerivedSources too): see http://trac.webkit.org/changeset/61531
> 
> Fixed.  I also added entries for basic idls/classes added in changeset 64414.
> I was assuming we wouldn't need to include them on other platforms yet but on the second thought not having them on some platforms might be confusing.
> 
> > WebCore/storage/DirectoryEntry.cpp:54
> >  +      // FIXME: to be implemented.
> > might be worth adding ASSERT_NOT_REACHED() to all methods that are not yet implemented.
> 
> Added.
> 
> > WebCore/storage/DirectoryEntry.idl:38
> >  +          void getFile(in DOMString path, in [Optional] Flags options, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
> > will "[Optional] Flags options" generate "RefPtr<Flags> options;" or just "Flags* options"?
> 
> Yes.

Oops, I meant:  it generates RefPtr<Flags> options (PassRefPtr for args).
Do you mean creating ref-counted objects for such flags might be too much?  Currently I don't have a good idea how we should treat those super lightweight (but not directly mapped to a native type) interfaces.
Comment 6 Dumitru Daniliuc 2010-08-16 16:08:45 PDT
(In reply to comment #5)
> Oops, I meant:  it generates RefPtr<Flags> options (PassRefPtr for args).
> Do you mean creating ref-counted objects for such flags might be too much?  Currently I don't have a good idea how we should treat those super lightweight (but not directly mapped to a native type) interfaces.

I saw your .cpp code takes PassRefPtr<Flags> parameters, and was worried that the auto-generated bindings could create raw pointers instead of RefPtr<Flags> and pass those in, but apparently that's not the case.

Looking at the patch.
Comment 7 Dumitru Daniliuc 2010-08-16 16:20:52 PDT
Comment on attachment 64526 [details]
Patch

r=me. please wait for the chromium EWS bot to turn green before submitting.
Comment 8 Kinuko Yasuda 2010-08-16 17:00:26 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > Oops, I meant:  it generates RefPtr<Flags> options (PassRefPtr for args).
> > Do you mean creating ref-counted objects for such flags might be too much?  Currently I don't have a good idea how we should treat those super lightweight (but not directly mapped to a native type) interfaces.
> 
> I saw your .cpp code takes PassRefPtr<Flags> parameters, and was worried that the auto-generated bindings could create raw pointers instead of RefPtr<Flags> and pass those in, but apparently that's not the case.

I see, thanks for taking care of it.  Going to submit after checking the builds on bots.
Comment 9 Kinuko Yasuda 2010-08-16 18:07:24 PDT
Committed r65474: <http://trac.webkit.org/changeset/65474>
Comment 10 Kinuko Yasuda 2010-08-16 19:22:02 PDT
(In reply to comment #9)
> Committed r65474: <http://trac.webkit.org/changeset/65474>

Submitted except for WebCore/Android.derived.{jsc,v8}bindings.mk changes.