Changeset 117562 in webkit
- Timestamp:
- May 18, 2012 1:25:07 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117556 r117562 1 2012-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 1 18 2012-05-17 Ryosuke Niwa <rniwa@webkit.org> 2 19 -
trunk/Source/WebCore/inspector/front-end/ShowMoreDataGridNode.js
r116847 r117562 48 48 this.showNext.setAttribute("type", "button"); 49 49 this.showNext.addEventListener("click", this._showNextChunk.bind(this), false); 50 this.showNext.textContent = WebInspector.UIString("Show %d before", this._chunkSize); 50 51 51 52 this.showAll = document.createElement("button"); 52 53 this.showAll.setAttribute("type", "button"); 53 54 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); 54 60 55 61 this._updateLabels(); … … 68 74 }, 69 75 76 _showLastChunk: function() 77 { 78 this._callback(this._endPosition - this._chunkSize, this._endPosition); 79 }, 80 70 81 _updateLabels: function() 71 82 { 72 83 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 } 75 91 this.showAll.textContent = WebInspector.UIString("Show all %d", totalSize); 76 92 }, … … 82 98 cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px"); 83 99 cell.appendChild(this.showNext); 84 if (this.showAll)85 cell.appendChild(this.showAll);100 cell.appendChild(this.showAll); 101 cell.appendChild(this.showLast); 86 102 this._element.appendChild(cell); 87 103
Note: See TracChangeset
for help on using the changeset viewer.