Title: [117562] trunk/Source/WebCore
Revision
117562
Author
[email protected]
Date
2012-05-18 01:25:07 -0700 (Fri, 18 May 2012)

Log Message

Web Inspector: add an option to show last N hidden children of node in heap profiler
https://bugs.webkit.org/show_bug.cgi?id=86757

Reviewed by Pavel Feldman.

Renamed "Show next N" to "Show N before" and added "Show N after" button. Also
when all 3 buttons would have equal effect there is now only "Show all N" button.

* English.lproj/localizedStrings.js:
* inspector/front-end/ShowMoreDataGridNode.js:
(WebInspector.ShowMoreDataGridNode):
(WebInspector.ShowMoreDataGridNode.prototype._showLastChunk):
(WebInspector.ShowMoreDataGridNode.prototype._updateLabels):
(WebInspector.ShowMoreDataGridNode.prototype.createCells):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (117561 => 117562)


--- trunk/Source/WebCore/ChangeLog	2012-05-18 08:15:58 UTC (rev 117561)
+++ trunk/Source/WebCore/ChangeLog	2012-05-18 08:25:07 UTC (rev 117562)
@@ -1,3 +1,20 @@
+2012-05-17  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: add an option to show last N hidden children of node in heap profiler
+        https://bugs.webkit.org/show_bug.cgi?id=86757
+
+        Reviewed by Pavel Feldman.
+
+        Renamed "Show next N" to "Show N before" and added "Show N after" button. Also
+        when all 3 buttons would have equal effect there is now only "Show all N" button.
+
+        * English.lproj/localizedStrings.js:
+        * inspector/front-end/ShowMoreDataGridNode.js:
+        (WebInspector.ShowMoreDataGridNode):
+        (WebInspector.ShowMoreDataGridNode.prototype._showLastChunk):
+        (WebInspector.ShowMoreDataGridNode.prototype._updateLabels):
+        (WebInspector.ShowMoreDataGridNode.prototype.createCells):
+
 2012-05-17  Ryosuke Niwa  <[email protected]>
 
         WebKit erroneously add 1px padding in input elements

Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js


(Binary files differ)

Modified: trunk/Source/WebCore/inspector/front-end/ShowMoreDataGridNode.js (117561 => 117562)


--- trunk/Source/WebCore/inspector/front-end/ShowMoreDataGridNode.js	2012-05-18 08:15:58 UTC (rev 117561)
+++ trunk/Source/WebCore/inspector/front-end/ShowMoreDataGridNode.js	2012-05-18 08:25:07 UTC (rev 117562)
@@ -47,11 +47,17 @@
     this.showNext = document.createElement("button");
     this.showNext.setAttribute("type", "button");
     this.showNext.addEventListener("click", this._showNextChunk.bind(this), false);
+    this.showNext.textContent = WebInspector.UIString("Show %d before", this._chunkSize);
 
     this.showAll = document.createElement("button");
     this.showAll.setAttribute("type", "button");
     this.showAll.addEventListener("click", this._showAll.bind(this), false);
 
+    this.showLast = document.createElement("button");
+    this.showLast.setAttribute("type", "button");
+    this.showLast.addEventListener("click", this._showLastChunk.bind(this), false);
+    this.showLast.textContent = WebInspector.UIString("Show %d after", this._chunkSize);
+
     this._updateLabels();
     this.selectable = false;
 }
@@ -67,11 +73,21 @@
         this._callback(this._startPosition, this._endPosition);
     },
 
+    _showLastChunk: function()
+    {
+        this._callback(this._endPosition - this._chunkSize, this._endPosition);
+    },
+
     _updateLabels: function()
     {
         var totalSize = this._endPosition - this._startPosition;
-        var nextChunkSize = Math.min(this._chunkSize, totalSize);
-        this.showNext.textContent = WebInspector.UIString("Show next %d", nextChunkSize);
+        if (totalSize > this._chunkSize) {
+            this.showNext.removeStyleClass("hidden");
+            this.showLast.removeStyleClass("hidden");
+        } else {
+            this.showNext.addStyleClass("hidden");
+            this.showLast.addStyleClass("hidden");
+        }
         this.showAll.textContent = WebInspector.UIString("Show all %d", totalSize);
     },
 
@@ -81,8 +97,8 @@
         if (this.depth)
             cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px");
         cell.appendChild(this.showNext);
-        if (this.showAll)
-            cell.appendChild(this.showAll);
+        cell.appendChild(this.showAll);
+        cell.appendChild(this.showLast);
         this._element.appendChild(cell);
 
         var columns = this.dataGrid.columns;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to