Diff
Modified: trunk/LayoutTests/ChangeLog (88930 => 88931)
--- trunk/LayoutTests/ChangeLog 2011-06-15 14:55:33 UTC (rev 88930)
+++ trunk/LayoutTests/ChangeLog 2011-06-15 14:57:39 UTC (rev 88931)
@@ -1,3 +1,15 @@
+2011-06-15 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r88916.
+ http://trac.webkit.org/changeset/88916
+ https://bugs.webkit.org/show_bug.cgi?id=62728
+
+ Broke a bunch of layout tests on chromium (Requested by
+ podivilov on #webkit).
+
+ * inspector/debugger/scripts-panel-expected.txt:
+ * inspector/debugger/scripts-panel.html:
+
2011-06-15 Stephen White <[email protected]>
Unreviewed; chromium test expectations update.
Modified: trunk/LayoutTests/inspector/debugger/scripts-panel-expected.txt (88930 => 88931)
--- trunk/LayoutTests/inspector/debugger/scripts-panel-expected.txt 2011-06-15 14:55:33 UTC (rev 88930)
+++ trunk/LayoutTests/inspector/debugger/scripts-panel-expected.txt 2011-06-15 14:57:39 UTC (rev 88931)
@@ -10,16 +10,13 @@
Page reloaded.
Running: testFilesSelect
-text: ?a=b, tooltip: ?a=b
-text: example.com/, tooltip: http://example.com/?a=b
-text: script.js, tooltip: <root>/foo/bar/script.js
-text: script.js, tooltip: <root>/foo/bar/script.js?a=1
-text: script.js, tooltip: <root>/foo/bar/script.js?a=2
-text: script.js, tooltip: <root>/foo/baz/script.js
-text: very_loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..., tooltip: very_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_url
-text: Content scripts, tooltip:
-text: contentScript.js, tooltip: <root>/foo/bar/contentScript.js?a=1
-text: contentScript.js, tooltip: <root>/foo/bar/contentScript.js?a=2
-text: contentScript2.js, tooltip: <root>/foo/bar/contentScript2.js?a=1
+text: script.js, tooltip: ...foo/bar/script.js
+text: script.js, tooltip: ...foo/bar/script.js?a=1
+text: script.js, tooltip: ...foo/bar/script.js?a=2
+text: script.js, tooltip: ...foo/baz/script.js
+text: Content scripts, tooltip: ...
+text: contentScript.js, tooltip: ...foo/bar/contentScript.js?a=1
+text: contentScript.js, tooltip: ...foo/bar/contentScript.js?a=2
+text: contentScript2.js, tooltip: ...foo/bar/contentScript2.js?a=1
Debugger was disabled.
Modified: trunk/LayoutTests/inspector/debugger/scripts-panel.html (88930 => 88931)
--- trunk/LayoutTests/inspector/debugger/scripts-panel.html 2011-06-15 14:55:33 UTC (rev 88930)
+++ trunk/LayoutTests/inspector/debugger/scripts-panel.html 2011-06-15 14:57:39 UTC (rev 88931)
@@ -129,25 +129,29 @@
var panel = new WebInspector.ScriptsPanel();
var rootURL = WebInspector.mainResource.url.substring(0, WebInspector.mainResource.url.lastIndexOf("/") + 1);
var nextId = 0;
+
function addOption(url, isContentScript)
{
- panel._addOptionToFilesSelect({ id: nextId++, url: url, isContentScript: isContentScript });
+ var displayName = url;
+ var indexOfQuery = displayName.indexOf("?");
+ if (indexOfQuery !== -1)
+ displayName = displayName.substring(0, indexOfQuery);
+ var lastSlashIndex = displayName.lastIndexOf("/");
+ if (lastSlashIndex !== -1)
+ displayName = displayName.substring(lastSlashIndex + 1);
+ panel._addOptionToFilesSelect({ id: nextId++, url: rootURL + url, displayName: displayName, isContentScript: isContentScript });
}
- addOption(rootURL + "foo/bar/script.js", false);
- addOption(rootURL + "foo/bar/contentScript2.js?a=1", true);
- addOption(rootURL + "foo/bar/script.js?a=2", false);
- addOption(rootURL + "foo/bar/contentScript.js?a=2", true);
- addOption(rootURL + "foo/bar/script.js?a=1", false);
- addOption(rootURL + "foo/baz/script.js", false);
- addOption(rootURL + "foo/bar/contentScript.js?a=1", true);
- addOption("http://example.com/?a=b", false);
- addOption("?a=b", false);
- addOption("very_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_url", false);
-
+ addOption("foo/bar/script.js", false);
+ addOption("foo/bar/contentScript2.js?a=1", true);
+ addOption("foo/bar/script.js?a=2", false);
+ addOption("foo/bar/contentScript.js?a=2", true);
+ addOption("foo/bar/script.js?a=1", false);
+ addOption("foo/baz/script.js", false);
+ addOption("foo/bar/contentScript.js?a=1", true);
var select = panel._filesSelectElement;
for (var i = 0; i < select.length; ++i) {
var option = select[i];
- var tooltip = option.title.replace(rootURL, "<root>/");
+ var tooltip = "..." + option.title.substring(rootURL.length);
InspectorTest.addResult("text: " + option.text + ", tooltip: " + tooltip);
}
next();
Modified: trunk/Source/WebCore/ChangeLog (88930 => 88931)
--- trunk/Source/WebCore/ChangeLog 2011-06-15 14:55:33 UTC (rev 88930)
+++ trunk/Source/WebCore/ChangeLog 2011-06-15 14:57:39 UTC (rev 88931)
@@ -1,3 +1,19 @@
+2011-06-15 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r88916.
+ http://trac.webkit.org/changeset/88916
+ https://bugs.webkit.org/show_bug.cgi?id=62728
+
+ Broke a bunch of layout tests on chromium (Requested by
+ podivilov on #webkit).
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._createSourceFrame):
+ (WebInspector.SourceFrameDelegateForScriptsPanel):
+ (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
+ * inspector/front-end/SourceFile.js:
+ (WebInspector.SourceFile.prototype.get displayName):
+
2011-06-15 Pavel Podivilov <[email protected]>
Reviewed by Yury Semikhatsky.
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (88930 => 88931)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2011-06-15 14:55:33 UTC (rev 88930)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2011-06-15 14:57:39 UTC (rev 88931)
@@ -252,7 +252,7 @@
{
var select = this._filesSelectElement;
var option = document.createElement("option");
- option.text = this._displayNameForScriptURL(sourceFile.url) || WebInspector.UIString("(program)");
+ option.text = sourceFile.displayName;
option.title = sourceFile.url;
option.isContentScript = sourceFile.isContentScript;
if (sourceFile.isContentScript)
@@ -292,21 +292,6 @@
this._sourceFileIdToFilesSelectOption[sourceFile.id] = option;
},
- _displayNameForScriptURL: function(url)
- {
- var displayName = url;
- var indexOfQuery = displayName.indexOf("?");
- if (indexOfQuery > 0)
- displayName = displayName.substring(0, indexOfQuery);
- var fromIndex = displayName.lastIndexOf("/", displayName.length - 2);
- if (fromIndex !== -1)
- displayName = displayName.substring(fromIndex + 1);
- WebInspector.log(displayName.length);
- if (displayName.length > 100)
- displayName = displayName.substring(0, 80) + "...";
- return displayName;
- },
-
setScriptSourceIsBeingEdited: function(sourceFileId, inEditMode)
{
var option = this._sourceFileIdToFilesSelectOption[sourceFileId];
@@ -605,7 +590,7 @@
_createSourceFrame: function(sourceFileId)
{
var sourceFile = this._presentationModel.sourceFile(sourceFileId);
- var delegate = new WebInspector.SourceFrameDelegateForScriptsPanel(this._presentationModel, sourceFileId);
+ var delegate = new WebInspector.SourceFrameDelegateForScriptsPanel(this._presentationModel, sourceFileId, sourceFile.displayName);
var sourceFrame = new WebInspector.SourceFrame(delegate, sourceFile.url);
sourceFrame._sourceFileId = sourceFileId;
sourceFrame.addEventListener(WebInspector.SourceFrame.Events.Loaded, this._sourceFrameLoaded, this);
@@ -1070,12 +1055,13 @@
WebInspector.ScriptsPanel.prototype.__proto__ = WebInspector.Panel.prototype;
-WebInspector.SourceFrameDelegateForScriptsPanel = function(model, sourceFileId)
+WebInspector.SourceFrameDelegateForScriptsPanel = function(model, sourceFileId, scriptName)
{
WebInspector.SourceFrameDelegate.call(this);
this._model = model;
this._sourceFileId = sourceFileId;
this._popoverObjectGroup = "popover";
+ this._scriptName = scriptName;
}
WebInspector.SourceFrameDelegateForScriptsPanel.prototype = {
@@ -1149,8 +1135,7 @@
suggestedFileName: function()
{
- var sourceFile = this._model.sourceFile(this._sourceFileId);
- return WebInspector.panels.scripts._displayNameForScriptURL(sourceFile.url) || "untitled.js";
+ return this._scriptName;
}
}
Modified: trunk/Source/WebCore/inspector/front-end/SourceFile.js (88930 => 88931)
--- trunk/Source/WebCore/inspector/front-end/SourceFile.js 2011-06-15 14:55:33 UTC (rev 88930)
+++ trunk/Source/WebCore/inspector/front-end/SourceFile.js 2011-06-15 14:57:39 UTC (rev 88931)
@@ -63,6 +63,11 @@
this._requestContent();
},
+ get displayName()
+ {
+ return this.url ? WebInspector.displayNameForURL(this.url) : WebInspector.UIString("(program)");
+ },
+
get content()
{
return this._content;