Diff
Modified: trunk/LayoutTests/ChangeLog (144462 => 144463)
--- trunk/LayoutTests/ChangeLog 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/LayoutTests/ChangeLog 2013-03-01 17:06:34 UTC (rev 144463)
@@ -1,3 +1,12 @@
+2013-03-01 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: [Regression] Snippets renaming is broken.
+ https://bugs.webkit.org/show_bug.cgi?id=111181
+
+ Reviewed by Alexander Pavlov.
+
+ * inspector/debugger/script-snippet-model.html:
+
2013-03-01 Ádám Kallai <[email protected]>
[Qt] Unreviewed gardening.
Modified: trunk/LayoutTests/inspector/debugger/script-snippet-model.html (144462 => 144463)
--- trunk/LayoutTests/inspector/debugger/script-snippet-model.html 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/LayoutTests/inspector/debugger/script-snippet-model.html 2013-03-01 17:06:34 UTC (rev 144463)
@@ -26,6 +26,7 @@
var snippetName = "TestSnippet" + Math.random();
InspectorTest.addResult("Snippet created.");
WebInspector.scriptSnippetModel.renameScriptSnippet(uiSourceCode, snippetName);
+ uiSourceCode.rename(snippetName);
InspectorTest.assertEquals(1, workspace.uiSourceCodes().length, "Only one snippet uiSourceCode should be present.");
var uiSourceCode = workspace.uiSourceCodes()[0];
if (uiSourceCode.originURL().indexOf(snippetName) === -1)
@@ -40,6 +41,7 @@
var uiSourceCode1 = WebInspector.scriptSnippetModel.createScriptSnippet();
WebInspector.scriptSnippetModel.renameScriptSnippet(uiSourceCode1, "Snippet1");
+ uiSourceCode1.rename("Snippet1");
var content = "";
content += "// This snippet does nothing.\n";
content += "var i = 2+2;\n";
@@ -47,6 +49,7 @@
var uiSourceCode2 = WebInspector.scriptSnippetModel.createScriptSnippet();
WebInspector.scriptSnippetModel.renameScriptSnippet(uiSourceCode2, "Snippet2");
+ uiSourceCode2.rename("Snippet2");
content = "";
content += "// This snippet creates a function that does nothing and returns it.\n";
content += "function doesNothing() {\n";
Modified: trunk/Source/WebCore/ChangeLog (144462 => 144463)
--- trunk/Source/WebCore/ChangeLog 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/Source/WebCore/ChangeLog 2013-03-01 17:06:34 UTC (rev 144463)
@@ -1,3 +1,17 @@
+2013-03-01 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: [Regression] Snippets renaming is broken.
+ https://bugs.webkit.org/show_bug.cgi?id=111181
+
+ Reviewed by Alexander Pavlov.
+
+ * inspector/front-end/NavigatorView.js:
+ * inspector/front-end/ScriptSnippetModel.js:
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
+ * inspector/front-end/UISourceCode.js:
+ (WebInspector.UISourceCode.prototype.rename):
+
2013-03-01 David Hyatt <[email protected]>
Fix a misspelled word in RenderObject.h. staticly -> statically.
Modified: trunk/Source/WebCore/inspector/front-end/NavigatorView.js (144462 => 144463)
--- trunk/Source/WebCore/inspector/front-end/NavigatorView.js 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/Source/WebCore/inspector/front-end/NavigatorView.js 2013-03-01 17:06:34 UTC (rev 144463)
@@ -236,7 +236,7 @@
*/
rename: function(uiSourceCode, callback)
{
- var scriptTreeElement = this._getScriptTreeElement[uiSourceCode.uri()];
+ var scriptTreeElement = this._getScriptTreeElement(uiSourceCode);
if (!scriptTreeElement)
return;
Modified: trunk/Source/WebCore/inspector/front-end/ScriptSnippetModel.js (144462 => 144463)
--- trunk/Source/WebCore/inspector/front-end/ScriptSnippetModel.js 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/Source/WebCore/inspector/front-end/ScriptSnippetModel.js 2013-03-01 17:06:34 UTC (rev 144463)
@@ -119,7 +119,6 @@
return;
snippet.name = newName;
this._restoreBreakpoints(uiSourceCode, breakpointLocations);
- uiSourceCode.urlChanged(snippet.name);
},
/**
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (144462 => 144463)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-03-01 17:06:34 UTC (rev 144463)
@@ -1031,6 +1031,7 @@
if (uiSourceCode.project().type() !== WebInspector.projectTypes.Snippets)
return;
WebInspector.scriptSnippetModel.renameScriptSnippet(uiSourceCode, name);
+ uiSourceCode.rename(name);
},
/**
Modified: trunk/Source/WebCore/inspector/front-end/UISourceCode.js (144462 => 144463)
--- trunk/Source/WebCore/inspector/front-end/UISourceCode.js 2013-03-01 17:04:13 UTC (rev 144462)
+++ trunk/Source/WebCore/inspector/front-end/UISourceCode.js 2013-03-01 17:06:34 UTC (rev 144463)
@@ -132,12 +132,15 @@
},
/**
- * @param {string} url
+ * @param {string} newName
*/
- urlChanged: function(url)
+ rename: function(newName)
{
- this._url = url;
- this._originURL = url;
+ if (!this._path.length)
+ return;
+ this._path[this._path.length - 1] = newName;
+ this._url = newName;
+ this._originURL = newName;
this.dispatchEventToListeners(WebInspector.UISourceCode.Events.TitleChanged, null);
},