Changeset 117562 in webkit


Ignore:
Timestamp:
May 18, 2012 1:25:07 AM (12 years ago)
Author:
yurys@chromium.org
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117556 r117562  
     12012-05-17  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Web Inspector: add an option to show last N hidden children of node in heap profiler
     4        https://bugs.webkit.org/show_bug.cgi?id=86757
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Renamed "Show next N" to "Show N before" and added "Show N after" button. Also
     9        when all 3 buttons would have equal effect there is now only "Show all N" button.
     10
     11        * English.lproj/localizedStrings.js:
     12        * inspector/front-end/ShowMoreDataGridNode.js:
     13        (WebInspector.ShowMoreDataGridNode):
     14        (WebInspector.ShowMoreDataGridNode.prototype._showLastChunk):
     15        (WebInspector.ShowMoreDataGridNode.prototype._updateLabels):
     16        (WebInspector.ShowMoreDataGridNode.prototype.createCells):
     17
    1182012-05-17  Ryosuke Niwa  <rniwa@webkit.org>
    219
  • trunk/Source/WebCore/inspector/front-end/ShowMoreDataGridNode.js

    r116847 r117562  
    4848    this.showNext.setAttribute("type", "button");
    4949    this.showNext.addEventListener("click", this._showNextChunk.bind(this), false);
     50    this.showNext.textContent = WebInspector.UIString("Show %d before", this._chunkSize);
    5051
    5152    this.showAll = document.createElement("button");
    5253    this.showAll.setAttribute("type", "button");
    5354    this.showAll.addEventListener("click", this._showAll.bind(this), false);
     55
     56    this.showLast = document.createElement("button");
     57    this.showLast.setAttribute("type", "button");
     58    this.showLast.addEventListener("click", this._showLastChunk.bind(this), false);
     59    this.showLast.textContent = WebInspector.UIString("Show %d after", this._chunkSize);
    5460
    5561    this._updateLabels();
     
    6874    },
    6975
     76    _showLastChunk: function()
     77    {
     78        this._callback(this._endPosition - this._chunkSize, this._endPosition);
     79    },
     80
    7081    _updateLabels: function()
    7182    {
    7283        var totalSize = this._endPosition - this._startPosition;
    73         var nextChunkSize = Math.min(this._chunkSize, totalSize);
    74         this.showNext.textContent = WebInspector.UIString("Show next %d", nextChunkSize);
     84        if (totalSize > this._chunkSize) {
     85            this.showNext.removeStyleClass("hidden");
     86            this.showLast.removeStyleClass("hidden");
     87        } else {
     88            this.showNext.addStyleClass("hidden");
     89            this.showLast.addStyleClass("hidden");
     90        }
    7591        this.showAll.textContent = WebInspector.UIString("Show all %d", totalSize);
    7692    },
     
    8298            cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px");
    8399        cell.appendChild(this.showNext);
    84         if (this.showAll)
    85             cell.appendChild(this.showAll);
     100        cell.appendChild(this.showAll);
     101        cell.appendChild(this.showLast);
    86102        this._element.appendChild(cell);
    87103
Note: See TracChangeset for help on using the changeset viewer.