Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200516 => 200517)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-06 19:54:32 UTC (rev 200517)
@@ -1,3 +1,24 @@
+2016-05-06 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Remove HeapSnapshot Summary View
+ https://bugs.webkit.org/show_bug.cgi?id=157385
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Main.html:
+ * UserInterface/Views/HeapSnapshotClusterContentView.js:
+ (WebInspector.HeapSnapshotClusterContentView):
+ (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView): Deleted.
+ (WebInspector.HeapSnapshotClusterContentView.prototype.showSummary): Deleted.
+ (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
+ (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
+ (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
+ * UserInterface/Views/HeapSnapshotSummaryContentView.css: Removed.
+ * UserInterface/Views/HeapSnapshotSummaryContentView.js: Removed.
+ * UserInterface/Views/Variables.css:
+ (:root):
+
2016-05-06 Manuel Rego Casasnovas <[email protected]>
[css-grid] Unprefix CSS Grid Layout properties
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (200516 => 200517)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-05-06 19:54:32 UTC (rev 200517)
@@ -67,7 +67,6 @@
localizedStrings["All Resources"] = "All Resources";
localizedStrings["All Storage"] = "All Storage";
localizedStrings["All Uncaught Exceptions"] = "All Uncaught Exceptions";
-localizedStrings["Allocation Size Breakdown"] = "Allocation Size Breakdown";
localizedStrings["Alternates"] = "Alternates";
localizedStrings["An error occurred trying to load the resource."] = "An error occurred trying to load the resource.";
localizedStrings["An error occurred trying to read the %s table."] = "An error occurred trying to read the %s table.";
@@ -96,7 +95,6 @@
localizedStrings["Author Stylesheet"] = "Author Stylesheet";
localizedStrings["Automatically continue after evaluating"] = "Automatically continue after evaluating";
localizedStrings["Average Time"] = "Average Time";
-localizedStrings["Average allocation size"] = "Average allocation size";
localizedStrings["Back (%s)"] = "Back (%s)";
localizedStrings["Background"] = "Background";
localizedStrings["Basis"] = "Basis";
@@ -111,10 +109,7 @@
localizedStrings["Box Model"] = "Box Model";
localizedStrings["Box Shadow"] = "Box Shadow";
localizedStrings["Breakdown"] = "Breakdown";
-localizedStrings["Breakdown of allocations into size classes"] = "Breakdown of allocations into size classes";
localizedStrings["Breakdown of each memory category at the end of the selected time range"] = "Breakdown of each memory category at the end of the selected time range";
-localizedStrings["Breakdown of object counts by class"] = "Breakdown of object counts by class";
-localizedStrings["Breakdown of total allocation size by class"] = "Breakdown of total allocation size by class";
localizedStrings["Bubbling"] = "Bubbling";
localizedStrings["Busy"] = "Busy";
localizedStrings["CSP Hash"] = "CSP Hash";
@@ -133,9 +128,7 @@
localizedStrings["Checked"] = "Checked";
localizedStrings["Child Layers"] = "Child Layers";
localizedStrings["Children"] = "Children";
-localizedStrings["Class Count Breakdown"] = "Class Count Breakdown";
localizedStrings["Class Name"] = "Class Name";
-localizedStrings["Class Size Breakdown"] = "Class Size Breakdown";
localizedStrings["Classes"] = "Classes";
localizedStrings["Clear"] = "Clear";
localizedStrings["Clear Log"] = "Clear Log";
@@ -420,7 +413,6 @@
localizedStrings["Keep Log on Navigation"] = "Keep Log on Navigation";
localizedStrings["Key"] = "Key";
localizedStrings["Label"] = "Label";
-localizedStrings["Large %s"] = "Large %s";
localizedStrings["Latency"] = "Latency";
localizedStrings["Layer"] = "Layer";
localizedStrings["Layer Count: %d"] = "Layer Count: %d";
@@ -461,7 +453,6 @@
localizedStrings["Maximum Size: %s"] = "Maximum Size: %s";
localizedStrings["Maximum maximum memory size in this recording"] = "Maximum maximum memory size in this recording";
localizedStrings["Media: "] = "Media: ";
-localizedStrings["Medium %s"] = "Medium %s";
localizedStrings["Memory"] = "Memory";
localizedStrings["Memory: %s"] = "Memory: %s";
localizedStrings["Message"] = "Message";
@@ -501,7 +492,6 @@
localizedStrings["No Watch Expressions"] = "No Watch Expressions";
localizedStrings["No exact ARIA role match."] = "No exact ARIA role match.";
localizedStrings["No message"] = "No message";
-localizedStrings["No objects"] = "No objects";
localizedStrings["No preview available"] = "No preview available";
localizedStrings["No properties."] = "No properties.";
localizedStrings["Node"] = "Node";
@@ -658,7 +648,6 @@
localizedStrings["Size of the current object plus the size of all objects it keeps alive."] = "Size of the current object plus the size of all objects it keeps alive.";
localizedStrings["Sizing"] = "Sizing";
localizedStrings["Slice"] = "Slice";
-localizedStrings["Small %s"] = "Small %s";
localizedStrings["Small Icons"] = "Small Icons";
localizedStrings["Snapshot %d"] = "Snapshot %d";
localizedStrings["Snapshot %d \u2014 %s"] = "Snapshot %d \u2014 %s";
@@ -700,7 +689,6 @@
localizedStrings["Styles \u2014 Visual"] = "Styles \u2014 Visual";
localizedStrings["Stylesheet"] = "Stylesheet";
localizedStrings["Stylesheets"] = "Stylesheets";
-localizedStrings["Summary"] = "Summary";
localizedStrings["Take snapshot"] = "Take snapshot";
localizedStrings["Text"] = "Text";
localizedStrings["Text Node"] = "Text Node";
@@ -736,9 +724,7 @@
localizedStrings["Total Time"] = "Total Time";
localizedStrings["Total memory size at the end of the selected time range"] = "Total memory size at the end of the selected time range";
localizedStrings["Total number of resources, click to show the Resources tab"] = "Total number of resources, click to show the Resources tab";
-localizedStrings["Total object count"] = "Total object count";
localizedStrings["Total size of all resources, click to show the Network Requests timeline"] = "Total size of all resources, click to show the Network Requests timeline";
-localizedStrings["Total size of heap"] = "Total size of heap";
localizedStrings["Trace"] = "Trace";
localizedStrings["Trace: %s"] = "Trace: %s";
localizedStrings["Transferred"] = "Transferred";
@@ -761,7 +747,6 @@
localizedStrings["Value"] = "Value";
localizedStrings["Variants"] = "Variants";
localizedStrings["Vertical"] = "Vertical";
-localizedStrings["Very Large"] = "Very Large";
localizedStrings["Visibility"] = "Visibility";
localizedStrings["Warning: "] = "Warning: ";
localizedStrings["Warnings"] = "Warnings";
Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (200516 => 200517)
--- trunk/Source/WebInspectorUI/UserInterface/Main.html 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html 2016-05-06 19:54:32 UTC (rev 200517)
@@ -93,7 +93,6 @@
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
- <link rel="stylesheet" href=""
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
@@ -533,7 +532,6 @@
<script src=""
<script src=""
<script src=""
- <script src=""
<script src=""
<script src=""
<script src=""
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js (200516 => 200517)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js 2016-05-06 19:54:32 UTC (rev 200517)
@@ -41,17 +41,12 @@
}
this._shownInitialContent = false;
- this._summaryContentView = null;
this._instancesContentView = null;
this._objectGraphContentView = null;
- this._summaryPathComponent = createPathComponent.call(this, WebInspector.UIString("Summary"), "heap-snapshot-summary-icon", WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier);
this._instancesPathComponent = createPathComponent.call(this, WebInspector.UIString("Instances"), "heap-snapshot-instances-icon", WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier);
this._objectGraphPathComponent = createPathComponent.call(this, WebInspector.UIString("Object Graph"), "heap-snapshot-object-graph-icon", WebInspector.HeapSnapshotClusterContentView.ObjectGraphIdentifier);
- this._summaryPathComponent.nextSibling = this._instancesPathComponent;
- this._instancesPathComponent.previousSibling = this._summaryPathComponent;
-
if (this._supportsObjectGraph()) {
this._instancesPathComponent.nextSibling = this._objectGraphPathComponent;
this._objectGraphPathComponent.previousSibling = this._instancesPathComponent;
@@ -111,13 +106,6 @@
get heapSnapshot() { return this._heapSnapshot; }
- get summaryContentView()
- {
- if (!this._summaryContentView)
- this._summaryContentView = new WebInspector.HeapSnapshotSummaryContentView(this._heapSnapshot);
- return this._summaryContentView;
- }
-
get instancesContentView()
{
if (!this._instancesContentView)
@@ -172,12 +160,6 @@
this._showContentViewForIdentifier(cookie[WebInspector.HeapSnapshotClusterContentView.ContentViewIdentifierCookieKey]);
}
- showSummary()
- {
- this._shownInitialContent = true;
- return this._showContentViewForIdentifier(WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier);
- }
-
showInstances()
{
this._shownInitialContent = true;
@@ -202,8 +184,6 @@
console.assert(contentView);
if (!contentView)
return null;
- if (contentView === this._summaryContentView)
- return this._summaryPathComponent;
if (contentView === this._instancesContentView)
return this._instancesPathComponent;
if (contentView === this._objectGraphContentView)
@@ -217,8 +197,6 @@
console.assert(contentView);
if (!contentView)
return null;
- if (contentView === this._summaryContentView)
- return WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier;
if (contentView === this._instancesContentView)
return WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier;
if (contentView === this._objectGraphContentView)
@@ -232,9 +210,6 @@
let contentViewToShow = null;
switch (identifier) {
- case WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier:
- contentViewToShow = this.summaryContentView;
- break;
case WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier:
contentViewToShow = this.instancesContentView;
break;
@@ -263,6 +238,5 @@
WebInspector.HeapSnapshotClusterContentView.ContentViewIdentifierCookieKey = "heap-snapshot-cluster-content-view-identifier";
-WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier = "summary";
WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier = "instances";
WebInspector.HeapSnapshotClusterContentView.ObjectGraphIdentifier = "object-graph";
Deleted: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css (200516 => 200517)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css 2016-05-06 19:54:32 UTC (rev 200517)
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-.content-view-container > .content-view.heap-snapshot-summary {
- overflow: scroll;
-}
-
-.heap-snapshot-summary > .content {
- width: 470px;
- margin: 10px auto;
-}
-
-.heap-snapshot-summary > .content > .overview {
- padding: 10px;
- margin-bottom: 10px;
- border-bottom: 1px solid var(--border-color);
-}
-
-.heap-snapshot-summary > .content .subtitle {
- font-family: '-webkit-system-font';
- font-size: 14px;
-}
-
-.heap-snapshot-summary > .content > .overview {
- display: flex;
- justify-content: center;
-}
-
-.heap-snapshot-summary > .content > .overview > .chart {
- width: 420px;
- text-align: center;
-}
-
-.heap-snapshot-summary > .content > .overview > .chart > .subtitle {
- margin-bottom: 1em;
-}
-
-.heap-snapshot-summary > .content > .overview > .chart > .container {
- display: flex;
- justify-content: center;
-}
-
-.heap-snapshot-summary > .content > .overview .total-size,
-.heap-snapshot-summary > .content > .overview .total-count,
-.heap-snapshot-summary > .content > .overview .average-allocation-size {
- margin: auto;
- color: hsl(0, 0%, 70%);
-}
-
-.heap-snapshot-summary .legend {
- width: 120px;
- padding-left: 20px;
- text-align: left;
-}
-
-.heap-snapshot-summary .legend > .row {
- position: relative;
- height: 27px;
-}
-
-.heap-snapshot-summary .legend > .row > .swatch {
- position: absolute;
- top: 1px;
- left: 0;
- width: 1em;
- height: 1em;
-}
-
-.heap-snapshot-summary .legend > .row > p {
- margin: 0;
-}
-
-.heap-snapshot-summary .legend > .row > .label {
- position: absolute;
- top: 0;
- left: 20px;
-}
-
-.heap-snapshot-summary .legend > .row > .size {
- position: absolute;
- top: 12px;
- left: 20px;
- color: hsl(0, 0%, 70%);
-}
-
-.heap-snapshot-summary .legend > .row > .swatch.top-class-1,
-.heap-snapshot-summary .legend > .row > .swatch.small {
- border: 1px solid var(--memory-_javascript_-stroke-color);
- background: var(--memory-_javascript_-fill-color);
-}
-
-.heap-snapshot-summary .legend > .row > .swatch.top-class-2,
-.heap-snapshot-summary .legend > .row > .swatch.medium {
- border: 1px solid var(--memory-images-stroke-color);
- background: var(--memory-images-fill-color);
-}
-
-.heap-snapshot-summary .legend > .row > .swatch.top-class-3,
-.heap-snapshot-summary .legend > .row > .swatch.large {
- border: 1px solid var(--memory-layers-stroke-color);
- background: var(--memory-layers-fill-color);
-}
-
-.heap-snapshot-summary .legend > .row > .swatch.top-class-4,
-.heap-snapshot-summary .legend > .row > .swatch.very-large {
- border: 1px solid var(--memory-page-stroke-color);
- background: var(--memory-page-fill-color);
-}
-
-.heap-snapshot-summary .legend > .row > .swatch.top-class-5 {
- border: 1px solid var(--memory-extra-stroke-color);
- background: var(--memory-extra-fill-color);
-}
-
-.heap-snapshot-summary .legend > .row > .swatch.other {
- border: 1px solid var(--memory-max-comparison-stroke-color);
- background: var(--memory-max-comparison-fill-color);
-}
-
-.heap-snapshot-summary .circle-chart > svg > path.top-class-1,
-.heap-snapshot-summary .circle-chart > svg > path.small {
- stroke: var(--memory-_javascript_-stroke-color);
- fill: var(--memory-_javascript_-fill-color);
-}
-
-.heap-snapshot-summary .circle-chart > svg > path.top-class-2,
-.heap-snapshot-summary .circle-chart > svg > path.medium {
- stroke: var(--memory-images-stroke-color);
- fill: var(--memory-images-fill-color);
-}
-
-.heap-snapshot-summary .circle-chart > svg > path.top-class-3,
-.heap-snapshot-summary .circle-chart > svg > path.large {
- stroke: var(--memory-layers-stroke-color);
- fill: var(--memory-layers-fill-color);
-}
-
-.heap-snapshot-summary .circle-chart > svg > path.top-class-4,
-.heap-snapshot-summary .circle-chart > svg > path.very-large {
- stroke: var(--memory-page-stroke-color);
- fill: var(--memory-page-fill-color);
-}
-
-.heap-snapshot-summary .circle-chart > svg > path.top-class-5 {
- stroke: var(--memory-extra-stroke-color);
- fill: var(--memory-extra-fill-color);
-}
-
-.heap-snapshot-summary .circle-chart > svg > path.other {
- stroke: var(--memory-max-comparison-stroke-color);
- fill: var(--memory-max-comparison-fill-color);
-}
Deleted: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js (200516 => 200517)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js 2016-05-06 19:54:32 UTC (rev 200517)
@@ -1,219 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WebInspector.HeapSnapshotSummaryContentView = class HeapSnapshotSummaryContentView extends WebInspector.ContentView
-{
- constructor(heapSnapshot)
- {
- console.assert(heapSnapshot instanceof WebInspector.HeapSnapshotProxy || heapSnapshot instanceof WebInspector.HeapSnapshotDiffProxy);
-
- super(heapSnapshot);
-
- this._heapSnapshot = heapSnapshot;
-
- this.element.classList.add("heap-snapshot-summary");
-
- let contentElement = this.element.appendChild(document.createElement("div"));
- contentElement.classList.add("content");
-
- let overviewElement = contentElement.appendChild(document.createElement("div"));
- overviewElement.classList.add("overview");
-
- function createChartContainer(parentElement, subtitle, tooltip)
- {
- let chartElement = parentElement.appendChild(document.createElement("div"));
- chartElement.classList.add("chart");
-
- let chartSubtitleElement = chartElement.appendChild(document.createElement("div"));
- chartSubtitleElement.classList.add("subtitle");
- chartSubtitleElement.textContent = subtitle;
- chartSubtitleElement.title = tooltip;
-
- let chartFlexContainerElement = chartElement.appendChild(document.createElement("div"));
- chartFlexContainerElement.classList.add("container");
- return chartFlexContainerElement;
- }
-
- const circleChartConfig = {size: 120, innerRadiusRatio: 0.5};
-
- let classSizeBreakdownTooltip = WebInspector.UIString("Breakdown of total allocation size by class");
- let classSizeBreakdownChartContainerElement = createChartContainer(overviewElement, WebInspector.UIString("Class Size Breakdown"), classSizeBreakdownTooltip);
- this._classSizeBreakdownCircleChart = new WebInspector.CircleChart(circleChartConfig);
- classSizeBreakdownChartContainerElement.appendChild(this._classSizeBreakdownCircleChart.element);
- this._classSizeBreakdownLegendElement = classSizeBreakdownChartContainerElement.appendChild(document.createElement("div"));
- this._classSizeBreakdownLegendElement.classList.add("legend", "class-breakdown");
-
- let secondOverviewElement = contentElement.appendChild(document.createElement("div"));
- secondOverviewElement.classList.add("overview");
-
- let classCountBreakdownTooltip = WebInspector.UIString("Breakdown of object counts by class");
- let classCountBreakdownChartContainerElement = createChartContainer(secondOverviewElement, WebInspector.UIString("Class Count Breakdown"), classCountBreakdownTooltip);
- this._classCountBreakdownCircleChart = new WebInspector.CircleChart(circleChartConfig);
- classCountBreakdownChartContainerElement.appendChild(this._classCountBreakdownCircleChart.element);
- this._classCountBreakdownLegendElement = classCountBreakdownChartContainerElement.appendChild(document.createElement("div"));
- this._classCountBreakdownLegendElement.classList.add("legend", "count-breakdown");
-
- let thirdOverviewElement = contentElement.appendChild(document.createElement("div"));
- thirdOverviewElement.classList.add("overview");
-
- let allocationSizeBreakdownTooltip = WebInspector.UIString("Breakdown of allocations into size classes");
- let allocationSizeBreakdownChartContainerElement = createChartContainer(thirdOverviewElement, WebInspector.UIString("Allocation Size Breakdown"), allocationSizeBreakdownTooltip);
- this._allocationSizeBreakdownCircleChart = new WebInspector.CircleChart(circleChartConfig);
- allocationSizeBreakdownChartContainerElement.appendChild(this._allocationSizeBreakdownCircleChart.element);
- this._allocationSizeBreakdownLegendElement = allocationSizeBreakdownChartContainerElement.appendChild(document.createElement("div"));
- this._allocationSizeBreakdownLegendElement.classList.add("legend", "allocation-size-breakdown");
-
- function appendLegendRow(legendElement, swatchClass, label, subtitle, tooltip) {
- let rowElement = legendElement.appendChild(document.createElement("div"));
- rowElement.classList.add("row");
- let swatchElement = rowElement.appendChild(document.createElement("div"));
- swatchElement.classList.add("swatch", swatchClass);
- let labelElement = rowElement.appendChild(document.createElement("p"));
- labelElement.classList.add("label");
- labelElement.textContent = label;
- let sizeElement = rowElement.appendChild(document.createElement("p"));
- sizeElement.classList.add("size");
- sizeElement.textContent = subtitle;
- if (tooltip)
- rowElement.title = tooltip;
- }
-
- function appendEmptyMessage(legendElement, text) {
- let emptyElement = legendElement.appendChild(document.createElement("div"));
- emptyElement.classList.add("empty");
- emptyElement.textContent = text;
- }
-
- // Largest classes by size.
- let categoriesBySize = [...this._heapSnapshot.categories.values()].sort((a, b) => b.size - a.size);
- let categoriesBySizeLimit = Math.min(categoriesBySize.length, 5);
- if (categoriesBySizeLimit) {
- let topClassSizes = categoriesBySize.splice(0, categoriesBySizeLimit);
- let otherClassSize = categoriesBySize.reduce((sum, category) => sum += category.size, 0);
-
- let segments = [];
- let values = [];
-
- for (let i = 0; i < categoriesBySizeLimit; ++i) {
- let topClassSize = topClassSizes[i];
- let segmentName = "top-class-" + (i + 1);
- segments.push(segmentName);
- values.push(topClassSize.size);
- appendLegendRow.call(this, this._classSizeBreakdownLegendElement, segmentName, topClassSize.className, Number.bytesToString(topClassSize.size));
- }
-
- if (otherClassSize) {
- let otherSegmentName = "other";
- segments.push(otherSegmentName);
- values.push(otherClassSize);
- appendLegendRow.call(this, this._classSizeBreakdownLegendElement, otherSegmentName, WebInspector.UIString("Other"), Number.bytesToString(otherClassSize));
- }
-
- this._classSizeBreakdownCircleChart.segments = segments;
- this._classSizeBreakdownCircleChart.values = values;
- this._classSizeBreakdownCircleChart.updateLayout();
-
- let totalSizeElement = this._classSizeBreakdownCircleChart.centerElement.appendChild(document.createElement("div"));
- totalSizeElement.classList.add("total-size");
- totalSizeElement.appendChild(document.createElement("span")); // firstChild
- totalSizeElement.appendChild(document.createElement("br"));
- totalSizeElement.appendChild(document.createElement("span")); // lastChild
- let totalSize = Number.bytesToString(this._heapSnapshot.totalSize).split(/\s+/);
- totalSizeElement.firstChild.textContent = totalSize[0];
- totalSizeElement.lastChild.textContent = totalSize[1];
- totalSizeElement.title = WebInspector.UIString("Total size of heap");
- } else
- appendEmptyMessage.call(this, this._classSizeBreakdownLegendElement, WebInspector.UIString("No objects"));
-
- // Largest classes by count.
- let categoriesByCount = [...this._heapSnapshot.categories.values()].sort((a, b) => b.count - a.count);
- let categoriesByCountLimit = Math.min(categoriesByCount.length, 5);
- if (categoriesByCountLimit) {
- let topClassCounts = categoriesByCount.splice(0, categoriesByCountLimit);
- let otherClassCount = categoriesByCount.reduce((sum, category) => sum += category.count, 0);
-
- let segments = [];
- let values = [];
-
- for (let i = 0; i < categoriesByCountLimit; ++i) {
- let topClassCount = topClassCounts[i];
- let segmentName = "top-class-" + (i + 1);
- segments.push(segmentName);
- values.push(topClassCount.count);
- appendLegendRow.call(this, this._classCountBreakdownLegendElement, segmentName, topClassCount.className, topClassCount.count);
- }
-
- if (otherClassCount) {
- let otherSegmentName = "other";
- segments.push(otherSegmentName);
- values.push(otherClassCount);
- appendLegendRow.call(this, this._classCountBreakdownLegendElement, otherSegmentName, WebInspector.UIString("Other"), otherClassCount);
- }
-
- this._classCountBreakdownCircleChart.segments = segments;
- this._classCountBreakdownCircleChart.values = values;
- this._classCountBreakdownCircleChart.updateLayout();
-
- let totalCountElement = this._classCountBreakdownCircleChart.centerElement.appendChild(document.createElement("div"));
- totalCountElement.classList.add("total-count");
- totalCountElement.textContent = this._heapSnapshot.totalObjectCount;
- totalCountElement.title = WebInspector.UIString("Total object count");
- } else
- appendEmptyMessage.call(this, this._classCountBreakdownLegendElement, WebInspector.UIString("No objects"));
-
- // Allocation size groups.
- const smallAllocationSize = 48;
- const mediumAllocationSize = 128;
- const largeAllocationSize = 512;
-
- this._heapSnapshot.allocationBucketCounts([smallAllocationSize, mediumAllocationSize, largeAllocationSize], (results) => {
- let [small, medium, large, veryLarge] = results;
-
- if (small + medium + large + veryLarge) {
- appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, "small", WebInspector.UIString("Small %s").format(Number.bytesToString(smallAllocationSize)), small);
- appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, "medium", WebInspector.UIString("Medium %s").format(Number.bytesToString(mediumAllocationSize)), medium);
- appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, "large", WebInspector.UIString("Large %s").format(Number.bytesToString(largeAllocationSize)), large);
- appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, "very-large", WebInspector.UIString("Very Large"), veryLarge);
-
- this._allocationSizeBreakdownCircleChart.segments = ["small", "medium", "large", "very-large"];
- this._allocationSizeBreakdownCircleChart.values = [small, medium, large, veryLarge];
- this._allocationSizeBreakdownCircleChart.updateLayout();
-
- let averageAllocationSizeElement = this._allocationSizeBreakdownCircleChart.centerElement.appendChild(document.createElement("div"));
- averageAllocationSizeElement.classList.add("average-allocation-size");
- averageAllocationSizeElement.textContent = Number.bytesToString(this._heapSnapshot.totalSize / this._heapSnapshot.totalObjectCount);
- averageAllocationSizeElement.title = WebInspector.UIString("Average allocation size");
- } else
- appendEmptyMessage.call(this, this._allocationSizeBreakdownLegendElement, WebInspector.UIString("No objects"));
- });
- }
-
- // Protected
-
- layout()
- {
- // Nothing to change.
- }
-};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css (200516 => 200517)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css 2016-05-06 19:54:15 UTC (rev 200516)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css 2016-05-06 19:54:32 UTC (rev 200517)
@@ -67,8 +67,6 @@
--memory-page-stroke-color: hsl(22, 40%, 50%);
--memory-max-comparison-fill-color: hsl(220, 10%, 75%);
--memory-max-comparison-stroke-color: hsl(220, 10%, 55%);
- --memory-extra-fill-color: hsl(211, 53%, 70%);
- --memory-extra-stroke-color: hsl(211, 53%, 55%);
--even-zebra-stripe-row-background-color: white;
--odd-zebra-stripe-row-background-color: hsl(0, 0%, 95%);