Skip to content
Permalink
Browse files
Web Inspector: HeapAllocationsTimeline grid should use built-in grid …
…column icons

https://bugs.webkit.org/show_bug.cgi?id=156934

Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
Use existing base class helper function to create main title text.
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
Add icon class names to cell, remove icon element.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
Turn on icons for the column.


Canonical link: https://commits.webkit.org/175055@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
LuckyKobold committed Apr 23, 2016
1 parent b82761b commit ca75129eca695446c44f59a74ca17d765b8304a6
@@ -1,3 +1,20 @@
2016-04-22 Matt Baker <mattbaker@apple.com>

Web Inspector: HeapAllocationsTimeline grid should use built-in grid column icons
https://bugs.webkit.org/show_bug.cgi?id=156934

Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
Use existing base class helper function to create main title text.
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
Add icon class names to cell, remove icon element.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
Turn on icons for the column.

2016-04-22 Timothy Hatcher <timothy@apple.com>

Change an assert to a warn based on post review feedback.
@@ -33,7 +33,7 @@ WebInspector.HeapAllocationsTimelineDataGridNode = class HeapAllocationsTimeline
this._heapAllocationsView = heapAllocationsView;

this._data = {
name: WebInspector.TimelineTabContentView.displayNameForRecord(heapAllocationsTimelineRecord),
name: this.displayName(),
timestamp: this._record.timestamp - zeroTime,
size: this._record.heapSnapshot.totalSize,
};
@@ -48,9 +48,9 @@ WebInspector.HeapAllocationsTimelineDataGridNode = class HeapAllocationsTimeline
{
switch (columnIdentifier) {
case "name":
cell.classList.add(...this.iconClassNames());

let fragment = document.createDocumentFragment();
let iconElement = fragment.appendChild(document.createElement("img"));
iconElement.classList.add("icon", "heap-snapshot");
let titleElement = fragment.appendChild(document.createElement("span"));
titleElement.textContent = this._data.name;
let goToButton = fragment.appendChild(WebInspector.createGoToArrowButton());
@@ -37,6 +37,7 @@ WebInspector.HeapAllocationsTimelineView = class HeapAllocationsTimelineView ext
name: {
title: WebInspector.UIString("Name"),
width: "150px",
icon: true,
},
timestamp: {
title: WebInspector.UIString("Time"),

0 comments on commit ca75129

Please sign in to comment.