Index: Source/devtools/front_end/layers/PaintProfilerView.js |
diff --git a/Source/devtools/front_end/layers/PaintProfilerView.js b/Source/devtools/front_end/layers/PaintProfilerView.js |
index f71f1167c2204626057d26912b8a2ff096fe4bd1..165fb11e0658f41d66038199056a53bcfab5dda9 100644 |
--- a/Source/devtools/front_end/layers/PaintProfilerView.js |
+++ b/Source/devtools/front_end/layers/PaintProfilerView.js |
@@ -205,6 +205,7 @@ WebInspector.PaintProfilerCommandLogView = function() |
this.element.classList.add("outline-disclosure"); |
var sidebarTreeElement = this.element.createChild("ol", "sidebar-tree"); |
this.sidebarTree = new TreeOutline(sidebarTreeElement); |
+ this._popoverHelper = new WebInspector.ObjectPopoverHelper(this.element, this._getHoverAnchor.bind(this), this._resolveObjectForPopover.bind(this), undefined, true); |
this._log = []; |
} |
@@ -231,6 +232,29 @@ WebInspector.PaintProfilerCommandLogView.prototype = { |
} |
}, |
+ /** |
+ * @param {!Element} target |
+ * @return {!Element} |
+ */ |
+ _getHoverAnchor: function(target) |
+ { |
+ return target.enclosingNodeOrSelfWithNodeName("span"); |
+ }, |
+ |
+ /** |
+ * @param {!Element} element |
+ * @param {function(!WebInspector.RemoteObject, boolean, !Element=):undefined} showCallback |
+ */ |
+ _resolveObjectForPopover: function(element, showCallback) |
+ { |
+ var liElement = element.enclosingNodeOrSelfWithNodeName("li"); |
+ var logItem = liElement.treeElement.representedObject; |
+ var obj = {"method": logItem.method}; |
+ if (logItem.params) |
+ obj.params = logItem.params; |
+ showCallback(WebInspector.RemoteObject.fromLocalObject(obj), false); |
+ }, |
+ |
__proto__: WebInspector.VBox.prototype |
}; |
@@ -287,10 +311,11 @@ WebInspector.LogTreeElement.prototype = { |
var logItem = this.representedObject; |
var title = document.createDocumentFragment(); |
title.createChild("div", "selection"); |
+ var span = title.createChild("span"); |
caseq
2014/06/11 16:48:36
This change is probably redundant now.
malch
2014/06/11 16:50:44
We need this to properly show the popover.
On 2014
|
var textContent = logItem.method; |
if (logItem.params) |
textContent += "(" + this._paramsToString(logItem.params) + ")"; |
- title.appendChild(document.createTextNode(textContent)); |
+ span.textContent = textContent; |
this.title = title; |
}, |