Changeset 53588 in webkit


Ignore:
Timestamp:
Jan 20, 2010 6:08:21 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-20 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Pavel Feldman.

Timeline reset button doesn't clean timeline if the panel is scrolled down.
The overview pane also stay dirty after reset.
https://bugs.webkit.org/show_bug.cgi?id=33829

  • inspector/front-end/TimelineGrid.js: (WebInspector.TimelineGrid.prototype.updateDividers):
  • inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype.reset):
  • inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.reset): (WebInspector.TimelinePanel.prototype._refreshRecords):
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53587 r53588  
     12010-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Timeline reset button doesn't clean timeline if the panel is scrolled down.
     6        The overview pane also stay dirty after reset.
     7        https://bugs.webkit.org/show_bug.cgi?id=33829
     8
     9        * inspector/front-end/TimelineGrid.js:
     10        (WebInspector.TimelineGrid.prototype.updateDividers):
     11        * inspector/front-end/TimelineOverviewPane.js:
     12        (WebInspector.TimelineOverviewPane.prototype.reset):
     13        * inspector/front-end/TimelinePanel.js:
     14        (WebInspector.TimelinePanel.prototype.reset):
     15        (WebInspector.TimelinePanel.prototype._refreshRecords):
     16
    1172010-01-20  Alexey Proskuryakov  <ap@apple.com>
    218
  • trunk/WebCore/inspector/front-end/TimelineGrid.js

    r53167 r53588  
    101101            if (!isNaN(slice))
    102102                dividerLabelBar._labelElement.textContent = calculator.formatValue(slice * i);
     103            else
     104                dividerLabelBar._labelElement.textContent = "";
    103105
    104106            divider = divider.nextSibling;
  • trunk/WebCore/inspector/front-end/TimelineOverviewPane.js

    r51339 r53588  
    174174    reset: function()
    175175    {
     176        this.windowLeft = 0.0;
     177        this.windowRight = 1.0;
     178        this._setWindowPosition(0, this._overviewGrid.element.clientWidth);
    176179        this._overviewCalculator.reset();
    177180        this._overviewGrid.updateDividers(true, this._overviewCalculator);
    178         this.windowLeft = 0.0;
    179         this.windowRight = 1.0;
    180181    },
    181182
  • trunk/WebCore/inspector/front-end/TimelinePanel.js

    r53413 r53588  
    272272        this._lastRecord = null;
    273273        this._sendRequestRecords = {};
     274        this._records = [];
     275        this._boundariesAreValid = false;
    274276        this._overviewPane.reset();
    275         this._records = [];
     277        this._adjustScrollPosition(0);
    276278        this._refresh();
    277279    },
     
    297299        this._scheduleRefresh();
    298300    },
    299  
     301
    300302    _scheduleRefresh: function(preserveBoundaries)
    301303    {
     
    357359
    358360        // 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));
    360362        while (startIndex > 0 && recordsInWindow[startIndex].parent)
    361363            startIndex--;
    362364        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)
    364366            endIndex++;
    365367
Note: See TracChangeset for help on using the changeset viewer.