Diff
Modified: trunk/Source/WebCore/ChangeLog (144756 => 144757)
--- trunk/Source/WebCore/ChangeLog 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/ChangeLog 2013-03-05 14:54:08 UTC (rev 144757)
@@ -1,3 +1,22 @@
+2013-03-05 Yury Semikhatsky <[email protected]>
+
+ Web Inspector: remove "Live native memory chart" experiment
+ https://bugs.webkit.org/show_bug.cgi?id=111432
+
+ Reviewed by Alexander Pavlov.
+
+ Removed support for live native memory chart.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/NativeMemorySnapshotView.js:
+ * inspector/front-end/ProfileLauncherView.js:
+ (WebInspector.ProfileLauncherView):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel):
+ * inspector/front-end/Settings.js:
+ (WebInspector.ExperimentsSettings):
+ * inspector/front-end/nativeMemoryProfiler.css:
+
2013-03-05 Andrey Kosyakov <[email protected]>
Web Inspector: remove length parameter from Parse HTML timeline event
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js (144756 => 144757)
--- trunk/Source/WebCore/English.lproj/localizedStrings.js 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/English.lproj/localizedStrings.js 2013-03-05 14:54:08 UTC (rev 144757)
@@ -819,7 +819,6 @@
localizedStrings["Memory cache resources"] = "Memory cache resources";
localizedStrings["_javascript_ heap"] = "_javascript_ heap";
localizedStrings["DOM storage cache"] = "DOM storage cache";
-localizedStrings["Live native memory chart"] = "Live native memory chart";
localizedStrings["Support for Sass"] = "Support for Sass";
localizedStrings["Render tree used"] = "Render tree used";
localizedStrings["Snippets support"] = "Snippets support";
Modified: trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js (144756 => 144757)
--- trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js 2013-03-05 14:54:08 UTC (rev 144757)
@@ -615,132 +615,3 @@
return new WebInspector.MemoryBlockViewProperties("inherit", memoryBlock.name, memoryBlock.name);
}
-
-/**
- * @constructor
- * @extends {WebInspector.View}
- */
-WebInspector.NativeMemoryBarChart = function()
-{
- WebInspector.View.call(this);
- this.registerRequiredCSS("nativeMemoryProfiler.css");
- this._memorySnapshot = null;
- this.element = document.createElement("div");
- this._table = this.element.createChild("table");
- this._divs = {};
- var row = this._table.insertRow();
- this._totalDiv = row.insertCell().createChild("div");
- this._totalDiv.addStyleClass("memory-bar-chart-total");
- row.insertCell();
-}
-
-WebInspector.NativeMemoryBarChart.prototype = {
- _updateStats: function()
- {
-
- /**
- * @param {?string} error
- * @param {?MemoryAgent.MemoryBlock} memoryBlock
- */
- function didReceiveMemorySnapshot(error, memoryBlock)
- {
- if (memoryBlock.size && memoryBlock.children) {
- var knownSize = 0;
- for (var i = 0; i < memoryBlock.children.length; i++) {
- var size = memoryBlock.children[i].size;
- if (size)
- knownSize += size;
- }
- var otherSize = memoryBlock.size - knownSize;
-
- if (otherSize) {
- memoryBlock.children.push({
- name: "Other",
- size: otherSize
- });
- }
- }
- this._memorySnapshot = memoryBlock;
- this._updateView();
- }
- MemoryAgent.getProcessMemoryDistribution(false, didReceiveMemorySnapshot.bind(this));
- },
-
- /**
- * @override
- */
- willHide: function()
- {
- clearInterval(this._timerId);
- },
-
- /**
- * @override
- */
- wasShown: function()
- {
- this._timerId = setInterval(this._updateStats.bind(this), 1000);
- },
-
- _updateView: function()
- {
- var memoryBlock = this._memorySnapshot;
- if (!memoryBlock)
- return;
-
- var MB = 1024 * 1024;
- var maxSize = 100 * MB;
- for (var i = 0; i < memoryBlock.children.length; ++i)
- maxSize = Math.max(maxSize, memoryBlock.children[i].size);
- var maxBarLength = 500;
- var barLengthSizeRatio = maxBarLength / maxSize;
-
- for (var i = memoryBlock.children.length - 1; i >= 0 ; --i) {
- var child = memoryBlock.children[i];
- var name = child.name;
- var divs = this._divs[name];
- if (!divs) {
- var row = this._table.insertRow();
- var nameDiv = row.insertCell(-1).createChild("div");
- var viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(child);
- var title = viewProperties._description;
- nameDiv.textContent = title;
- nameDiv.addStyleClass("memory-bar-chart-name");
- var barCell = row.insertCell(-1);
- var barDiv = barCell.createChild("div");
- barDiv.addStyleClass("memory-bar-chart-bar");
- viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(child);
- barDiv.style.backgroundColor = viewProperties._fillStyle;
- var unusedDiv = barDiv.createChild("div");
- unusedDiv.addStyleClass("memory-bar-chart-unused");
- var percentDiv = barDiv.createChild("div");
- percentDiv.addStyleClass("memory-bar-chart-percent");
- var sizeDiv = barCell.createChild("div");
- sizeDiv.addStyleClass("memory-bar-chart-size");
- divs = this._divs[name] = { barDiv: barDiv, unusedDiv: unusedDiv, percentDiv: percentDiv, sizeDiv: sizeDiv };
- }
- var unusedSize = 0;
- if (!!child.children) {
- var unusedName = name + ".Unused";
- for (var j = 0; j < child.children.length; ++j) {
- if (child.children[j].name === unusedName) {
- unusedSize = child.children[j].size;
- break;
- }
- }
- }
- var unusedLength = unusedSize * barLengthSizeRatio;
- var barLength = child.size * barLengthSizeRatio;
-
- divs.barDiv.style.width = barLength + "px";
- divs.unusedDiv.style.width = unusedLength + "px";
- divs.percentDiv.textContent = barLength > 20 ? (child.size / memoryBlock.size * 100).toFixed(0) + "%" : "";
- divs.sizeDiv.textContent = (child.size / MB).toFixed(1) + "\u2009MB";
- }
-
- var memoryBlockViewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(memoryBlock);
- this._totalDiv.textContent = memoryBlockViewProperties._description + ": " + (memoryBlock.size / MB).toFixed(1) + "\u2009MB";
- },
-
- __proto__: WebInspector.View.prototype
-}
Modified: trunk/Source/WebCore/inspector/front-end/ProfileLauncherView.js (144756 => 144757)
--- trunk/Source/WebCore/inspector/front-end/ProfileLauncherView.js 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/inspector/front-end/ProfileLauncherView.js 2013-03-05 14:54:08 UTC (rev 144757)
@@ -109,12 +109,6 @@
this._profileTypeSelectorForm = this._innerContentElement.createChild("form");
- if (WebInspector.experimentsSettings.liveNativeMemoryChart.isEnabled()) {
- this._nativeMemoryElement = this._innerContentElement.createChild("div");
- this._nativeMemoryLiveChart = new WebInspector.NativeMemoryBarChart();
- this._nativeMemoryLiveChart.show(this._nativeMemoryElement);
- }
-
this._innerContentElement.createChild("div", "flexible-space");
}
Modified: trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js (144756 => 144757)
--- trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2013-03-05 14:54:08 UTC (rev 144757)
@@ -378,12 +378,6 @@
this.clearResultsButton.addEventListener("click", this._clearProfiles, this);
this._statusBarButtons.push(this.clearResultsButton);
- if (WebInspector.experimentsSettings.liveNativeMemoryChart.isEnabled()) {
- this.garbageCollectButton = new WebInspector.StatusBarButton(WebInspector.UIString("Collect Garbage"), "garbage-collect-status-bar-item");
- this.garbageCollectButton.addEventListener("click", this._garbageCollectButtonClicked, this);
- this._statusBarButtons.push(this.garbageCollectButton);
- }
-
this._profileTypeStatusBarItemsContainer = document.createElement("div");
this._profileTypeStatusBarItemsContainer.className = "status-bar-items";
Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (144756 => 144757)
--- trunk/Source/WebCore/inspector/front-end/Settings.js 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js 2013-03-05 14:54:08 UTC (rev 144757)
@@ -204,7 +204,6 @@
// Add currently running experiments here.
this.snippetsSupport = this._createExperiment("snippetsSupport", "Snippets support");
this.nativeMemorySnapshots = this._createExperiment("nativeMemorySnapshots", "Native memory profiling");
- this.liveNativeMemoryChart = this._createExperiment("liveNativeMemoryChart", "Live native memory chart");
this.nativeMemoryTimeline = this._createExperiment("nativeMemoryTimeline", "Native memory timeline");
this.fileSystemInspection = this._createExperiment("fileSystemInspection", "FileSystem inspection");
this.canvasInspection = this._createExperiment("canvasInspection ", "Canvas inspection");
Modified: trunk/Source/WebCore/inspector/front-end/nativeMemoryProfiler.css (144756 => 144757)
--- trunk/Source/WebCore/inspector/front-end/nativeMemoryProfiler.css 2013-03-05 14:09:20 UTC (rev 144756)
+++ trunk/Source/WebCore/inspector/front-end/nativeMemoryProfiler.css 2013-03-05 14:54:08 UTC (rev 144757)
@@ -50,42 +50,6 @@
margin: 10px;
}
-.memory-bar-chart-name {
- text-align: right;
- white-space: nowrap;
-}
-
-.memory-bar-chart-bar {
- border: 0px;
- border-radius: 2px;
- float: left;
- height: 18px;
- overflow: hidden;
- position: relative;
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.5)), to(rgba(192, 192, 192, 0)));
-}
-
-.memory-bar-chart-unused {
- background-color: rgba(255, 255, 255, 0.5);
- float: right;
- height: 100%;
-}
-
-.memory-bar-chart-percent {
- position: absolute;
- text-align: center;
- width: 100%;
-}
-
-.memory-bar-chart-size {
- text-indent: 6px;
- white-space: nowrap;
-}
-
-.memory-bar-chart-total {
- font-weight: bold;
-}
-
.native-snapshot-view {
display: none;
overflow: hidden;