Bug 87702

Summary: Add readDirectory command and didReadDirectory event to InspectorFileSystemAgent
Product: WebKit Reporter: Taiju Tsuiki <tzik>
Component: Web Inspector (Deprecated)Assignee: Taiju Tsuiki <tzik>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 87724    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Taiju Tsuiki 2012-05-28 23:50:17 PDT
This patch adds readDirectory command and didReadDirectory event to FileSystem domain
 and adds mock implementation of readDirectory.
Inspector needs them for FileSystem support.
Comment 1 Taiju Tsuiki 2012-05-28 23:57:22 PDT
Created attachment 144461 [details]
Patch
Comment 2 Yury Semikhatsky 2012-05-29 00:50:46 PDT
Comment on attachment 144461 [details]
Patch

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

> Source/WebCore/inspector/Inspector.json:1420
> +                    { "name": "errorCode", "type": "integer" },

Please add a description for this and the next fields.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:80
> +    m_frontend->didReadDirectory(requestId, static_cast<int>(FileError::ABORT_ERR), TypeBuilder::Array<String>::create());

You may want to make the "entries" field optional as it makes no sense in case of an error.
Comment 3 Kinuko Yasuda 2012-05-29 01:05:26 PDT
Comment on attachment 144461 [details]
Patch

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

Drive-by nit-picks.

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:2
> + * Copyright (C) 2012 Google Inc. All rights reserved.

In general we seem to just append copyright years in WebKit (rather than replacing)

> Source/WebCore/inspector/InspectorFileSystemAgent.h:2
> + * Copyright (C) 2012 Google Inc. All rights reserved.

ditto.

> Source/WebCore/inspector/InspectorFileSystemAgent.h:49
> +typedef String ErrorString;

nit: why do we suddenly need this typedef? (We seem to be already using it)
Comment 4 Taiju Tsuiki 2012-05-29 01:35:20 PDT
Created attachment 144474 [details]
Patch
Comment 5 Taiju Tsuiki 2012-05-29 01:42:32 PDT
Created attachment 144476 [details]
Patch
Comment 6 Yury Semikhatsky 2012-05-29 01:43:17 PDT
Comment on attachment 144474 [details]
Patch

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

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:2
> + * Copyright (C) 2011,2012 Google Inc. All rights reserved.

nit: space after ,

> Source/WebCore/inspector/InspectorFileSystemAgent.h:2
> + * Copyright (C) 2011,2012 Google Inc. All rights reserved.

nit: space after ,

> Source/WebCore/inspector/InspectorFileSystemAgent.h:49
> +typedef String ErrorString;

No need for this as it is defined in InspectorBackendDispatcher.h
Comment 7 Taiju Tsuiki 2012-05-29 01:43:51 PDT
Comment on attachment 144461 [details]
Patch

Thanks! Updated.

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

>> Source/WebCore/inspector/Inspector.json:1420
>> +                    { "name": "errorCode", "type": "integer" },
> 
> Please add a description for this and the next fields.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:2
>> + * Copyright (C) 2012 Google Inc. All rights reserved.
> 
> In general we seem to just append copyright years in WebKit (rather than replacing)

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:80
>> +    m_frontend->didReadDirectory(requestId, static_cast<int>(FileError::ABORT_ERR), TypeBuilder::Array<String>::create());
> 
> You may want to make the "entries" field optional as it makes no sense in case of an error.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.h:2
>> + * Copyright (C) 2012 Google Inc. All rights reserved.
> 
> ditto.

Done

>> Source/WebCore/inspector/InspectorFileSystemAgent.h:49
>> +typedef String ErrorString;
> 
> nit: why do we suddenly need this typedef? (We seem to be already using it)

It is also in InspectorFrontend.h (generated header). But I'd like to define it explicitly.
Comment 8 Yury Semikhatsky 2012-05-29 01:44:40 PDT
Comment on attachment 144476 [details]
Patch

Please address my comments to the previous patch.
Comment 9 Taiju Tsuiki 2012-06-14 00:33:54 PDT

*** This bug has been marked as a duplicate of bug 87724 ***