Title: [238864] trunk/Source/WebInspectorUI
- Revision
- 238864
- Author
- joep...@webkit.org
- Date
- 2018-12-04 11:07:57 -0800 (Tue, 04 Dec 2018)
Log Message
Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
https://bugs.webkit.org/show_bug.cgi?id=192248
<rdar://problem/46390199>
Reviewed by Devin Rousso.
* UserInterface/Base/Main.js:
(WI.transitionPageTarget):
Let the TimelineManager perform work on page transitions.
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.initializeTarget):
Initialize the autocapture state of the target.
(WI.TimelineManager.prototype.transitionPageTarget):
When transitioning pages perform a legacy (frontend based) timeline capture.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (238863 => 238864)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-12-04 19:01:33 UTC (rev 238863)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-12-04 19:07:57 UTC (rev 238864)
@@ -1,3 +1,22 @@
+2018-12-04 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
+ https://bugs.webkit.org/show_bug.cgi?id=192248
+ <rdar://problem/46390199>
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Base/Main.js:
+ (WI.transitionPageTarget):
+ Let the TimelineManager perform work on page transitions.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WI.TimelineManager.prototype.initializeTarget):
+ Initialize the autocapture state of the target.
+
+ (WI.TimelineManager.prototype.transitionPageTarget):
+ When transitioning pages perform a legacy (frontend based) timeline capture.
+
2018-12-04 Matt Baker <mattba...@apple.com>
Web Inspector: Elements: $0 is shown for all selected elements
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (238863 => 238864)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2018-12-04 19:01:33 UTC (rev 238863)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2018-12-04 19:07:57 UTC (rev 238864)
@@ -214,6 +214,7 @@
this.notifications.dispatchEventToListeners(WI.Notification.TransitionPageTarget);
WI.domManager.transitionPageTarget();
WI.networkManager.transitionPageTarget();
+ WI.timelineManager.transitionPageTarget();
};
WI.terminatePageTarget = function(target)
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (238863 => 238864)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2018-12-04 19:01:33 UTC (rev 238863)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2018-12-04 19:07:57 UTC (rev 238864)
@@ -49,6 +49,7 @@
this._autoCaptureOnPageLoad = false;
this._mainResourceForAutoCapturing = null;
this._shouldSetAutoCapturingMainResource = false;
+ this._transitioningPageTarget = false;
this._boundStopCapturing = this.stopCapturing.bind(this);
this._webTimelineScriptRecordsExpectingScriptProfilerEvents = null;
@@ -65,9 +66,20 @@
initializeTarget(target)
{
- this._updateAutoCaptureInstruments([target]);
+ if (target.TimelineAgent) {
+ this._updateAutoCaptureInstruments([target]);
+
+ // COMPATIBILITY (iOS 9): Timeline.setAutoCaptureEnabled did not exist.
+ if (target.TimelineAgent.setAutoCaptureEnabled)
+ target.TimelineAgent.setAutoCaptureEnabled(this._autoCaptureOnPageLoad);
+ }
}
+ transitionPageTarget()
+ {
+ this._transitioningPageTarget = true;
+ }
+
// Static
static defaultTimelineTypes()
@@ -830,6 +842,17 @@
return;
let frame = event.target;
+
+ // When performing a page transition start a recording once the main resource changes.
+ // We start a legacy capture because the backend wasn't available to automatically
+ // initiate the capture, so the frontend must start the capture.
+ if (this._transitioningPageTarget) {
+ this._transitioningPageTarget = false;
+ if (this._autoCaptureOnPageLoad)
+ this._legacyAttemptStartAutoCapturingForFrame(frame);
+ return;
+ }
+
if (this._attemptAutoCapturingForFrame(frame))
return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes