Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js |
index 948a5742e7bdf7c44337166771bd0a3f70a660c7..fb97c0779caefd8d8d0e87b7daf4e244ce98c8c0 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js |
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js |
@@ -543,6 +543,7 @@ WebInspector.FlameChart.prototype = { |
_animationCompleted: function() |
{ |
delete this._cancelWindowTimesAnimation; |
+ this._highlightEntry(true); |
}, |
/** |
@@ -592,6 +593,7 @@ WebInspector.FlameChart.prototype = { |
this._dragStartWindowLeft = this._timeWindowLeft; |
this._dragStartWindowRight = this._timeWindowRight; |
this._canvas.style.cursor = ""; |
+ this._highlightEntry(false); |
return true; |
}, |
@@ -634,6 +636,7 @@ WebInspector.FlameChart.prototype = { |
style.width = "1px"; |
this._selectedTimeSpanLabel.textContent = ""; |
this._selectionOverlay.classList.remove("hidden"); |
+ this._highlightEntry(false); |
return true; |
}, |
@@ -681,6 +684,7 @@ WebInspector.FlameChart.prototype = { |
_onMouseMove: function(event) |
{ |
this._lastMouseOffsetX = event.offsetX; |
+ this._lastMouseOffsetY = event.offsetY; |
if (!this._enabled()) |
return; |
@@ -691,22 +695,22 @@ WebInspector.FlameChart.prototype = { |
var inDividersBar = event.offsetY < WebInspector.FlameChart.DividersBarHeight; |
this._highlightedMarkerIndex = inDividersBar ? this._markerIndexAtPosition(event.offsetX) : -1; |
this._updateMarkerHighlight(); |
- this._entryInfo.style.left = event.offsetX + "px"; |
- this._entryInfo.style.top = event.offsetY + "px"; |
- |
- this._highlightEntry(this._coordinatesToEntryIndex(event.offsetX, event.offsetY)); |
+ this._highlightEntry(true); |
}, |
_onMouseOut: function() |
{ |
- this._highlightEntry(-1); |
+ this._highlightEntry(false); |
}, |
/** |
- * @param {number} entryIndex |
+ * @param {boolean} show |
*/ |
- _highlightEntry: function(entryIndex) |
+ _highlightEntry: function(show) |
caseq
2015/11/24 00:40:55
let's just split this into _hideHighlight() and _s
alph
2015/11/24 02:44:56
Done.
|
{ |
+ var entryIndex = show ? this._coordinatesToEntryIndex(this._lastMouseOffsetX, this._lastMouseOffsetY) : -1; |
+ this._entryInfo.style.left = this._lastMouseOffsetX + "px"; |
+ this._entryInfo.style.top = this._lastMouseOffsetY + "px"; |
if (this._highlightedEntryIndex === entryIndex) |
return; |
@@ -1513,6 +1517,7 @@ WebInspector.FlameChart.prototype = { |
_onScroll: function() |
{ |
this._scrollTop = this._vScrollElement.scrollTop; |
+ this._highlightEntry(true); |
this.scheduleUpdate(); |
}, |