Title: [138161] trunk/Source/WebCore
- Revision
- 138161
- Author
- vse...@chromium.org
- Date
- 2012-12-19 07:32:32 -0800 (Wed, 19 Dec 2012)
Log Message
Web Inspector: Add Workspace.setFileContent() method
https://bugs.webkit.org/show_bug.cgi?id=105434
Reviewed by Pavel Feldman.
Added method that will be usedto save file system-based uiSourceCodes to the disk.
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype._commitContent):
* inspector/front-end/Workspace.js:
(WebInspector.WorkspaceProvider.prototype.setFileContent):
(WebInspector.Project.prototype.setFileContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (138160 => 138161)
--- trunk/Source/WebCore/ChangeLog 2012-12-19 15:29:46 UTC (rev 138160)
+++ trunk/Source/WebCore/ChangeLog 2012-12-19 15:32:32 UTC (rev 138161)
@@ -1,5 +1,20 @@
2012-12-19 Vsevolod Vlasov <vse...@chromium.org>
+ Web Inspector: Add Workspace.setFileContent() method
+ https://bugs.webkit.org/show_bug.cgi?id=105434
+
+ Reviewed by Pavel Feldman.
+
+ Added method that will be usedto save file system-based uiSourceCodes to the disk.
+
+ * inspector/front-end/UISourceCode.js:
+ (WebInspector.UISourceCode.prototype._commitContent):
+ * inspector/front-end/Workspace.js:
+ (WebInspector.WorkspaceProvider.prototype.setFileContent):
+ (WebInspector.Project.prototype.setFileContent):
+
+2012-12-19 Vsevolod Vlasov <vse...@chromium.org>
+
Web Inspector: Rename workspace path to uri.
https://bugs.webkit.org/show_bug.cgi?id=105433
Modified: trunk/Source/WebCore/inspector/front-end/UISourceCode.js (138160 => 138161)
--- trunk/Source/WebCore/inspector/front-end/UISourceCode.js 2012-12-19 15:29:46 UTC (rev 138160)
+++ trunk/Source/WebCore/inspector/front-end/UISourceCode.js 2012-12-19 15:32:32 UTC (rev 138161)
@@ -198,6 +198,7 @@
WebInspector.fileManager.save(this._url, this._content, false);
WebInspector.fileManager.close(this._url);
}
+ this._workspace.setFileContent(this, this._content, function() { });
},
/**
Modified: trunk/Source/WebCore/inspector/front-end/Workspace.js (138160 => 138161)
--- trunk/Source/WebCore/inspector/front-end/Workspace.js 2012-12-19 15:29:46 UTC (rev 138160)
+++ trunk/Source/WebCore/inspector/front-end/Workspace.js 2012-12-19 15:32:32 UTC (rev 138161)
@@ -91,6 +91,14 @@
requestFileContent: function(uri, callback) { },
/**
+ * @param {string} uri
+ * @param {string} newContent
+ * @param {function(?string)} callback
+ */
+ setFileContent: function(uri, newContent, callback) { },
+
+ /**
+ * @param {string} uri
* @param {string} query
* @param {boolean} caseSensitive
* @param {boolean} isRegex
@@ -195,6 +203,17 @@
},
/**
+ * @param {string} uri
+ * @param {string} newContent
+ * @param {function(?string)} callback
+ */
+ setFileContent: function(uri, newContent, callback)
+ {
+ this._workspaceProvider.setFileContent(uri, newContent, callback);
+ },
+
+ /**
+ * @param {string} uri
* @param {string} query
* @param {boolean} caseSensitive
* @param {boolean} isRegex
@@ -301,6 +320,18 @@
/**
* @param {WebInspector.UISourceCode} uiSourceCode
+ * @param {string} newContent
+ * @param {function(?string)} callback
+ */
+ setFileContent: function(uiSourceCode, newContent, callback)
+ {
+ if (this._temporaryContentProviders.get(uiSourceCode))
+ return;
+ this._project.setFileContent(uiSourceCode.url, newContent, callback);
+ },
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
* @param {string} query
* @param {boolean} caseSensitive
* @param {boolean} isRegex
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes