Title: [208832] trunk/Source/WebInspectorUI
- Revision
- 208832
- Author
- [email protected]
- Date
- 2016-11-16 17:15:43 -0800 (Wed, 16 Nov 2016)
Log Message
Web Inspector: Background tabs are often updating non-stop because they think they are visible
https://bugs.webkit.org/show_bug.cgi?id=164841
<rdar://problem/29298658>
Patch by Joseph Pecoraro <[email protected]> on 2016-11-16
Reviewed by Matt Baker.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._update):
Don't constantly update when this tab is not in the foreground.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (208831 => 208832)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-11-17 01:14:35 UTC (rev 208831)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-11-17 01:15:43 UTC (rev 208832)
@@ -1,3 +1,17 @@
+2016-11-16 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Background tabs are often updating non-stop because they think they are visible
+ https://bugs.webkit.org/show_bug.cgi?id=164841
+ <rdar://problem/29298658>
+
+ Reviewed by Matt Baker.
+
+ * UserInterface/Views/NetworkGridContentView.js:
+ (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView.prototype._update):
+ Don't constantly update when this tab is not in the foreground.
+
2016-11-15 Joseph Pecoraro <[email protected]>
Web Inspector: SourceCodeTextEditor should display execution lines for background threads
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (208831 => 208832)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2016-11-17 01:14:35 UTC (rev 208831)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2016-11-17 01:15:43 UTC (rev 208832)
@@ -268,8 +268,11 @@
if (isNaN(this._startTime))
this._startTime = resourceTimelineRecord.startTime;
- if (this.visible)
- this._startUpdatingCurrentTime();
+ // FIXME: <https://webkit.org/b/153634> Web Inspector: some background tabs think they are the foreground tab and do unnecessary work
+ if (!(WebInspector.tabBrowser.selectedTabContentView instanceof WebInspector.NetworkTabContentView))
+ return;
+
+ this._startUpdatingCurrentTime();
}
_treeElementPathComponentSelected(event)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (208831 => 208832)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-11-17 01:14:35 UTC (rev 208831)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-11-17 01:15:43 UTC (rev 208832)
@@ -383,6 +383,10 @@
_update(timestamp)
{
+ // FIXME: <https://webkit.org/b/153634> Web Inspector: some background tabs think they are the foreground tab and do unnecessary work
+ if (!(WebInspector.tabBrowser.selectedTabContentView instanceof WebInspector.TimelineTabContentView))
+ return;
+
if (this._waitingToResetCurrentTime) {
requestAnimationFrame(this._updateCallback);
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes