Title: [204579] trunk/Source/WebInspectorUI
- Revision
- 204579
- Author
- [email protected]
- Date
- 2016-08-17 16:02:08 -0700 (Wed, 17 Aug 2016)
Log Message
Web Inspector: Network Tab should not layout if not visible
https://bugs.webkit.org/show_bug.cgi?id=160920
<rdar://problem/27876629>
Reviewed by Timothy Hatcher.
Avoid updating the current time when the Network tab is hidden.
The timer, and any debounced timer cancellations, need to be stopped
as soon as the view is hidden.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype.hidden):
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
(WebInspector.NetworkGridContentView):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (204578 => 204579)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-08-17 22:24:04 UTC (rev 204578)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-08-17 23:02:08 UTC (rev 204579)
@@ -1,3 +1,21 @@
+2016-08-17 Matt Baker <[email protected]>
+
+ Web Inspector: Network Tab should not layout if not visible
+ https://bugs.webkit.org/show_bug.cgi?id=160920
+ <rdar://problem/27876629>
+
+ Reviewed by Timothy Hatcher.
+
+ Avoid updating the current time when the Network tab is hidden.
+ The timer, and any debounced timer cancellations, need to be stopped
+ as soon as the view is hidden.
+
+ * UserInterface/Views/NetworkGridContentView.js:
+ (WebInspector.NetworkGridContentView.prototype.hidden):
+ (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
+ (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
+ (WebInspector.NetworkGridContentView):
+
2016-08-17 Devin Rousso <[email protected]>
Web Inspector: Select elements in DOM hierarchy are misaligned
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (204578 => 204579)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2016-08-17 22:24:04 UTC (rev 204578)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2016-08-17 23:02:08 UTC (rev 204579)
@@ -149,6 +149,9 @@
{
this._dataGrid.hidden();
+ if (this._scheduledCurrentTimeUpdateIdentifier)
+ this._stopUpdatingCurrentTime();
+
super.hidden();
}
@@ -236,7 +239,9 @@
return;
this._endTime = resourceTimelineRecord.endTime;
- this.debounce(150)._stopUpdatingCurrentTime();
+
+ if (this._scheduledCurrentTimeUpdateIdentifier)
+ this.debounce(150)._stopUpdatingCurrentTime();
};
this._pendingRecords.push(resourceTimelineRecord);
@@ -252,12 +257,14 @@
resource.addEventListener(WebInspector.Resource.Event.LoadingDidFail, update, this);
this._loadingResourceCount++;
- if (this._loadingResourceCount && !this._scheduledCurrentTimeUpdateIdentifier) {
- if (isNaN(this._startTime))
- this._startTime = resourceTimelineRecord.startTime;
+ if (this._scheduledCurrentTimeUpdateIdentifier)
+ return;
+ if (isNaN(this._startTime))
+ this._startTime = resourceTimelineRecord.startTime;
+
+ if (this.visible)
this._startUpdatingCurrentTime();
- }
}
_treeElementPathComponentSelected(event)
@@ -330,6 +337,8 @@
if (!this._scheduledCurrentTimeUpdateIdentifier)
return;
+ this._stopUpdatingCurrentTime.cancelDebounce();
+
cancelAnimationFrame(this._scheduledCurrentTimeUpdateIdentifier);
this._scheduledCurrentTimeUpdateIdentifier = undefined;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes