Title: [144729] trunk
- Revision
- 144729
- Author
- [email protected]
- Date
- 2013-03-04 23:31:56 -0800 (Mon, 04 Mar 2013)
Log Message
Web Inspector: Do not accumulate file system files, add them to workspace immediately
https://bugs.webkit.org/show_bug.cgi?id=111325
Reviewed by Pavel Feldman.
Source/WebCore:
* inspector/front-end/FileSystemProjectDelegate.js:
(WebInspector.FileSystemProjectDelegate.prototype.populate.fileLoaded):
(WebInspector.FileSystemProjectDelegate.prototype.populate):
* inspector/front-end/IsolatedFileSystem.js:
(WebInspector.IsolatedFileSystem.prototype.innerCallback):
(WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
LayoutTests:
* inspector/file-system-project.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (144728 => 144729)
--- trunk/LayoutTests/ChangeLog 2013-03-05 07:20:26 UTC (rev 144728)
+++ trunk/LayoutTests/ChangeLog 2013-03-05 07:31:56 UTC (rev 144729)
@@ -1,3 +1,12 @@
+2013-03-04 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Do not accumulate file system files, add them to workspace immediately
+ https://bugs.webkit.org/show_bug.cgi?id=111325
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/file-system-project.html:
+
2013-03-04 Chris Fleizach <[email protected]>
AX: cellForColumnAndRow fails for tables with hidden table cells
Modified: trunk/LayoutTests/inspector/file-system-project.html (144728 => 144729)
--- trunk/LayoutTests/inspector/file-system-project.html 2013-03-05 07:20:26 UTC (rev 144728)
+++ trunk/LayoutTests/inspector/file-system-project.html 2013-03-05 07:31:56 UTC (rev 144729)
@@ -36,7 +36,9 @@
requestFilesRecursive: function(path, callback)
{
- callback(Object.keys(this._files));
+ var files = Object.keys(this._files);
+ for (var i = 0; i < files.length; ++i)
+ callback(files[i]);
},
}
Modified: trunk/Source/WebCore/ChangeLog (144728 => 144729)
--- trunk/Source/WebCore/ChangeLog 2013-03-05 07:20:26 UTC (rev 144728)
+++ trunk/Source/WebCore/ChangeLog 2013-03-05 07:31:56 UTC (rev 144729)
@@ -1,3 +1,17 @@
+2013-03-04 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Do not accumulate file system files, add them to workspace immediately
+ https://bugs.webkit.org/show_bug.cgi?id=111325
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/FileSystemProjectDelegate.js:
+ (WebInspector.FileSystemProjectDelegate.prototype.populate.fileLoaded):
+ (WebInspector.FileSystemProjectDelegate.prototype.populate):
+ * inspector/front-end/IsolatedFileSystem.js:
+ (WebInspector.IsolatedFileSystem.prototype.innerCallback):
+ (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
+
2013-03-04 Kinuko Yasuda <[email protected]>
Unreviewed Windows build fix attempt.
Modified: trunk/Source/WebCore/inspector/front-end/FileSystemProjectDelegate.js (144728 => 144729)
--- trunk/Source/WebCore/inspector/front-end/FileSystemProjectDelegate.js 2013-03-05 07:20:26 UTC (rev 144728)
+++ trunk/Source/WebCore/inspector/front-end/FileSystemProjectDelegate.js 2013-03-05 07:31:56 UTC (rev 144729)
@@ -188,20 +188,18 @@
populate: function()
{
- this._fileSystem.requestFilesRecursive("", filesLoaded.bind(this));
+ this._fileSystem.requestFilesRecursive("", fileLoaded.bind(this));
- function filesLoaded(files)
+ function fileLoaded(filePath)
{
- for (var i = 0; i < files.length; ++i) {
- var path = files[i].split("/");
- path.shift();
- console.assert(path.length);
- var fullPath = this._fileSystem.path() + files[i];
- var url = ""
- var contentType = this._contentTypeForPath(path);
- var fileDescriptor = new WebInspector.FileDescriptor(path, "file://" + fullPath, url, contentType, true);
- this._addFile(fileDescriptor);
- }
+ var path = filePath.split("/");
+ path.shift();
+ console.assert(path.length);
+ var fullPath = this._fileSystem.path() + filePath;
+ var url = ""
+ var contentType = this._contentTypeForPath(path);
+ var fileDescriptor = new WebInspector.FileDescriptor(path, "file://" + fullPath, url, contentType, true);
+ this._addFile(fileDescriptor);
}
},
Modified: trunk/Source/WebCore/inspector/front-end/IsolatedFileSystem.js (144728 => 144729)
--- trunk/Source/WebCore/inspector/front-end/IsolatedFileSystem.js 2013-03-05 07:20:26 UTC (rev 144728)
+++ trunk/Source/WebCore/inspector/front-end/IsolatedFileSystem.js 2013-03-05 07:31:56 UTC (rev 144729)
@@ -113,7 +113,7 @@
/**
* @param {string} path
- * @param {function(Array.<string>)} callback
+ * @param {function(string)} callback
*/
requestFilesRecursive: function(path, callback)
{
@@ -129,8 +129,6 @@
this._requestEntries(domFileSystem, path, innerCallback.bind(this));
}
- var result = [];
- var callbacksLeft = 1;
/**
* @param {Array.<FileEntry>} entries
*/
@@ -139,14 +137,10 @@
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (!entry.isDirectory)
- result.push(entry.fullPath);
- else {
- callbacksLeft++;
+ callback(entry.fullPath);
+ else
this._requestEntries(domFileSystem, entry.fullPath, innerCallback.bind(this));
- }
}
- if (!--callbacksLeft)
- callback(result);
}
},
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes