Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Unified Diff: Source/devtools/front_end/TimelinePanel.js

Issue 184823002: DevTools: do not cache details node, remove linkifier from presentation record. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments addressed. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/TimelinePanel.js
diff --git a/Source/devtools/front_end/TimelinePanel.js b/Source/devtools/front_end/TimelinePanel.js
index 4c4159771599c5620e538ff080d2997eaca7ca93..0f1276833e4d28b0f0c52630c075f81765bcc34c 100644
--- a/Source/devtools/front_end/TimelinePanel.js
+++ b/Source/devtools/front_end/TimelinePanel.js
@@ -56,6 +56,7 @@ WebInspector.TimelinePanel = function()
this.registerRequiredCSS("filter.css");
this.element.addEventListener("contextmenu", this._contextMenu.bind(this), false);
+ this._detailsLinkifier = new WebInspector.Linkifier();
this._windowStartTime = 0;
this._windowEndTime = Infinity;
@@ -818,6 +819,8 @@ WebInspector.TimelinePanel.prototype = {
*/
selectRecord: function(record)
{
+ this._detailsLinkifier.reset();
+
if (!record) {
this._updateSelectionDetails();
return;
@@ -831,7 +834,7 @@ WebInspector.TimelinePanel.prototype = {
this._updateSelectionDetails();
return;
}
- record.generatePopupContent(showCallback.bind(this));
+ record.generatePopupContent(this._detailsLinkifier, showCallback.bind(this));
/**
* @param {!DocumentFragment} element
@@ -839,7 +842,7 @@ WebInspector.TimelinePanel.prototype = {
*/
function showCallback(element)
{
- this._detailsView.setContent(record.title, element);
+ this._detailsView.setContent(record.title(), element);
}
},
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-node-reference.html ('k') | Source/devtools/front_end/TimelinePresentationModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698