Bug 68203 - (Meta) Web Inspector: Add FileSystem support
Summary: (Meta) Web Inspector: Add FileSystem support
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Taiju Tsuiki
URL:
Keywords:
Depends on: 72456 72691 73301 87635 87724 87856 88602 89066 89190 89191 89420 89555 89642 89739 89961 90244 90361 90439 90518 90529 90592 91709 91732 91831 93930 93933 93940 94301 94908 97524 98092
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-15 18:09 PDT by Taiju Tsuiki
Modified: 2014-08-03 18:32 PDT (History)
14 users (show)

See Also:


Attachments
Patch (35.98 KB, patch)
2011-09-16 08:00 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (82.50 KB, patch)
2011-11-23 16:34 PST, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Screenshot (112.38 KB, image/png)
2011-11-23 16:47 PST, Taiju Tsuiki
no flags Details
Patch (44.85 KB, patch)
2012-05-28 00:53 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (52.62 KB, patch)
2012-05-29 02:48 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (60.92 KB, patch)
2012-05-30 08:38 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (65.99 KB, patch)
2012-06-18 21:01 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff
Patch (36.26 KB, patch)
2012-07-02 03:27 PDT, Taiju Tsuiki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Taiju Tsuiki 2011-09-15 18:09:59 PDT
Resources Panel in Web Inspector should support HTML5 FileSystem API, that should let us:
 - browse entries (directories and files) in FileSystem,
 - delete, copy or move entries,
 - look metadata and content,
and maybe,
 - "Save as"
 - put a native file into a FileSystem (using Drag and Drop)

FileSystem API has been implemented in Chrome, but we don't have rich debugging tool for developer yet.
It will encourage developer to use FileSystem API.
Comment 1 Taiju Tsuiki 2011-09-16 08:00:12 PDT
Created attachment 107652 [details]
Patch

A patch for early version of FileSystem support.
Comment 2 Pavel Feldman 2011-09-19 08:41:17 PDT
Comment on attachment 107652 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=107652&action=review

Overall looks good. I added some high-level comments.

> Source/WebCore/inspector/Inspector.json:832
> +        "domain": "FileSystem",

All methods and parameters should be documented.

> Source/WebCore/inspector/Inspector.json:845
> +                    { "name": "fsName", "type": "string", "description": "" },

No abbreviations in WebKit.

> Source/WebCore/inspector/Inspector.json:853
> +                "name": "addFileSystem",

We prefer fileSystemAdded notation. Also, you should not generate any messages unless FileSystem domain is enabled. You should add "enable" and "disable" commands. You could also include "getFileSystems" command that returns all filesystems for the late attach.

> Source/WebCore/inspector/Inspector.json:861
> +                "name": "onSuccess",

There should be no generic "onSuccess"/"onError" events.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:17
> + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY

You should use Google license template.

> Source/WebCore/inspector/InspectorFileSystemAgent.h:17
> + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY

ditto

> Source/WebCore/inspector/InspectorFileSystemAgent.h:57
> +    class FileSystemTask;

It looks like it can be defined in the anonymous namespace in the .cpp file.

> Source/WebCore/inspector/InspectorFileSystemAgent.h:58
> +    class ReadDirectoryTask;

ditto

> Source/WebCore/inspector/InspectorInstrumentation.h:37
> +#include "DOMFileSystem.h"

InspectorInstrumentation should not add includes. You should add InspectorFileSystemInstrumentation.h (just like InspectorConsoleInstrumentation.h has)

> Source/WebCore/inspector/front-end/FileSystem.js:43
> +        FileSystemAgent.readDirectory(name, path, requestId);

We are using single callback for both success and error paths, you could just check whether resulting message is an error.
Comment 3 Paul Irish 2011-10-06 16:36:44 PDT
Can we get a new patch? So excited! :)
Comment 4 Patrick Mueller 2011-10-07 05:59:25 PDT
This seems like it could make for a good example of a Web Inspector extension.  Would certainly be a good use case for a Web Inspector extension.  If you can't build this with the extension API, the extension API isn't done yet.
Comment 5 Pavel Feldman 2011-10-16 11:16:26 PDT
(In reply to comment #4)
> This seems like it could make for a good example of a Web Inspector extension.  Would certainly be a good use case for a Web Inspector extension.  If you can't build this with the extension API, the extension API isn't done yet.

Not everything FS debugging needs is exposed via web facing APIs. Like mapping to the actual file system, etc. You can't say that extension API isn't done unless it exposes certain FS instrumentation specifics. I think it is totally fine to implement support for FS as a part of the core inspector since FS is a part of HTML.
Comment 6 Taiju Tsuiki 2011-11-15 21:01:18 PST
I complete first version of FileSystem support.
It seems too big as single patch, so I'm splitting it into small ones:
 - Adding files and capture DOMFileSystem object,
 - Adding FileSystem item in storage tree on Resources panel,
 - Adding explorer style split-view as FileSystem view,
 - Adding directory tree as left part of split-view,
 - Adding text file content view as right part of split-view,
 - Adding binary file summary view.

First of them is https://bugs.webkit.org/show_bug.cgi?id=72456, I'll post review request soon after.
Comment 7 Taiju Tsuiki 2011-11-17 23:08:18 PST
and here is the second part:
[Inspector][FileSystem] Add FileSystem item to storage tree 
https://bugs.webkit.org/show_bug.cgi?id=72691
Comment 8 Taiju Tsuiki 2011-11-23 16:34:10 PST
Created attachment 116451 [details]
Patch
Comment 9 Taiju Tsuiki 2011-11-23 16:47:40 PST
Created attachment 116454 [details]
Screenshot
Comment 10 Taiju Tsuiki 2012-05-28 00:53:09 PDT
Created attachment 144292 [details]
Patch
Comment 11 Taiju Tsuiki 2012-05-29 02:48:22 PDT
Created attachment 144496 [details]
Patch
Comment 12 Taiju Tsuiki 2012-05-30 08:38:42 PDT
Created attachment 144827 [details]
Patch
Comment 13 Taiju Tsuiki 2012-06-18 21:01:38 PDT
Created attachment 148237 [details]
Patch
Comment 14 Taiju Tsuiki 2012-07-02 03:27:04 PDT
Created attachment 150388 [details]
Patch
Comment 15 Brian Burg 2014-08-03 18:32:34 PDT
This feature is no longer in WebKit.