Bug 45553

Summary: Make FileEntry and DirectoryEntry methods accessible via Entry instance
Product: WebKit Reporter: Kinuko Yasuda <kinuko>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dumi, ericu, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 42903    
Attachments:
Description Flags
Patch
none
Patch
none
Patch abarth: review+

Description Kinuko Yasuda 2010-09-10 11:30:45 PDT
Make FileEntry and DirectoryEntry methods accessible via Entry instance.

Usually user script obtains an Entry (either file or directory) via callbacks as an 'Entry' instance, but since there's no concept of 'cast' in Javascript the script cannot call FileEntry- or DirectoryEntry-specific methods on the returned 'Entry' instance.

Probably we could add some tricks in the binding code, or the quickest short-term solution would be:
1. (in idl) adding FileEntry- and DirectoryEntry-specific methods to Entry
2. (in c++ impl) making the methods virtual
3. throws an exception if Entry's base implementation is called.
Comment 1 Kinuko Yasuda 2010-09-10 12:02:59 PDT
Created attachment 67219 [details]
Patch

Work-around patch
Comment 2 Kinuko Yasuda 2010-09-13 17:57:42 PDT
Created attachment 67495 [details]
Patch
Comment 3 Adam Barth 2010-09-13 18:05:33 PDT
Comment on attachment 67495 [details]
Patch

great!
Comment 4 Kinuko Yasuda 2010-09-13 18:07:25 PDT
Created attachment 67497 [details]
Patch

Removed unnecessary changes.
Comment 5 Kinuko Yasuda 2010-09-13 18:14:09 PDT
(In reply to comment #3)
> (From update of attachment 67495 [details])
> great!

Oops... mid-air collision :(  Could you r+ one more time on the new one?  Thanks so much.

https://bugs.webkit.org/attachment.cgi?id=67497&action=edit
Comment 6 Kinuko Yasuda 2010-09-13 21:59:43 PDT
Committed r67443: <http://trac.webkit.org/changeset/67443>