Changeset 96519 in webkit


Ignore:
Timestamp:
Oct 3, 2011 11:00:05 AM (13 years ago)
Author:
abarth@webkit.org
Message:

Unreviewed, rolling out r96500.
http://trac.webkit.org/changeset/96500
https://bugs.webkit.org/show_bug.cgi?id=69268

Breaks inspector, change landed with no test. (Requested by
pfeldman on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-10-03

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/front-end/ConsoleMessage.js:

(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):

  • inspector/front-end/ConsoleView.js:

(WebInspector.ConsoleView.prototype._consoleCleared):

  • inspector/front-end/DebuggerPresentationModel.js:

(WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
(WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):

  • inspector/front-end/EventListenersSidebarPane.js:

(WebInspector.EventListenersSidebarPane.prototype.update.callback):
(WebInspector.EventListenersSidebarPane.prototype.update):
():

  • inspector/front-end/Linkifier.js: Removed.
  • inspector/front-end/NetworkPanel.js:

(WebInspector.NetworkLogView):
(WebInspector.NetworkLogView.prototype._reset):
(WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):

  • inspector/front-end/ProfileDataGridTree.js:

(WebInspector.ProfileDataGridNode.prototype.createCell):

  • inspector/front-end/ProfileView.js:

(WebInspector.CPUProfileView):
(WebInspector.CPUProfileView.prototype._resetClicked):

  • inspector/front-end/TimelinePanel.js:

(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype._clearPanel):
(WebInspector.TimelinePanel.FormattedRecord):
(WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
(WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
(WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation):
(WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame):
(WebInspector.TimelinePanel.PopupContentHelper):
(WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow):
(WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/inspector.html:
  • inspector/front-end/inspector.js:
Location:
trunk/Source/WebCore
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r96517 r96519  
     12011-10-03  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r96500.
     4        http://trac.webkit.org/changeset/96500
     5        https://bugs.webkit.org/show_bug.cgi?id=69268
     6
     7        Breaks inspector, change landed with no test. (Requested by
     8        pfeldman on #webkit).
     9
     10        * WebCore.gypi:
     11        * WebCore.vcproj/WebCore.vcproj:
     12        * inspector/front-end/ConsoleMessage.js:
     13        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
     14        * inspector/front-end/ConsoleView.js:
     15        (WebInspector.ConsoleView.prototype._consoleCleared):
     16        * inspector/front-end/DebuggerPresentationModel.js:
     17        (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
     18        (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
     19        * inspector/front-end/EventListenersSidebarPane.js:
     20        (WebInspector.EventListenersSidebarPane.prototype.update.callback):
     21        (WebInspector.EventListenersSidebarPane.prototype.update):
     22        ():
     23        * inspector/front-end/Linkifier.js: Removed.
     24        * inspector/front-end/NetworkPanel.js:
     25        (WebInspector.NetworkLogView):
     26        (WebInspector.NetworkLogView.prototype._reset):
     27        (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
     28        * inspector/front-end/ProfileDataGridTree.js:
     29        (WebInspector.ProfileDataGridNode.prototype.createCell):
     30        * inspector/front-end/ProfileView.js:
     31        (WebInspector.CPUProfileView):
     32        (WebInspector.CPUProfileView.prototype._resetClicked):
     33        * inspector/front-end/TimelinePanel.js:
     34        (WebInspector.TimelinePanel):
     35        (WebInspector.TimelinePanel.prototype._clearPanel):
     36        (WebInspector.TimelinePanel.FormattedRecord):
     37        (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
     38        (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
     39        (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation):
     40        (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame):
     41        (WebInspector.TimelinePanel.PopupContentHelper):
     42        (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow):
     43        (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace):
     44        * inspector/front-end/WebKit.qrc:
     45        * inspector/front-end/inspector.html:
     46        * inspector/front-end/inspector.js:
     47
    1482011-09-30  Antti Koivisto  <antti@apple.com>
    249
  • trunk/Source/WebCore/WebCore.gypi

    r96500 r96519  
    62356235            'inspector/front-end/DebuggerModel.js',
    62366236            'inspector/front-end/DebuggerPresentationModel.js',
    6237             'inspector/front-end/Linkifier.js',
    62386237            'inspector/front-end/DetailedHeapshotGridNodes.js',
    62396238            'inspector/front-end/DetailedHeapshotView.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r96500 r96519  
    6935069350                                </File>
    6935169351                                <File
    69352                                         RelativePath="..\inspector\front-end\Linkifier.js"
    69353                                         >
    69354                                 </File>
    69355                                 <File
    6935669352                                        RelativePath="..\inspector\front-end\MetricsSidebarPane.js"
    6935769353                                        >
  • trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js

    r96500 r96519  
    195195        lineNumber = lineNumber ? lineNumber - 1 : undefined;
    196196        columnNumber = columnNumber ? columnNumber - 1 : 0;
    197         return WebInspector.ConsoleView.linkifier.linkifyLocation(url, lineNumber, columnNumber, "console-message-url");
     197        return WebInspector.debuggerPresentationModel.linkifyLocation(url, lineNumber, columnNumber, "console-message-url");
    198198    },
    199199
  • trunk/Source/WebCore/inspector/front-end/ConsoleView.js

    r96500 r96519  
    110110    WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._consoleMessageAdded, this);
    111111    WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
    112 
    113     WebInspector.ConsoleView.linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
    114112}
    115113
     
    331329
    332330        this.dispatchEventToListeners(WebInspector.ConsoleView.Events.ConsoleCleared);
    333 
    334         WebInspector.ConsoleView.linkifier.reset();
    335331    },
    336332
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r96500 r96519  
    6767
    6868WebInspector.DebuggerPresentationModel.prototype = {
     69    linkifyLocation: function(sourceURL, lineNumber, columnNumber, classes)
     70    {
     71        var linkText = WebInspector.formatLinkText(sourceURL, lineNumber);
     72        var anchor = WebInspector.linkifyURLAsNode(sourceURL, linkText, classes, false);
     73
     74        var rawSourceCode = this._rawSourceCodeForScript(sourceURL);
     75        if (!rawSourceCode) {
     76            anchor.setAttribute("preferred_panel", "resources");
     77            anchor.setAttribute("line_number", lineNumber);
     78            return anchor;
     79        }
     80
     81        function updateAnchor()
     82        {
     83            var uiLocation = rawSourceCode.sourceMapping.rawLocationToUILocation({ lineNumber: lineNumber, columnNumber: columnNumber });
     84            anchor.textContent = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
     85            anchor.setAttribute("preferred_panel", "scripts");
     86            anchor.uiSourceCode = uiLocation.uiSourceCode;
     87            anchor.lineNumber = uiLocation.lineNumber;
     88        }
     89        if (rawSourceCode.sourceMapping)
     90            updateAnchor.call(this);
     91        rawSourceCode.addEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, updateAnchor, this);
     92        return anchor;
     93    },
     94
    6995    _parsedScriptSource: function(event)
    7096    {
  • trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js

    r96500 r96519  
    5757
    5858    this.titleElement.appendChild(this.settingsSelectElement);
    59 
    60     this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
    6159}
    6260
     
    6765    {
    6866        RuntimeAgent.releaseObjectGroup(WebInspector.EventListenersSidebarPane._objectGroupName);
    69         this._linkifier.reset();
    70 
    7167        var body = this.bodyElement;
    7268        body.removeChildren();
     
    8985                var section = sectionMap[type];
    9086                if (!section) {
    91                     section = new WebInspector.EventListenersSection(type, node.id, self._linkifier);
     87                    section = new WebInspector.EventListenersSection(type, node.id);
    9288                    sectionMap[type] = section;
    9389                    sectionNames.push(type);
     
    129125WebInspector.EventListenersSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
    130126
    131 WebInspector.EventListenersSection = function(title, nodeId, linkifier)
     127WebInspector.EventListenersSection = function(title, nodeId)
    132128{
    133129    this.eventListeners = [];
    134130    this._nodeId = nodeId;
    135     this._linkifier = linkifier;
    136131    WebInspector.PropertiesSection.call(this, title);
    137132
     
    164159        for (var i = 0; i < length; ++i) {
    165160            var eventListener = filteredEventListeners[i];
    166             var eventListenerBar = new WebInspector.EventListenerBar(eventListener, this._nodeId, this._linkifier);
     161            var eventListenerBar = new WebInspector.EventListenerBar(eventListener, this._nodeId);
    167162            this.eventBars.appendChild(eventListenerBar.element);
    168163        }
     
    177172WebInspector.EventListenersSection.prototype.__proto__ = WebInspector.PropertiesSection.prototype;
    178173
    179 WebInspector.EventListenerBar = function(eventListener, nodeId, linkifier)
     174WebInspector.EventListenerBar = function(eventListener, nodeId)
    180175{
    181176    this.eventListener = eventListener;
     
    183178    WebInspector.ObjectPropertiesSection.call(this);
    184179    this._setNodeTitle();
    185     this._setFunctionSubtitle(linkifier);
     180    this._setFunctionSubtitle();
    186181    this.editable = false;
    187182    this.element.className = "event-bar"; /* Changed from "section" */
     
    237232    },
    238233
    239     _setFunctionSubtitle: function(linkifier)
     234    _setFunctionSubtitle: function()
    240235    {
    241236        // Requires that Function.toString() return at least the function's signature.
     
    246241            var lineNumber = this.eventListener.location.lineNumber - 1;
    247242            var columnNumber = 0;
    248             var urlElement = linkifier.linkifyLocation(url, lineNumber, columnNumber);
     243            var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(url, lineNumber, columnNumber);
    249244            this.subtitleElement.appendChild(urlElement);
    250245        } else {
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r96500 r96519  
    5757    this._createStatusbarButtons();
    5858    this._createFilterStatusBarItems();
    59     this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
    6059
    6160    WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceStarted, this._onResourceStarted, this);
     
    737736        this._mainResourceLoadTime = -1;
    738737        this._mainResourceDOMContentTime = -1;
    739         this._linkifier.reset();
     738
    740739    },
    741740
     
    20432042                }
    20442043                this._initiatorCell.title = topFrame.url + ":" + topFrame.lineNumber;
    2045                 var urlElement = this._parentView._linkifier.linkifyLocation(topFrame.url, topFrame.lineNumber - 1, 0);
     2044                var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(topFrame.url, topFrame.lineNumber - 1, 0);
    20462045                this._initiatorCell.appendChild(urlElement);
    20472046                this._appendSubtitle(this._initiatorCell, WebInspector.UIString("Script"));
  • trunk/Source/WebCore/inspector/front-end/ProfileDataGridTree.js

    r96500 r96519  
    9999            // FIXME(62725): profileNode should reference a debugger location.
    100100            var lineNumber = this.profileNode.lineNumber ? this.profileNode.lineNumber - 1 : 0;
    101             var urlElement = this.profileView._linkifier.linkifyLocation(this.profileNode.url, lineNumber, 0, "profile-node-file");
     101            var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(this.profileNode.url, lineNumber, 0, "profile-node-file");
    102102            urlElement.style.maxWidth = "75%";
    103103            cell.insertBefore(urlElement, cell.firstChild);
  • trunk/Source/WebCore/inspector/front-end/ProfileView.js

    r96500 r96519  
    9797    }
    9898
    99     this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
    100 
    10199    ProfilerAgent.getProfile(this.profile.typeId, this.profile.uid, profileCallback);
    102100}
     
    488486        this.resetButton.visible = false;
    489487        this.profileDataGridTree.restore();
    490         this._linkiier.reset();
    491488        this.refresh();
    492489        this.refreshVisibleData();
  • trunk/Source/WebCore/inspector/front-end/TimelinePanel.js

    r96500 r96519  
    110110    this._registerShortcuts();
    111111    WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, this._onTimelineEventRecorded, this);
    112     this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
    113112}
    114113
     
    118117
    119118WebInspector.TimelinePanel.prototype = {
    120     _linkifyLocation: function(url, lineNumber, columnNumber)
    121     {
    122         // FIXME(62725): stack trace line/column numbers are one-based.
    123         lineNumber = lineNumber ? lineNumber - 1 : lineNumber;
    124         columnNumber = columnNumber ? columnNumber - 1 : 0;
    125         return this._linkifier.linkifyLocation(url, lineNumber, columnNumber, "timeline-details");
    126     },
    127 
    128     _linkifyCallFrame: function(callFrame)
    129     {
    130         return this._linkifyLocation(callFrame.url, callFrame.lineNumber, callFrame.columnNumber);
    131     },
    132 
    133119    _createTopPane: function() {
    134120        var topPaneElement = document.createElement("div");
     
    543529        this._closeRecordDetails();
    544530        this._model._reset();
    545         this._linkifier.reset();
    546531    },
    547532
     
    977962WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, panel, scriptDetails)
    978963{
    979     this._panel = panel;
    980964    var recordTypes = WebInspector.TimelineAgent.RecordType;
    981965    var style = panel._recordStyles[record.type];
     
    10681052    _generatePopupContent: function(calculator, categories)
    10691053    {
    1070         var contentHelper = new WebInspector.TimelinePanel.PopupContentHelper(this.title, this._panel);
     1054        var contentHelper = new WebInspector.TimelinePanel.PopupContentHelper(this.title);
    10711055
    10721056        if (this._children && this._children.length) {
     
    11531137                return WebInspector.UIString("%s collected", Number.bytesToString(this.data.usedHeapSizeDelta));
    11541138            case WebInspector.TimelineAgent.RecordType.TimerFire:
    1155                 return this.scriptName ? this._panel._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.timerId;
     1139                return this.scriptName ? this._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.timerId;
    11561140            case WebInspector.TimelineAgent.RecordType.FunctionCall:
    1157                 return this.scriptName ? this._panel._linkifyLocation(this.scriptName, this.scriptLine, 0) : null;
     1141                return this.scriptName ? this._linkifyLocation(this.scriptName, this.scriptLine, 0) : null;
    11581142            case WebInspector.TimelineAgent.RecordType.FireAnimationFrameEvent:
    1159                 return this.scriptName ? this._panel._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.id;
     1143                return this.scriptName ? this._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.id;
    11601144            case WebInspector.TimelineAgent.RecordType.EventDispatch:
    11611145                return this.data ? this.data.type : null;
     
    11641148            case WebInspector.TimelineAgent.RecordType.TimerInstall:
    11651149            case WebInspector.TimelineAgent.RecordType.TimerRemove:
    1166                 return this.stackTrace ? this._panel._linkifyCallFrame(this.stackTrace[0]) : this.data.timerId;
     1150                return this.stackTrace ? this._linkifyCallFrame(this.stackTrace[0]) : this.data.timerId;
    11671151            case WebInspector.TimelineAgent.RecordType.RegisterAnimationFrameCallback:
    11681152            case WebInspector.TimelineAgent.RecordType.CancelAnimationFrameCallback:
    1169                 return this.stackTrace ? this._panel._linkifyCallFrame(this.stackTrace[0]) : this.data.id;
     1153                return this.stackTrace ? this._linkifyCallFrame(this.stackTrace[0]) : this.data.id;
    11701154            case WebInspector.TimelineAgent.RecordType.ParseHTML:
    11711155            case WebInspector.TimelineAgent.RecordType.RecalculateStyles:
    1172                 return this.stackTrace ? this._panel._linkifyCallFrame(this.stackTrace[0]) : null;
     1156                return this.stackTrace ? this._linkifyCallFrame(this.stackTrace[0]) : null;
    11731157            case WebInspector.TimelineAgent.RecordType.EvaluateScript:
    1174                 return this.url ? this._panel._linkifyLocation(this.url, this.data.lineNumber, 0) : null;
     1158                return this.url ? this._linkifyLocation(this.url, this.data.lineNumber, 0) : null;
    11751159            case WebInspector.TimelineAgent.RecordType.XHRReadyStateChange:
    11761160            case WebInspector.TimelineAgent.RecordType.XHRLoad:
     
    11881172    },
    11891173
     1174    _linkifyLocation: function(url, lineNumber, columnNumber)
     1175    {
     1176        // FIXME(62725): stack trace line/column numbers are one-based.
     1177        lineNumber = lineNumber ? lineNumber - 1 : lineNumber;
     1178        columnNumber = columnNumber ? columnNumber - 1 : 0;
     1179        return WebInspector.debuggerPresentationModel.linkifyLocation(url, lineNumber, columnNumber, "timeline-details");
     1180    },
     1181
     1182    _linkifyCallFrame: function(callFrame)
     1183    {
     1184        return this._linkifyLocation(callFrame.url, callFrame.lineNumber, callFrame.columnNumber);
     1185    },
     1186
    11901187    _calculateAggregatedStats: function(categories)
    11911188    {
     
    12081205}
    12091206
    1210 WebInspector.TimelinePanel.PopupContentHelper = function(title, panel)
     1207WebInspector.TimelinePanel.PopupContentHelper = function(title)
    12111208{
    1212     this._panel = panel;
    12131209    this._contentTable = document.createElement("table");;
    12141210    var titleCell = this._createCell(WebInspector.UIString("%s - Details", title), "timeline-details-title");
     
    12561252    _appendLinkRow: function(title, scriptName, scriptLine)
    12571253    {
    1258         var link = this._panel._linkifyLocation(scriptName, scriptLine, 0, "timeline-details");
     1254        var link = WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation(scriptName, scriptLine, 0, "timeline-details");
    12591255        this._appendElementRow(title, link);
    12601256    },
     
    12711267            row.appendChild(this._createCell(" @ "));
    12721268            var linkCell = document.createElement("td");
    1273             var urlElement = this._panel._linkifyCallFrame(stackFrame);
     1269            var urlElement = WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame(stackFrame);
    12741270            linkCell.appendChild(urlElement);
    12751271            row.appendChild(linkCell);
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r96500 r96519  
    3737    <file>DebuggerModel.js</file>
    3838    <file>DebuggerPresentationModel.js</file>
    39     <file>Linkifier.js</file>
    4039    <file>DOMAgent.js</file>
    4140    <file>DOMBreakpointsSidebarPane.js</file>
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r96500 r96519  
    159159    <script type="text/javascript" src="DebuggerModel.js"></script>
    160160    <script type="text/javascript" src="DebuggerPresentationModel.js"></script>
    161     <script type="text/javascript" src="Linkifier.js"></script>
    162161    <script type="text/javascript" src="BreakpointManager.js"></script>
    163162    <script type="text/javascript" src="UISourceCode.js"></script>
  • trunk/Source/WebCore/inspector/front-end/inspector.js

    r96500 r96519  
    510510    this.console.addEventListener(WebInspector.ConsoleModel.Events.RepeatCountUpdated, this._updateErrorAndWarningCounts, this);
    511511
    512     this.debuggerModel = new WebInspector.DebuggerModel();
    513     this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel();
    514 
    515512    this.drawer = new WebInspector.Drawer();
    516513    this.consoleView = new WebInspector.ConsoleView();
     
    525522
    526523    this.cssModel = new WebInspector.CSSStyleModel();
     524    this.debuggerModel = new WebInspector.DebuggerModel();
     525    this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel();
    527526
    528527    this.searchController = new WebInspector.SearchController();
Note: See TracChangeset for help on using the changeset viewer.