Diff
Modified: trunk/Source/WebCore/ChangeLog (96518 => 96519)
--- trunk/Source/WebCore/ChangeLog 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/ChangeLog 2011-10-03 18:00:05 UTC (rev 96519)
@@ -1,3 +1,50 @@
+2011-10-03 Sheriff Bot <[email protected]>
+
+ 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).
+
+ * 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:
+
2011-09-30 Antti Koivisto <[email protected]>
Add exact match attribute selectors to the fast path
Modified: trunk/Source/WebCore/WebCore.gypi (96518 => 96519)
--- trunk/Source/WebCore/WebCore.gypi 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/WebCore.gypi 2011-10-03 18:00:05 UTC (rev 96519)
@@ -6234,7 +6234,6 @@
'inspector/front-end/DataGrid.js',
'inspector/front-end/DebuggerModel.js',
'inspector/front-end/DebuggerPresentationModel.js',
- 'inspector/front-end/Linkifier.js',
'inspector/front-end/DetailedHeapshotGridNodes.js',
'inspector/front-end/DetailedHeapshotView.js',
'inspector/front-end/DOMAgent.js',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (96518 => 96519)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-10-03 18:00:05 UTC (rev 96519)
@@ -69349,10 +69349,6 @@
>
</File>
<File
- RelativePath="..\inspector\front-end\Linkifier.js"
- >
- </File>
- <File
RelativePath="..\inspector\front-end\MetricsSidebarPane.js"
>
</File>
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -194,7 +194,7 @@
// FIXME(62725): stack trace line/column numbers are one-based.
lineNumber = lineNumber ? lineNumber - 1 : undefined;
columnNumber = columnNumber ? columnNumber - 1 : 0;
- return WebInspector.ConsoleView.linkifier.linkifyLocation(url, lineNumber, columnNumber, "console-message-url");
+ return WebInspector.debuggerPresentationModel.linkifyLocation(url, lineNumber, columnNumber, "console-message-url");
},
_linkifyCallFrame: function(callFrame)
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -109,8 +109,6 @@
WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._consoleMessageAdded, this);
WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
-
- WebInspector.ConsoleView.linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
}
WebInspector.ConsoleView.Events = {
@@ -330,8 +328,6 @@
delete this.previousMessage;
this.dispatchEventToListeners(WebInspector.ConsoleView.Events.ConsoleCleared);
-
- WebInspector.ConsoleView.linkifier.reset();
},
completions: function(wordRange, bestMatchOnly, completionsReadyCallback)
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -66,6 +66,32 @@
}
WebInspector.DebuggerPresentationModel.prototype = {
+ linkifyLocation: function(sourceURL, lineNumber, columnNumber, classes)
+ {
+ var linkText = WebInspector.formatLinkText(sourceURL, lineNumber);
+ var anchor = WebInspector.linkifyURLAsNode(sourceURL, linkText, classes, false);
+
+ var rawSourceCode = this._rawSourceCodeForScript(sourceURL);
+ if (!rawSourceCode) {
+ anchor.setAttribute("preferred_panel", "resources");
+ anchor.setAttribute("line_number", lineNumber);
+ return anchor;
+ }
+
+ function updateAnchor()
+ {
+ var uiLocation = rawSourceCode.sourceMapping.rawLocationToUILocation({ lineNumber: lineNumber, columnNumber: columnNumber });
+ anchor.textContent = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
+ anchor.setAttribute("preferred_panel", "scripts");
+ anchor.uiSourceCode = uiLocation.uiSourceCode;
+ anchor.lineNumber = uiLocation.lineNumber;
+ }
+ if (rawSourceCode.sourceMapping)
+ updateAnchor.call(this);
+ rawSourceCode.addEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, updateAnchor, this);
+ return anchor;
+ },
+
_parsedScriptSource: function(event)
{
this._addScript(event.data);
Modified: trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -56,8 +56,6 @@
this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
this.titleElement.appendChild(this.settingsSelectElement);
-
- this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
}
WebInspector.EventListenersSidebarPane._objectGroupName = "event-listeners-sidebar-pane";
@@ -66,8 +64,6 @@
update: function(node)
{
RuntimeAgent.releaseObjectGroup(WebInspector.EventListenersSidebarPane._objectGroupName);
- this._linkifier.reset();
-
var body = this.bodyElement;
body.removeChildren();
this.sections = [];
@@ -88,7 +84,7 @@
var type = eventListener.type;
var section = sectionMap[type];
if (!section) {
- section = new WebInspector.EventListenersSection(type, node.id, self._linkifier);
+ section = new WebInspector.EventListenersSection(type, node.id);
sectionMap[type] = section;
sectionNames.push(type);
self.sections.push(section);
@@ -128,11 +124,10 @@
WebInspector.EventListenersSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
-WebInspector.EventListenersSection = function(title, nodeId, linkifier)
+WebInspector.EventListenersSection = function(title, nodeId)
{
this.eventListeners = [];
this._nodeId = nodeId;
- this._linkifier = linkifier;
WebInspector.PropertiesSection.call(this, title);
// Changed from a Properties List
@@ -163,7 +158,7 @@
var length = filteredEventListeners.length;
for (var i = 0; i < length; ++i) {
var eventListener = filteredEventListeners[i];
- var eventListenerBar = new WebInspector.EventListenerBar(eventListener, this._nodeId, this._linkifier);
+ var eventListenerBar = new WebInspector.EventListenerBar(eventListener, this._nodeId);
this.eventBars.appendChild(eventListenerBar.element);
}
},
@@ -176,13 +171,13 @@
WebInspector.EventListenersSection.prototype.__proto__ = WebInspector.PropertiesSection.prototype;
-WebInspector.EventListenerBar = function(eventListener, nodeId, linkifier)
+WebInspector.EventListenerBar = function(eventListener, nodeId)
{
this.eventListener = eventListener;
this._nodeId = nodeId;
WebInspector.ObjectPropertiesSection.call(this);
this._setNodeTitle();
- this._setFunctionSubtitle(linkifier);
+ this._setFunctionSubtitle();
this.editable = false;
this.element.className = "event-bar"; /* Changed from "section" */
this.headerElement.addStyleClass("source-code");
@@ -236,7 +231,7 @@
this.titleElement.appendChild(WebInspector.panels.elements.linkifyNodeReference(this.eventListener.node));
},
- _setFunctionSubtitle: function(linkifier)
+ _setFunctionSubtitle: function()
{
// Requires that Function.toString() return at least the function's signature.
if (this.eventListener.location) {
@@ -245,7 +240,7 @@
var url = ""
var lineNumber = this.eventListener.location.lineNumber - 1;
var columnNumber = 0;
- var urlElement = linkifier.linkifyLocation(url, lineNumber, columnNumber);
+ var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(url, lineNumber, columnNumber);
this.subtitleElement.appendChild(urlElement);
} else {
var match = this.eventListener.handlerBody.match(/function ([^\(]+?)\(/);
Deleted: trunk/Source/WebCore/inspector/front-end/Linkifier.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/Linkifier.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/Linkifier.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @constructor
- */
-WebInspector.Linkifier = function(debuggerPresentationModel)
-{
- this._debuggerPresentationModel = debuggerPresentationModel;
- this._anchorsForURL = {};
-}
-
-WebInspector.Linkifier.prototype = {
- linkifyLocation: function(sourceURL, lineNumber, columnNumber, classes)
- {
- var linkText = WebInspector.formatLinkText(sourceURL, lineNumber);
- var anchor = WebInspector.linkifyURLAsNode(sourceURL, linkText, classes, false);
- anchor.rawLocation = { lineNumber: lineNumber, columnNumber: columnNumber };
-
- var rawSourceCode = this._debuggerPresentationModel._rawSourceCodeForScript(sourceURL);
- if (!rawSourceCode) {
- anchor.setAttribute("preferred_panel", "resources");
- anchor.setAttribute("line_number", lineNumber);
- return anchor;
- }
-
- var anchors = this._anchorsForURL[sourceURL];
- if (!anchors) {
- anchors = [];
- this._anchorsForURL[sourceURL] = anchors;
- rawSourceCode.addEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, this._updateSourceAnchors, this);
- }
-
- if (rawSourceCode.sourceMapping)
- this._updateAnchor(rawSourceCode, anchor);
- anchors.push(anchor);
- return anchor;
- },
-
- reset: function()
- {
- for (var sourceURL in this._anchorsForURL) {
- var rawSourceCode = this._debuggerPresentationModel._rawSourceCodeForScript(sourceURL);
- if (rawSourceCode)
- rawSourceCode.removeEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, this._updateSourceAncors, this);
- }
- this._anchorsForURL = {};
- },
-
- _updateSourceAnchors: function(event)
- {
- var rawSourceCode = event.target;
- var anchors = this._anchorsForURL[rawSourceCode.url];
- if (!anchors)
- return;
-
- for (var i = 0; i < anchors.length; ++i)
- this._updateAnchor(rawSourceCode, anchors[i]);
- },
-
- _updateAnchor: function(rawSourceCode, anchor)
- {
- var uiLocation = rawSourceCode.sourceMapping.rawLocationToUILocation(anchor.rawLocation);
- anchor.textContent = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
- anchor.setAttribute("preferred_panel", "scripts");
- anchor.uiSourceCode = uiLocation.uiSourceCode;
- anchor.lineNumber = uiLocation.lineNumber;
- }
-}
-
Modified: trunk/Source/WebCore/inspector/front-end/NetworkPanel.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -56,7 +56,6 @@
this._createStatusbarButtons();
this._createFilterStatusBarItems();
- this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceStarted, this._onResourceStarted, this);
WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceUpdated, this._onResourceUpdated, this);
@@ -736,7 +735,7 @@
this._mainResourceLoadTime = -1;
this._mainResourceDOMContentTime = -1;
- this._linkifier.reset();
+
},
get resources()
@@ -2042,7 +2041,7 @@
return;
}
this._initiatorCell.title = topFrame.url + ":" + topFrame.lineNumber;
- var urlElement = this._parentView._linkifier.linkifyLocation(topFrame.url, topFrame.lineNumber - 1, 0);
+ var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(topFrame.url, topFrame.lineNumber - 1, 0);
this._initiatorCell.appendChild(urlElement);
this._appendSubtitle(this._initiatorCell, WebInspector.UIString("Script"));
} else { // initiator.type === "parser"
Modified: trunk/Source/WebCore/inspector/front-end/ProfileDataGridTree.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/ProfileDataGridTree.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/ProfileDataGridTree.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -98,7 +98,7 @@
if (this.profileNode.url) {
// FIXME(62725): profileNode should reference a debugger location.
var lineNumber = this.profileNode.lineNumber ? this.profileNode.lineNumber - 1 : 0;
- var urlElement = this.profileView._linkifier.linkifyLocation(this.profileNode.url, lineNumber, 0, "profile-node-file");
+ var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(this.profileNode.url, lineNumber, 0, "profile-node-file");
urlElement.style.maxWidth = "75%";
cell.insertBefore(urlElement, cell.firstChild);
}
Modified: trunk/Source/WebCore/inspector/front-end/ProfileView.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/ProfileView.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/ProfileView.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -96,8 +96,6 @@
self._updatePercentButton();
}
- this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
-
ProfilerAgent.getProfile(this.profile.typeId, this.profile.uid, profileCallback);
}
@@ -487,7 +485,6 @@
{
this.resetButton.visible = false;
this.profileDataGridTree.restore();
- this._linkiier.reset();
this.refresh();
this.refreshVisibleData();
},
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -109,7 +109,6 @@
this._registerShortcuts();
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, this._onTimelineEventRecorded, this);
- this._linkifier = new WebInspector.Linkifier(WebInspector.debuggerPresentationModel);
}
// Define row height, should be in sync with styles for timeline graphs.
@@ -117,19 +116,6 @@
WebInspector.TimelinePanel.shortRecordThreshold = 0.015;
WebInspector.TimelinePanel.prototype = {
- _linkifyLocation: function(url, lineNumber, columnNumber)
- {
- // FIXME(62725): stack trace line/column numbers are one-based.
- lineNumber = lineNumber ? lineNumber - 1 : lineNumber;
- columnNumber = columnNumber ? columnNumber - 1 : 0;
- return this._linkifier.linkifyLocation(url, lineNumber, columnNumber, "timeline-details");
- },
-
- _linkifyCallFrame: function(callFrame)
- {
- return this._linkifyLocation(callFrame.url, callFrame.lineNumber, callFrame.columnNumber);
- },
-
_createTopPane: function() {
var topPaneElement = document.createElement("div");
topPaneElement.id = "timeline-overview-panel";
@@ -542,7 +528,6 @@
this._refresh();
this._closeRecordDetails();
this._model._reset();
- this._linkifier.reset();
},
elementsToRestoreScrollPositionsFor: function()
@@ -976,7 +961,6 @@
WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, panel, scriptDetails)
{
- this._panel = panel;
var recordTypes = WebInspector.TimelineAgent.RecordType;
var style = panel._recordStyles[record.type];
this.parent = parentRecord;
@@ -1067,7 +1051,7 @@
_generatePopupContent: function(calculator, categories)
{
- var contentHelper = new WebInspector.TimelinePanel.PopupContentHelper(this.title, this._panel);
+ var contentHelper = new WebInspector.TimelinePanel.PopupContentHelper(this.title);
if (this._children && this._children.length) {
contentHelper._appendTextRow(WebInspector.UIString("Self Time"), Number.secondsToString(this._selfTime + 0.0001));
@@ -1152,26 +1136,26 @@
case WebInspector.TimelineAgent.RecordType.GCEvent:
return WebInspector.UIString("%s collected", Number.bytesToString(this.data.usedHeapSizeDelta));
case WebInspector.TimelineAgent.RecordType.TimerFire:
- return this.scriptName ? this._panel._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.timerId;
+ return this.scriptName ? this._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.timerId;
case WebInspector.TimelineAgent.RecordType.FunctionCall:
- return this.scriptName ? this._panel._linkifyLocation(this.scriptName, this.scriptLine, 0) : null;
+ return this.scriptName ? this._linkifyLocation(this.scriptName, this.scriptLine, 0) : null;
case WebInspector.TimelineAgent.RecordType.FireAnimationFrameEvent:
- return this.scriptName ? this._panel._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.id;
+ return this.scriptName ? this._linkifyLocation(this.scriptName, this.scriptLine, 0) : this.data.id;
case WebInspector.TimelineAgent.RecordType.EventDispatch:
return this.data ? this.data.type : null;
case WebInspector.TimelineAgent.RecordType.Paint:
return this.data.width + "\u2009\u00d7\u2009" + this.data.height;
case WebInspector.TimelineAgent.RecordType.TimerInstall:
case WebInspector.TimelineAgent.RecordType.TimerRemove:
- return this.stackTrace ? this._panel._linkifyCallFrame(this.stackTrace[0]) : this.data.timerId;
+ return this.stackTrace ? this._linkifyCallFrame(this.stackTrace[0]) : this.data.timerId;
case WebInspector.TimelineAgent.RecordType.RegisterAnimationFrameCallback:
case WebInspector.TimelineAgent.RecordType.CancelAnimationFrameCallback:
- return this.stackTrace ? this._panel._linkifyCallFrame(this.stackTrace[0]) : this.data.id;
+ return this.stackTrace ? this._linkifyCallFrame(this.stackTrace[0]) : this.data.id;
case WebInspector.TimelineAgent.RecordType.ParseHTML:
case WebInspector.TimelineAgent.RecordType.RecalculateStyles:
- return this.stackTrace ? this._panel._linkifyCallFrame(this.stackTrace[0]) : null;
+ return this.stackTrace ? this._linkifyCallFrame(this.stackTrace[0]) : null;
case WebInspector.TimelineAgent.RecordType.EvaluateScript:
- return this.url ? this._panel._linkifyLocation(this.url, this.data.lineNumber, 0) : null;
+ return this.url ? this._linkifyLocation(this.url, this.data.lineNumber, 0) : null;
case WebInspector.TimelineAgent.RecordType.XHRReadyStateChange:
case WebInspector.TimelineAgent.RecordType.XHRLoad:
case WebInspector.TimelineAgent.RecordType.ScheduleResourceRequest:
@@ -1187,6 +1171,19 @@
}
},
+ _linkifyLocation: function(url, lineNumber, columnNumber)
+ {
+ // FIXME(62725): stack trace line/column numbers are one-based.
+ lineNumber = lineNumber ? lineNumber - 1 : lineNumber;
+ columnNumber = columnNumber ? columnNumber - 1 : 0;
+ return WebInspector.debuggerPresentationModel.linkifyLocation(url, lineNumber, columnNumber, "timeline-details");
+ },
+
+ _linkifyCallFrame: function(callFrame)
+ {
+ return this._linkifyLocation(callFrame.url, callFrame.lineNumber, callFrame.columnNumber);
+ },
+
_calculateAggregatedStats: function(categories)
{
this._aggregatedStats = {};
@@ -1207,9 +1204,8 @@
}
}
-WebInspector.TimelinePanel.PopupContentHelper = function(title, panel)
+WebInspector.TimelinePanel.PopupContentHelper = function(title)
{
- this._panel = panel;
this._contentTable = document.createElement("table");;
var titleCell = this._createCell(WebInspector.UIString("%s - Details", title), "timeline-details-title");
titleCell.colSpan = 2;
@@ -1255,7 +1251,7 @@
_appendLinkRow: function(title, scriptName, scriptLine)
{
- var link = this._panel._linkifyLocation(scriptName, scriptLine, 0, "timeline-details");
+ var link = WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation(scriptName, scriptLine, 0, "timeline-details");
this._appendElementRow(title, link);
},
@@ -1270,7 +1266,7 @@
row.appendChild(this._createCell(stackFrame.functionName ? stackFrame.functionName : WebInspector.UIString("(anonymous function)"), "timeline-function-name"));
row.appendChild(this._createCell(" @ "));
var linkCell = document.createElement("td");
- var urlElement = this._panel._linkifyCallFrame(stackFrame);
+ var urlElement = WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame(stackFrame);
linkCell.appendChild(urlElement);
row.appendChild(linkCell);
framesTable.appendChild(row);
Modified: trunk/Source/WebCore/inspector/front-end/WebKit.qrc (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/WebKit.qrc 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/WebKit.qrc 2011-10-03 18:00:05 UTC (rev 96519)
@@ -36,7 +36,6 @@
<file>DataGrid.js</file>
<file>DebuggerModel.js</file>
<file>DebuggerPresentationModel.js</file>
- <file>Linkifier.js</file>
<file>DOMAgent.js</file>
<file>DOMBreakpointsSidebarPane.js</file>
<file>DOMStorage.js</file>
Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/inspector.html 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html 2011-10-03 18:00:05 UTC (rev 96519)
@@ -158,7 +158,6 @@
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
- <script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (96518 => 96519)
--- trunk/Source/WebCore/inspector/front-end/inspector.js 2011-10-03 17:51:36 UTC (rev 96518)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js 2011-10-03 18:00:05 UTC (rev 96519)
@@ -509,9 +509,6 @@
this.console.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._updateErrorAndWarningCounts, this);
this.console.addEventListener(WebInspector.ConsoleModel.Events.RepeatCountUpdated, this._updateErrorAndWarningCounts, this);
- this.debuggerModel = new WebInspector.DebuggerModel();
- this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel();
-
this.drawer = new WebInspector.Drawer();
this.consoleView = new WebInspector.ConsoleView();
@@ -524,6 +521,8 @@
InspectorBackend.registerInspectorDispatcher(this);
this.cssModel = new WebInspector.CSSStyleModel();
+ this.debuggerModel = new WebInspector.DebuggerModel();
+ this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel();
this.searchController = new WebInspector.SearchController();