~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/inspector/front-end/TimelinePanel.js

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
    {
272
272
        this._lastRecord = null;
273
273
        this._sendRequestRecords = {};
 
274
        this._records = [];
 
275
        this._boundariesAreValid = false;
274
276
        this._overviewPane.reset();
275
 
        this._records = [];
 
277
        this._adjustScrollPosition(0);
276
278
        this._refresh();
277
279
    },
278
280
 
296
298
    {
297
299
        this._scheduleRefresh();
298
300
    },
299
 
  
 
301
 
300
302
    _scheduleRefresh: function(preserveBoundaries)
301
303
    {
302
304
        this._boundariesAreValid &= preserveBoundaries;
356
358
        const expandOffset = 15;
357
359
 
358
360
        // Convert visible area to visible indexes. Always include top-level record for a visible nested record.
359
 
        var startIndex = Math.max(0, Math.floor(visibleTop / rowHeight) - 1);
 
361
        var startIndex = Math.max(0, Math.min(Math.floor(visibleTop / rowHeight) - 1, recordsInWindow.length - 1));
360
362
        while (startIndex > 0 && recordsInWindow[startIndex].parent)
361
363
            startIndex--;
362
364
        var endIndex = Math.min(recordsInWindow.length, Math.ceil(visibleBottom / rowHeight));
363
 
        while (endIndex < recordsInWindow.length - 1 && recordsInWindow[startIndex].parent)
 
365
        while (endIndex < recordsInWindow.length - 1 && recordsInWindow[endIndex].parent)
364
366
            endIndex++;
365
367
 
366
368
        // Resize gaps first.