Web Inspector: Audit: attempt to re-link DOM nodes for imported results
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 22:00:34 +0000 (22:00 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 22:00:34 +0000 (22:00 +0000)
commitf836b2673dfee48c0a731f54bf9ea96407f0320b
tree5a9c06aecfdcb494c6c185d6b8f43ad4f60cc633
parent473998c767906b174d3abf1df21f05f00380b869
Web Inspector: Audit: attempt to re-link DOM nodes for imported results
https://bugs.webkit.org/show_bug.cgi?id=191044
<rdar://problem/45687364>

Reviewed by Brian Burg.

Source/WebInspectorUI:

When importing a `WI.AuditTestCaseResult`, attempt to `querySelector` for each item in
`data.domNodes`. If a node is found, replace it with that node and show a tree instead.

* UserInterface/Models/AuditTestCase.js:
(WI.AuditTestCase.async fromPayload): Added.
(WI.AuditTestCase.fromPayload): Deleted.

* UserInterface/Models/AuditTestGroup.js:
(WI.AuditTestGroup.async fromPayload): Added.
(WI.AuditTestGroup.fromPayload): Deleted.

* UserInterface/Models/AuditTestCaseResult.js:
(WI.AuditTestCaseResult.async fromPayload): Added.
(WI.AuditTestCaseResult.fromPayload): Deleted.

* UserInterface/Models/AuditTestGroupResult.js:
(WI.AuditTestGroupResult.async fromPayload): Added.
(WI.AuditTestGroupResult.fromPayload): Deleted.

* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.import):

LayoutTests:

* inspector/model/auditTestCase.html:
* inspector/model/auditTestCaseResult.html:
* inspector/model/auditTestGroup.html:
* inspector/model/auditTestGroupResult.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/model/auditTestCase.html
LayoutTests/inspector/model/auditTestCaseResult.html
LayoutTests/inspector/model/auditTestGroup.html
LayoutTests/inspector/model/auditTestGroupResult.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js
Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js
Source/WebInspectorUI/UserInterface/Models/AuditTestCaseResult.js
Source/WebInspectorUI/UserInterface/Models/AuditTestGroup.js
Source/WebInspectorUI/UserInterface/Models/AuditTestGroupResult.js