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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js

Issue 2713363002: DevTools: Highlight DOM node on hover in flamechart. (Closed)
Patch Set: fix tests Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 /** 160 /**
161 * @param {number} entryIndex 161 * @param {number} entryIndex
162 */ 162 */
163 highlightEntry(entryIndex) { 163 highlightEntry(entryIndex) {
164 if (this._highlightedEntryIndex === entryIndex) 164 if (this._highlightedEntryIndex === entryIndex)
165 return; 165 return;
166 this._highlightedEntryIndex = entryIndex; 166 this._highlightedEntryIndex = entryIndex;
167 this._updateElementPosition(this._highlightElement, this._highlightedEntryIn dex); 167 this._updateElementPosition(this._highlightElement, this._highlightedEntryIn dex);
168 this._dataProvider.highlightEntry(entryIndex);
168 } 169 }
169 170
170 hideHighlight() { 171 hideHighlight() {
171 this._entryInfo.removeChildren(); 172 this._entryInfo.removeChildren();
172 this._highlightedEntryIndex = -1; 173 this._highlightedEntryIndex = -1;
173 this._updateElementPosition(this._highlightElement, this._highlightedEntryIn dex); 174 this._updateElementPosition(this._highlightElement, this._highlightedEntryIn dex);
175 this._dataProvider.highlightEntry(-1);
174 } 176 }
175 177
176 _resetCanvas() { 178 _resetCanvas() {
177 var ratio = window.devicePixelRatio; 179 var ratio = window.devicePixelRatio;
178 this._canvas.width = this._offsetWidth * ratio; 180 this._canvas.width = this._offsetWidth * ratio;
179 this._canvas.height = this._offsetHeight * ratio; 181 this._canvas.height = this._offsetHeight * ratio;
180 this._canvas.style.width = this._offsetWidth + 'px'; 182 this._canvas.style.width = this._offsetWidth + 'px';
181 this._canvas.style.height = this._offsetHeight + 'px'; 183 this._canvas.style.height = this._offsetHeight + 'px';
182 } 184 }
183 185
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 * @param {number} barWidth 1335 * @param {number} barWidth
1334 * @param {number} barHeight 1336 * @param {number} barHeight
1335 * @param {number} unclippedBarX 1337 * @param {number} unclippedBarX
1336 * @param {number} timeToPixels 1338 * @param {number} timeToPixels
1337 * @return {boolean} 1339 * @return {boolean}
1338 */ 1340 */
1339 decorateEntry(entryIndex, context, text, barX, barY, barWidth, barHeight, uncl ippedBarX, timeToPixels) {}, 1341 decorateEntry(entryIndex, context, text, barX, barY, barWidth, barHeight, uncl ippedBarX, timeToPixels) {},
1340 1342
1341 /** 1343 /**
1342 * @param {number} entryIndex 1344 * @param {number} entryIndex
1345 */
1346 highlightEntry(entryIndex) {},
1347
1348 /**
1349 * @param {number} entryIndex
1343 * @return {boolean} 1350 * @return {boolean}
1344 */ 1351 */
1345 forceDecoration(entryIndex) {}, 1352 forceDecoration(entryIndex) {},
1346 1353
1347 /** 1354 /**
1348 * @param {number} entryIndex 1355 * @param {number} entryIndex
1349 * @return {string} 1356 * @return {string}
1350 */ 1357 */
1351 textColor(entryIndex) {}, 1358 textColor(entryIndex) {},
1352 }; 1359 };
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 } 1529 }
1523 1530
1524 /** 1531 /**
1525 * @override 1532 * @override
1526 * @return {number} 1533 * @return {number}
1527 */ 1534 */
1528 boundarySpan() { 1535 boundarySpan() {
1529 return this._maximumBoundaries - this._minimumBoundaries; 1536 return this._maximumBoundaries - this._minimumBoundaries;
1530 } 1537 }
1531 }; 1538 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698