Changeset 121955 in webkit
- Timestamp:
- Jul 6, 2012 5:14:24 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121953 r121955 1 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Implement snippets removing. 4 https://bugs.webkit.org/show_bug.cgi?id=90674 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/front-end/NavigatorView.js: 9 (WebInspector.NavigatorView.prototype.rename.afterEditing): 10 * inspector/front-end/ScriptsNavigator.js: 11 (WebInspector.ScriptsNavigator.prototype.removeUISourceCode): 12 (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet): 13 * inspector/front-end/ScriptsPanel.js: 14 (WebInspector.ScriptsPanel.prototype._addUISourceCode): 15 (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): 16 (WebInspector.ScriptsPanel.prototype._revealExecutionLine): 17 * inspector/front-end/TabbedEditorContainer.js: 18 1 19 2012-07-06 'Pavel Feldman' <pfeldman@chromium.org> 2 20 -
trunk/Source/WebCore/inspector/front-end/NavigatorView.js
r119905 r121955 162 162 if (this._lastSelectedUISourceCode === oldUISourceCode) 163 163 selected = true; 164 this. _removeUISourceCode(oldUISourceCode);164 this.removeUISourceCode(oldUISourceCode); 165 165 } 166 166 … … 186 186 * @param {WebInspector.UISourceCode} uiSourceCode 187 187 */ 188 _removeUISourceCode: function(uiSourceCode)188 removeUISourceCode: function(uiSourceCode) 189 189 { 190 190 var treeElement = this._scriptTreeElementsByUISourceCode.get(uiSourceCode); … … 253 253 254 254 // Tree outline should be marked as edited as well as the tree element to prevent search from starting. 255 WebInspector.markBeingEdited(scriptTreeElement.treeOutline.element, true); 255 var treeOutlineElement = scriptTreeElement.treeOutline.element 256 WebInspector.markBeingEdited(treeOutlineElement, true); 256 257 257 258 function commitHandler(element, newTitle, oldTitle) … … 274 275 function afterEditing(committed) 275 276 { 276 WebInspector.markBeingEdited( scriptTreeElement.treeOutline.element, false);277 WebInspector.markBeingEdited(treeOutlineElement, false); 277 278 if (callback) 278 279 callback(committed); -
trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js
r121673 r121955 99 99 /** 100 100 * @param {WebInspector.UISourceCode} uiSourceCode 101 */ 102 removeUISourceCode: function(uiSourceCode) 103 { 104 this._snippetsNavigatorViewForUISourceCode(uiSourceCode).removeUISourceCode(uiSourceCode); 105 }, 106 107 /** 108 * @param {WebInspector.UISourceCode} uiSourceCode 101 109 * @return {boolean} 102 110 */ … … 254 262 _handleRemoveSnippet: function(uiSourceCode, event) 255 263 { 256 // FIXME: To be implemented. 264 if (!uiSourceCode.isSnippet) 265 return; 266 var snippetJavaScriptSource = /** @type {WebInspector.SnippetJavaScriptSource} */ uiSourceCode; 267 WebInspector.scriptSnippetModel.deleteScriptSnippet(snippetJavaScriptSource); 257 268 }, 258 269 -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r121949 r121955 257 257 { 258 258 this._navigator.addUISourceCode(uiSourceCode); 259 this._editorContainer. uiSourceCodeAdded(uiSourceCode);259 this._editorContainer.addUISourceCode(uiSourceCode); 260 260 }, 261 261 … … 263 263 { 264 264 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; 265 this._editorContainer.removeUISourceCode(uiSourceCode); 266 this._navigator.removeUISourceCode(uiSourceCode); 265 267 this._removeSourceFrame(uiSourceCode); 266 268 }, … … 543 545 { 544 546 // Some scripts (anonymous and snippets evaluations) are not added to files select by default. 545 this._editorContainer. uiSourceCodeAdded(uiLocation.uiSourceCode);547 this._editorContainer.addUISourceCode(uiLocation.uiSourceCode); 546 548 var sourceFrame = this._showFile(uiLocation.uiSourceCode); 547 549 sourceFrame.revealLine(uiLocation.lineNumber); -
trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js
r121750 r121955 191 191 * @param {WebInspector.UISourceCode} uiSourceCode 192 192 */ 193 uiSourceCodeAdded: function(uiSourceCode)193 addUISourceCode: function(uiSourceCode) 194 194 { 195 195 if (this._userSelectedFiles || this._loadedURLs[uiSourceCode.url]) … … 207 207 this._innerShowFile(uiSourceCode, false); 208 208 }, 209 209 210 /** 211 * @param {WebInspector.UISourceCode} uiSourceCode 212 */ 213 removeUISourceCode: function(uiSourceCode) 214 { 215 var tabId = this._tabIds.get(uiSourceCode); 216 if (tabId) 217 this._tabbedPane.closeTab(tabId); 218 }, 219 210 220 /** 211 221 * @param {WebInspector.UISourceCode} uiSourceCode … … 273 283 uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ContentChanged, this._uiSourceCodeContentChanged, this); 274 284 return tabId; 275 },276 277 /**278 * @param {WebInspector.UISourceCode} uiSourceCode279 */280 _removeFileTab: function(uiSourceCode)281 {282 var tabId = this._tabIds.get(uiSourceCode);283 284 if (tabId)285 this._tabbedPane.closeTab(tabId);286 285 }, 287 286
Note: See TracChangeset
for help on using the changeset viewer.