Changeset 203908 in webkit


Ignore:
Timestamp:
Jul 29, 2016 11:40:27 AM (8 years ago)
Author:
Matt Baker
Message:

Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time
https://bugs.webkit.org/show_bug.cgi?id=160330
<rdar://problem/27600905>

Reviewed by Brian Burg.

When the first grid node is added, a view layout and current time update
are scheduled. A view layout occurring before the current time is updated
should be skipped, since the ruler end time hasn't been set.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView.prototype.layout):
Skip layout until current time is updated.
(WebInspector.NetworkGridContentView.prototype._update):
Remove unused variables startTime and endTime. Don't force a layout
if the elapsed time is zero.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r203848 r203908  
     12016-07-29  Matt Baker  <mattbaker@apple.com>
     2
     3        Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time
     4        https://bugs.webkit.org/show_bug.cgi?id=160330
     5        <rdar://problem/27600905>
     6
     7        Reviewed by Brian Burg.
     8
     9        When the first grid node is added, a view layout and current time update
     10        are scheduled. A view layout occurring before the current time is updated
     11        should be skipped, since the ruler end time hasn't been set.
     12
     13        * UserInterface/Views/NetworkGridContentView.js:
     14        (WebInspector.NetworkGridContentView.prototype.layout):
     15        Skip layout until current time is updated.
     16        (WebInspector.NetworkGridContentView.prototype._update):
     17        Remove unused variables `startTime` and `endTime`. Don't force a layout
     18        if the elapsed time is zero.
     19
    1202016-07-28  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js

    r203843 r203908  
    182182        this._timelineRuler.startTime = this.zeroTime;
    183183
     184        if (this.startTime >= this.endTime)
     185            return;
     186
    184187        for (let dataGridNode of this._dataGrid.children)
    185188            dataGridNode.refreshGraph();
     
    288291        console.assert(this._scheduledCurrentTimeUpdateIdentifier);
    289292
    290         let startTime = this.startTime;
    291         let currentTime = this.currentTime;
    292         let endTime = this.endTime;
    293         let timespanSinceLastUpdate = (timestamp - this._lastUpdateTimestamp) / 1000 || 0;
    294 
    295         currentTime += timespanSinceLastUpdate;
    296 
    297         this._timelineRuler.endTime = currentTime;
     293        if (!isNaN(this._lastUpdateTimestamp)) {
     294            let timespanSinceLastUpdate = (timestamp - this._lastUpdateTimestamp) / 1000 || 0;
     295            this._timelineRuler.endTime = this.currentTime + timespanSinceLastUpdate;
     296
     297            this.updateLayout();
     298        }
     299
    298300        this._lastUpdateTimestamp = timestamp;
    299         this.updateLayout();
    300 
    301301        this._scheduledCurrentTimeUpdateIdentifier = requestAnimationFrame(this._updateCallback);
    302302    }
Note: See TracChangeset for help on using the changeset viewer.