Changeset 121855 in webkit
- Timestamp:
- Jul 4, 2012 8:14:01 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121853 r121855 1 2012-07-04 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: UISourceCode should take care of adding revision after committing working copy. 4 https://bugs.webkit.org/show_bug.cgi?id=90549 5 6 Reviewed by Pavel Feldman. 7 8 Revision is now added in UISourceCode.commitWorkingCopy synchronously even if saving to JS VM or CSS model failed. 9 10 * inspector/front-end/CSSStyleModel.js: 11 (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent): 12 * inspector/front-end/ExtensionServer.js: 13 (WebInspector.ExtensionServer.prototype._handleOpenURL): 14 (WebInspector.ExtensionServer.prototype._onGetResourceContent): 15 (WebInspector.ExtensionServer.prototype._onSetResourceContent): 16 * inspector/front-end/JavaScriptSource.js: 17 (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): 18 * inspector/front-end/StylesPanel.js: 19 (WebInspector.StyleSource.prototype._callOrSetTimeout): 20 * inspector/front-end/UISourceCode.js: 21 (WebInspector.UISourceCode.prototype.commitWorkingCopy): 22 * inspector/front-end/Workspace.js: 23 (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodeForURL): 24 1 25 2012-07-04 Pavel Feldman <pfeldman@chromium.org> 2 26 -
trunk/Source/WebCore/inspector/front-end/CSSStyleModel.js
r121850 r121855 956 956 var resource = styleSource.resource(); 957 957 if (this._styleSheetIdForResource(resource)) { 958 this._innerSetContent(resource, content, majorChange, innerCallback, null);958 this._innerSetContent(resource, content, majorChange, userCallback, null); 959 959 return; 960 960 } 961 this._loadStyleSheetHeaders(this._innerSetContent.bind(this, resource, content, majorChange, innerCallback)); 962 963 function innerCallback(error) 964 { 965 if (error) { 966 userCallback(error); 967 return; 968 } 969 970 if (majorChange) 971 resource.addRevision(content); 972 973 userCallback(null); 974 } 961 this._loadStyleSheetHeaders(this._innerSetContent.bind(this, resource, content, majorChange, userCallback)); 975 962 }, 976 963 -
trunk/Source/WebCore/inspector/front-end/ExtensionServer.js
r121792 r121855 291 291 _handleOpenURL: function(port, details) 292 292 { 293 var url = /** @type { String} */ details.url;293 var url = /** @type {string} */ details.url; 294 294 var contentProvider = WebInspector.workspace.uiSourceCodeForURL(url) || WebInspector.resourceForURL(url); 295 295 if (!contentProvider) … … 483 483 _onGetResourceContent: function(message, port) 484 484 { 485 var url = /** @type { String} */ message.url;485 var url = /** @type {string} */ message.url; 486 486 var contentProvider = WebInspector.workspace.uiSourceCodeForURL(url) || WebInspector.resourceForURL(url); 487 487 if (!contentProvider) … … 501 501 } 502 502 503 var url = /** @type { String} */ message.url;503 var url = /** @type {string} */ message.url; 504 504 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(url); 505 505 if (!uiSourceCode) { … … 513 513 uiSourceCode.commitWorkingCopy(callbackWrapper.bind(this)); 514 514 else 515 callbackWrapper.call(this );515 callbackWrapper.call(this, null); 516 516 }, 517 517 -
trunk/Source/WebCore/inspector/front-end/JavaScriptSource.js
r121850 r121855 208 208 } 209 209 210 this._setScriptSource(this.workingCopy(), innerCallback.bind(this));211 },212 213 /**214 * @param {string} newSource215 * @param {function(?Protocol.Error)} callback216 */217 _setScriptSource: function(newSource, callback)218 {219 210 var rawLocation = this.uiLocationToRawLocation(0, 0); 220 211 var script = WebInspector.debuggerModel.scriptForId(rawLocation.scriptId); 221 222 /** 223 * @this {WebInspector.JavaScriptSource} 224 * @param {?Protocol.Error} error 225 */ 226 function didEditScriptSource(error) 227 { 228 if (error) { 229 callback(error); 230 return; 231 } 232 233 var resource = this.resource(); 234 if (resource) 235 resource.addRevision(newSource); 236 237 callback(null); 238 } 239 WebInspector.debuggerModel.setScriptSource(script.scriptId, newSource, didEditScriptSource.bind(this)); 212 WebInspector.debuggerModel.setScriptSource(script.scriptId, this.workingCopy(), innerCallback.bind(this)); 240 213 }, 241 214 -
trunk/Source/WebCore/inspector/front-end/StylesPanel.js
r121850 r121855 131 131 this._incrementalUpdateTimer = setTimeout(callback, WebInspector.StyleSource.updateTimeout); 132 132 else 133 callback( );133 callback(null); 134 134 }, 135 135 -
trunk/Source/WebCore/inspector/front-end/UISourceCode.js
r121850 r121855 202 202 { 203 203 if (!this.isDirty()) { 204 callback( )204 callback(null); 205 205 return; 206 206 } 207 207 208 /**209 * @param {?string} error210 */211 function innerCallback(error)212 {213 delete this._committingWorkingCopy;214 this.contentChanged(newContent, this._mimeType);215 callback(error);216 }217 218 208 var newContent = this._workingCopy; 219 209 this._committingWorkingCopy = true; 220 this.workingCopyCommitted(innerCallback.bind(this)); 210 this.workingCopyCommitted(callback); 211 if (this.resource()) 212 this.resource().addRevision(newContent); 213 delete this._committingWorkingCopy; 214 this.contentChanged(newContent, this._mimeType); 215 221 216 }, 222 217 -
trunk/Source/WebCore/inspector/front-end/Workspace.js
r121850 r121855 77 77 78 78 /** 79 * @param { String} url80 * @return { WebInspector.UISourceCode}79 * @param {string} url 80 * @return {?WebInspector.UISourceCode} 81 81 */ 82 82 uiSourceCodeForURL: function(url) … … 89 89 } 90 90 } 91 return null; 91 92 }, 92 93
Note: See TracChangeset
for help on using the changeset viewer.