Title: [203908] trunk/Source/WebInspectorUI
- Revision
- 203908
- Author
- mattba...@apple.com
- Date
- 2016-07-29 11:40:27 -0700 (Fri, 29 Jul 2016)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (203907 => 203908)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-07-29 18:38:58 UTC (rev 203907)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-07-29 18:40:27 UTC (rev 203908)
@@ -1,3 +1,22 @@
+2016-07-29 Matt Baker <mattba...@apple.com>
+
+ 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.
+
2016-07-28 Chris Dumez <cdu...@apple.com>
Parameters to Event.initEvent() should be mandatory
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (203907 => 203908)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2016-07-29 18:38:58 UTC (rev 203907)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2016-07-29 18:40:27 UTC (rev 203908)
@@ -181,6 +181,9 @@
this._timelineRuler.zeroTime = this.zeroTime;
this._timelineRuler.startTime = this.zeroTime;
+ if (this.startTime >= this.endTime)
+ return;
+
for (let dataGridNode of this._dataGrid.children)
dataGridNode.refreshGraph();
@@ -287,17 +290,14 @@
{
console.assert(this._scheduledCurrentTimeUpdateIdentifier);
- let startTime = this.startTime;
- let currentTime = this.currentTime;
- let endTime = this.endTime;
- let timespanSinceLastUpdate = (timestamp - this._lastUpdateTimestamp) / 1000 || 0;
+ if (!isNaN(this._lastUpdateTimestamp)) {
+ let timespanSinceLastUpdate = (timestamp - this._lastUpdateTimestamp) / 1000 || 0;
+ this._timelineRuler.endTime = this.currentTime + timespanSinceLastUpdate;
- currentTime += timespanSinceLastUpdate;
+ this.updateLayout();
+ }
- this._timelineRuler.endTime = currentTime;
this._lastUpdateTimestamp = timestamp;
- this.updateLayout();
-
this._scheduledCurrentTimeUpdateIdentifier = requestAnimationFrame(this._updateCallback);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes