Changeset 53188 in webkit
- Timestamp:
- Jan 13, 2010 8:31:49 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53187 r53188 1 2010-01-13 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: Timeline panel scrolling speed can be increased. 6 https://bugs.webkit.org/show_bug.cgi?id=33579 7 8 * inspector/front-end/TimelinePanel.js: 9 (WebInspector.TimelinePanel): 10 (WebInspector.TimelinePanel.prototype._scheduleRefresh): 11 (WebInspector.TimelinePanel.prototype._refresh): 12 (WebInspector.TimelinePanel.prototype._refreshRecords): 13 1 14 2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 15 -
trunk/WebCore/inspector/front-end/TimelinePanel.js
r51528 r53188 35 35 36 36 this._overviewPane = new WebInspector.TimelineOverviewPane(this.categories); 37 this._overviewPane.addEventListener("window changed", this._ scheduleRefresh, this);37 this._overviewPane.addEventListener("window changed", this._windowChanged, this); 38 38 this._overviewPane.addEventListener("filter changed", this._refresh, this); 39 39 this.element.appendChild(this._overviewPane.element); … … 81 81 this._sendRequestRecords = {}; 82 82 this._calculator = new WebInspector.TimelineCalculator(); 83 this._boundariesAreValid = true; 83 84 } 84 85 … … 292 293 }, 293 294 294 _scheduleRefresh: function(immediate) 295 { 295 _windowChanged: function() 296 { 297 this._scheduleRefresh(); 298 }, 299 300 _scheduleRefresh: function(preserveBoundaries) 301 { 302 this._boundariesAreValid &= preserveBoundaries; 296 303 if (this._needsRefresh) 297 304 return; … … 299 306 300 307 if (this.visible && !("_refreshTimeout" in this)) 301 this._refreshTimeout = setTimeout(this._refresh.bind(this), immediate? 0 : 100);308 this._refreshTimeout = setTimeout(this._refresh.bind(this), preserveBoundaries ? 0 : 100); 302 309 }, 303 310 … … 309 316 delete this._refreshTimeout; 310 317 } 311 this._overviewPane.update(this._records); 312 this._refreshRecords(); 313 }, 314 315 _refreshRecords: function() 316 { 317 this._calculator.windowLeft = this._overviewPane.windowLeft; 318 this._calculator.windowRight = this._overviewPane.windowRight; 319 this._calculator.reset(); 320 321 for (var i = 0; i < this._records.length; ++i) 322 this._calculator.updateBoundaries(this._records[i]); 318 319 if (!this._boundariesAreValid) 320 this._overviewPane.update(this._records); 321 this._refreshRecords(!this._boundariesAreValid); 322 this._boundariesAreValid = true; 323 }, 324 325 _refreshRecords: function(updateBoundaries) 326 { 327 if (updateBoundaries) { 328 this._calculator.windowLeft = this._overviewPane.windowLeft; 329 this._calculator.windowRight = this._overviewPane.windowRight; 330 this._calculator.reset(); 331 332 for (var i = 0; i < this._records.length; ++i) 333 this._calculator.updateBoundaries(this._records[i]); 334 } 323 335 324 336 var recordsInWindow = []; … … 392 404 // Reserve some room for expand / collapse controls to the left for records that start at 0ms. 393 405 var timelinePaddingLeft = this._calculator.windowLeft === 0 ? expandOffset : 0; 394 this._timelineGrid.updateDividers(true, this._calculator, timelinePaddingLeft); 406 if (updateBoundaries) 407 this._timelineGrid.updateDividers(true, this._calculator, timelinePaddingLeft); 395 408 this._adjustScrollPosition((recordsInWindow.length + 1) * rowHeight); 396 409 },
Note: See TracChangeset
for help on using the changeset viewer.