OLD | NEW |
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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 | 684 |
685 if (!this._enabled()) | 685 if (!this._enabled()) |
686 return; | 686 return; |
687 | 687 |
688 if (this._isDragging) | 688 if (this._isDragging) |
689 return; | 689 return; |
690 | 690 |
691 var inDividersBar = event.offsetY < WebInspector.FlameChart.DividersBarH
eight; | 691 var inDividersBar = event.offsetY < WebInspector.FlameChart.DividersBarH
eight; |
692 this._highlightedMarkerIndex = inDividersBar ? this._markerIndexAtPositi
on(event.offsetX) : -1; | 692 this._highlightedMarkerIndex = inDividersBar ? this._markerIndexAtPositi
on(event.offsetX) : -1; |
693 this._updateMarkerHighlight(); | 693 this._updateMarkerHighlight(); |
| 694 this._entryInfo.style.left = event.offsetX + "px"; |
| 695 this._entryInfo.style.top = event.offsetY + "px"; |
694 | 696 |
695 this._highlightEntry(this._coordinatesToEntryIndex(event.offsetX, event.
offsetY)); | 697 this._highlightEntry(this._coordinatesToEntryIndex(event.offsetX, event.
offsetY)); |
696 }, | 698 }, |
697 | 699 |
698 _onMouseOut: function() | 700 _onMouseOut: function() |
699 { | 701 { |
700 this._highlightEntry(-1); | 702 this._highlightEntry(-1); |
701 }, | 703 }, |
702 | 704 |
703 /** | 705 /** |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 /** | 1390 /** |
1389 * @param {!Array<!{title: string, value: (string|!Element)}>} entryInfo | 1391 * @param {!Array<!{title: string, value: (string|!Element)}>} entryInfo |
1390 * @return {!Element} | 1392 * @return {!Element} |
1391 */ | 1393 */ |
1392 _buildEntryInfo: function(entryInfo) | 1394 _buildEntryInfo: function(entryInfo) |
1393 { | 1395 { |
1394 var infoTable = createElementWithClass("table", "info-table"); | 1396 var infoTable = createElementWithClass("table", "info-table"); |
1395 for (var entry of entryInfo) { | 1397 for (var entry of entryInfo) { |
1396 var row = infoTable.createChild("tr"); | 1398 var row = infoTable.createChild("tr"); |
1397 row.createChild("td", "title").textContent = entry.title; | 1399 row.createChild("td", "title").textContent = entry.title; |
1398 row.createChild("td").textContent = typeof entry.value === "string"
? entry.value : entry.value.textContent; | 1400 if (typeof entry.value === "string") |
| 1401 row.createChild("td").textContent = entry.value; |
| 1402 else |
| 1403 row.createChild("td").appendChild(entry.value); |
1399 } | 1404 } |
1400 return infoTable; | 1405 return infoTable; |
1401 }, | 1406 }, |
1402 | 1407 |
1403 /** | 1408 /** |
1404 * @param {!CanvasRenderingContext2D} context | 1409 * @param {!CanvasRenderingContext2D} context |
1405 * @param {string} title | 1410 * @param {string} title |
1406 * @param {number} maxSize | 1411 * @param {number} maxSize |
1407 * @return {string} | 1412 * @return {string} |
1408 */ | 1413 */ |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 this.update(); | 1544 this.update(); |
1540 }, | 1545 }, |
1541 | 1546 |
1542 _enabled: function() | 1547 _enabled: function() |
1543 { | 1548 { |
1544 return this._rawTimelineDataLength !== 0; | 1549 return this._rawTimelineDataLength !== 0; |
1545 }, | 1550 }, |
1546 | 1551 |
1547 __proto__: WebInspector.HBox.prototype | 1552 __proto__: WebInspector.HBox.prototype |
1548 } | 1553 } |
OLD | NEW |