Title: [240598] trunk/Source/WebInspectorUI
Revision
240598
Author
[email protected]
Date
2019-01-28 12:21:39 -0800 (Mon, 28 Jan 2019)

Log Message

Unreviewed, rolling out r240351.
https://bugs.webkit.org/show_bug.cgi?id=193918

Causes overlapping Timeline records, as some record types
don't have an endTime (Requested by drousso on #webkit).

Reverted changeset:

"WebInspector: Confusingly nested events in the timeline for
Mutation Observers"
https://bugs.webkit.org/show_bug.cgi?id=192884
https://trac.webkit.org/changeset/240351

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (240597 => 240598)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-01-28 20:08:13 UTC (rev 240597)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-01-28 20:21:39 UTC (rev 240598)
@@ -1,3 +1,18 @@
+2019-01-28  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r240351.
+        https://bugs.webkit.org/show_bug.cgi?id=193918
+
+        Causes overlapping Timeline records, as some record types
+        don't have an endTime (Requested by drousso on #webkit).
+
+        Reverted changeset:
+
+        "WebInspector: Confusingly nested events in the timeline for
+        Mutation Observers"
+        https://bugs.webkit.org/show_bug.cgi?id=192884
+        https://trac.webkit.org/changeset/240351
+
 2019-01-28  Matt Baker  <[email protected]>
 
         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (240597 => 240598)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2019-01-28 20:08:13 UTC (rev 240597)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2019-01-28 20:21:39 UTC (rev 240598)
@@ -359,28 +359,6 @@
         if (!this._isCapturing)
             return;
 
-        function fixMicrotaskPlacement(children)
-        {
-            let newChildren = [];
-            for (let child of children) {
-                if (child.type === TimelineAgent.EventType.EvaluateScript) {
-                    let [microtasks, events] = child.children.partition((grandchild) => {
-                        return grandchild.type === TimelineAgent.EventType.ObserverCallback;
-                    });
-
-                    if (events.length) {
-                        child.children = events;
-                        child.endTime = events.lastValue.endTime;
-                        newChildren.push(child);
-                    }
-
-                    newChildren = newChildren.concat(microtasks);
-                } else
-                    newChildren.push(child);
-            }
-            return newChildren;
-        }
-
         var records = [];
 
         // Iterate over the records tree using a stack. Doing this recursively has
@@ -401,7 +379,7 @@
                 }
 
                 if (recordPayload.children && recordPayload.children.length)
-                    stack.push({array: fixMicrotaskPlacement(recordPayload.children), parent: recordPayload, parentRecord: record || entry.parentRecord, index: 0});
+                    stack.push({array: recordPayload.children, parent: recordPayload, parentRecord: record || entry.parentRecord, index: 0});
                 ++entry.index;
             } else
                 stack.pop();
@@ -1102,23 +1080,15 @@
                 webRecord.profilePayload = profilerRecord.profilePayload;
                 profilerRecord = nextScriptProfilerRecord();
 
-                let firstProfilerRecordForWebRecord = null;
-
                 // If there are more script profile records in the same time interval, add them
                 // as individual script evaluated records with profiles. This can happen with
                 // web microtask checkpoints that are technically inside of other web records.
                 // FIXME: <https://webkit.org/b/152903> Web Inspector: Timeline Cleanup: Better Timeline Record for Microtask Checkpoints
                 while (profilerRecord && recordEnclosesRecord(webRecord, profilerRecord)) {
-                    if (!firstProfilerRecordForWebRecord)
-                        firstProfilerRecordForWebRecord = profilerRecord;
-
                     this._addRecord(profilerRecord);
                     profilerRecord = nextScriptProfilerRecord();
                 }
 
-                if (firstProfilerRecordForWebRecord)
-                    webRecord.endTime = firstProfilerRecordForWebRecord.startTime;
-
                 webRecord = nextWebTimelineRecord();
                 continue;
             }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to