Changeset 88931 in webkit


Ignore:
Timestamp:
Jun 15, 2011 7:57:39 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

2011-06-15 Sheriff Bot <webkit.review.bot@gmail.com>

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 Sheriff Bot <webkit.review.bot@gmail.com>

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):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r88930 r88931  
     12011-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r88916.
     4        http://trac.webkit.org/changeset/88916
     5        https://bugs.webkit.org/show_bug.cgi?id=62728
     6
     7        Broke a bunch of layout tests on chromium (Requested by
     8        podivilov on #webkit).
     9
     10        * inspector/debugger/scripts-panel-expected.txt:
     11        * inspector/debugger/scripts-panel.html:
     12
    1132011-06-15  Stephen White  <senorblanco@chromium.org>
    214
  • trunk/LayoutTests/inspector/debugger/scripts-panel-expected.txt

    r88916 r88931  
    1111
    1212Running: testFilesSelect
    13 text: ?a=b, tooltip: ?a=b
    14 text: example.com/, tooltip: http://example.com/?a=b
    15 text: script.js, tooltip: <root>/foo/bar/script.js
    16 text: script.js, tooltip: <root>/foo/bar/script.js?a=1
    17 text: script.js, tooltip: <root>/foo/bar/script.js?a=2
    18 text: script.js, tooltip: <root>/foo/baz/script.js
    19 text: very_loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..., tooltip: very_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_url
    20 text: Content scripts, tooltip:
    21 text: contentScript.js, tooltip: <root>/foo/bar/contentScript.js?a=1
    22 text: contentScript.js, tooltip: <root>/foo/bar/contentScript.js?a=2
    23 text: contentScript2.js, tooltip: <root>/foo/bar/contentScript2.js?a=1
     13text: script.js, tooltip: ...foo/bar/script.js
     14text: script.js, tooltip: ...foo/bar/script.js?a=1
     15text: script.js, tooltip: ...foo/bar/script.js?a=2
     16text: script.js, tooltip: ...foo/baz/script.js
     17text: Content scripts, tooltip: ...
     18text: contentScript.js, tooltip: ...foo/bar/contentScript.js?a=1
     19text: contentScript.js, tooltip: ...foo/bar/contentScript.js?a=2
     20text: contentScript2.js, tooltip: ...foo/bar/contentScript2.js?a=1
    2421Debugger was disabled.
    2522
  • trunk/LayoutTests/inspector/debugger/scripts-panel.html

    r88916 r88931  
    130130            var rootURL = WebInspector.mainResource.url.substring(0, WebInspector.mainResource.url.lastIndexOf("/") + 1);
    131131            var nextId = 0;
     132
    132133            function addOption(url, isContentScript)
    133134            {
    134                 panel._addOptionToFilesSelect({ id: nextId++, url: url, isContentScript: isContentScript });
     135                var displayName = url;
     136                var indexOfQuery = displayName.indexOf("?");
     137                if (indexOfQuery !== -1)
     138                    displayName = displayName.substring(0, indexOfQuery);
     139                var lastSlashIndex = displayName.lastIndexOf("/");
     140                if (lastSlashIndex !== -1)
     141                    displayName = displayName.substring(lastSlashIndex + 1);
     142                panel._addOptionToFilesSelect({ id: nextId++, url: rootURL + url, displayName: displayName, isContentScript: isContentScript });
    135143            }
    136             addOption(rootURL + "foo/bar/script.js", false);
    137             addOption(rootURL + "foo/bar/contentScript2.js?a=1", true);
    138             addOption(rootURL + "foo/bar/script.js?a=2", false);
    139             addOption(rootURL + "foo/bar/contentScript.js?a=2", true);
    140             addOption(rootURL + "foo/bar/script.js?a=1", false);
    141             addOption(rootURL + "foo/baz/script.js", false);
    142             addOption(rootURL + "foo/bar/contentScript.js?a=1", true);
    143             addOption("http://example.com/?a=b", false);
    144             addOption("?a=b", false);
    145             addOption("very_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_url", false);
    146 
     144            addOption("foo/bar/script.js", false);
     145            addOption("foo/bar/contentScript2.js?a=1", true);
     146            addOption("foo/bar/script.js?a=2", false);
     147            addOption("foo/bar/contentScript.js?a=2", true);
     148            addOption("foo/bar/script.js?a=1", false);
     149            addOption("foo/baz/script.js", false);
     150            addOption("foo/bar/contentScript.js?a=1", true);
    147151            var select = panel._filesSelectElement;
    148152            for (var i = 0; i < select.length; ++i) {
    149153                var option = select[i];
    150                 var tooltip = option.title.replace(rootURL, "<root>/");
     154                var tooltip = "..." + option.title.substring(rootURL.length);
    151155                InspectorTest.addResult("text: " + option.text + ", tooltip: " + tooltip);
    152156            }
  • trunk/Source/WebCore/ChangeLog

    r88927 r88931  
     12011-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r88916.
     4        http://trac.webkit.org/changeset/88916
     5        https://bugs.webkit.org/show_bug.cgi?id=62728
     6
     7        Broke a bunch of layout tests on chromium (Requested by
     8        podivilov on #webkit).
     9
     10        * inspector/front-end/ScriptsPanel.js:
     11        (WebInspector.ScriptsPanel.prototype._createSourceFrame):
     12        (WebInspector.SourceFrameDelegateForScriptsPanel):
     13        (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
     14        * inspector/front-end/SourceFile.js:
     15        (WebInspector.SourceFile.prototype.get displayName):
     16
    1172011-06-15  Pavel Podivilov  <podivilov@chromium.org>
    218
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r88927 r88931  
    253253        var select = this._filesSelectElement;
    254254        var option = document.createElement("option");
    255         option.text = this._displayNameForScriptURL(sourceFile.url) || WebInspector.UIString("(program)");
     255        option.text = sourceFile.displayName;
    256256        option.title = sourceFile.url;
    257257        option.isContentScript = sourceFile.isContentScript;
     
    291291        option._sourceFileId = sourceFile.id;
    292292        this._sourceFileIdToFilesSelectOption[sourceFile.id] = option;
    293     },
    294 
    295     _displayNameForScriptURL: function(url)
    296     {
    297         var displayName = url;
    298         var indexOfQuery = displayName.indexOf("?");
    299         if (indexOfQuery > 0)
    300             displayName = displayName.substring(0, indexOfQuery);
    301         var fromIndex = displayName.lastIndexOf("/", displayName.length - 2);
    302         if (fromIndex !== -1)
    303             displayName = displayName.substring(fromIndex + 1);
    304         WebInspector.log(displayName.length);
    305         if (displayName.length > 100)
    306             displayName = displayName.substring(0, 80) + "...";
    307         return displayName;
    308293    },
    309294
     
    606591    {
    607592        var sourceFile = this._presentationModel.sourceFile(sourceFileId);
    608         var delegate = new WebInspector.SourceFrameDelegateForScriptsPanel(this._presentationModel, sourceFileId);
     593        var delegate = new WebInspector.SourceFrameDelegateForScriptsPanel(this._presentationModel, sourceFileId, sourceFile.displayName);
    609594        var sourceFrame = new WebInspector.SourceFrame(delegate, sourceFile.url);
    610595        sourceFrame._sourceFileId = sourceFileId;
     
    10711056
    10721057
    1073 WebInspector.SourceFrameDelegateForScriptsPanel = function(model, sourceFileId)
     1058WebInspector.SourceFrameDelegateForScriptsPanel = function(model, sourceFileId, scriptName)
    10741059{
    10751060    WebInspector.SourceFrameDelegate.call(this);
     
    10771062    this._sourceFileId = sourceFileId;
    10781063    this._popoverObjectGroup = "popover";
     1064    this._scriptName = scriptName;
    10791065}
    10801066
     
    11501136    suggestedFileName: function()
    11511137    {
    1152         var sourceFile = this._model.sourceFile(this._sourceFileId);
    1153         return WebInspector.panels.scripts._displayNameForScriptURL(sourceFile.url) || "untitled.js";
     1138        return this._scriptName;
    11541139    }
    11551140}
  • trunk/Source/WebCore/inspector/front-end/SourceFile.js

    r88916 r88931  
    6464    },
    6565
     66    get displayName()
     67    {
     68        return this.url ? WebInspector.displayNameForURL(this.url) : WebInspector.UIString("(program)");
     69    },
     70
    6671    get content()
    6772    {
Note: See TracChangeset for help on using the changeset viewer.