Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7cee00153e19d8492788bb70baa70579f70c04ef
https://github.com/WebKit/WebKit/commit/7cee00153e19d8492788bb70baa70579f70c04ef
Author: Vitaly Dyachkov <[email protected]>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
M LayoutTests/inspector/timeline/timeline-layout-events-iframe.html
M LayoutTests/inspector/timeline/timeline-layout-events.html
M Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
M Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js
M Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGridNode.js
M Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js
Log Message:
-----------
Web Inspector: Add `domNode` to `LayoutTimelineRecord` import/export
https://bugs.webkit.org/show_bug.cgi?id=324533
Reviewed by Devin Rousso.
`LayoutTimelineRecord`'s `domNode` is not currently preserved by the
Timeline's import/export mechanism, so after importing a previously
exported recording, layout and rendering events lose the DOM node
associated with them.
Serialize `LayoutTimelineRecord`'s `domNode` in `toJSON` as its display
name and CSS path, and resolve it back to a live `WI.DOMNode` in
`fromJSON` by querying the document for that CSS path, falling back to
a plain `{displayName, cssPath}` placeholder when the node can no longer
be found.
This replicates the technique already used by `MediaTimelineRecord` for
the same purpose.
* Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js:
(WI.LayoutTimelineRecord.async fromJSON):
(WI.LayoutTimelineRecord.prototype.toJSON):
(WI.LayoutTimelineRecord.prototype.get domNodeOrInfo):
(WI.LayoutTimelineRecord.prototype.get domNode): Deleted.
* Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGridNode.js:
(WI.LayoutTimelineDataGridNode.prototype.createCellContent):
(WI.LayoutTimelineDataGridNode):
(WI.LayoutTimelineDataGridNode.prototype.get data):
* Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js:
(WI.LayoutTimelineView.prototype._showHighlightForRecord):
* Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._processRecord):
* LayoutTests/inspector/timeline/timeline-layout-events-iframe.html:
* LayoutTests/inspector/timeline/timeline-layout-events.html:
Canonical link: https://commits.webkit.org/321679@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications