Web Inspector: add stack trace information for each RecordingAction
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2017 06:18:08 +0000 (06:18 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2017 06:18:08 +0000 (06:18 +0000)
commit19d7142e90d176a5f3c1a34cf7e23c72fe2e46bf
treecd847cefbe845e6de5dd226a14422749d37cb218
parentff68bfe363b0b7dff6ce5595f5e07ad7303367e3
Web Inspector: add stack trace information for each RecordingAction
https://bugs.webkit.org/show_bug.cgi?id=174663

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/ScriptCallFrame.h:
Add `operator==` so that when a ScriptCallFrame object is held in a Vector, calling `find`
with an existing value doesn't need require a functor and can use existing code.

* interpreter/StackVisitor.h:
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::isWasmFrame const): Inlined in header.

Source/WebCore:

Tests: inspector/canvas/recording-2d.html
       inspector/model/recording.html

* inspector/InspectorCanvas.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::indexForData):
(WebCore::InspectorCanvas::buildAction):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:

* UserInterface/Models/Recording.js:
(WI.Recording.prototype.swizzle):
Add Array type for swizzling array values.

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction):
(WI.RecordingAction.fromPayload):
(WI.RecordingAction.prototype.get trace):
(WI.RecordingAction.prototype.swizzle):
(WI.RecordingAction.prototype.toJSON):

* UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: Added.
(WI.RecordingTraceDetailsSidebarPanel):
(WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass):
(WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
(WI.RecordingTraceDetailsSidebarPanel.prototype.set recording):
(WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex):
* UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: Added.
(.sidebar > .panel.details.recording-trace > .content > .call-frame):
(.sidebar > .details.recording-trace > .content > .no-trace-data):
(.sidebar > .details.recording-trace > .content > .no-trace-data > .message):

* UserInterface/Views/RecordingTabContentView.js:
(WI.RecordingTabContentView):

* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement.prototype.populateContextMenu):

* UserInterface/Views/CallFrameView.css:
(.call-frame):
(body[dir=ltr] .call-frame .icon):
(body[dir=rtl] .call-frame .icon):
Apply the same trailing margin for CallFrameView icons as TreeElement.

LayoutTests:

* inspector/canvas/recording-2d-expected.txt:
* inspector/canvas/recording-2d.html:
* inspector/model/recording-expected.txt:
* inspector/model/recording.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/canvas/recording-2d-expected.txt
LayoutTests/inspector/canvas/recording-2d.html
LayoutTests/inspector/model/recording-expected.txt
LayoutTests/inspector/model/recording.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/ScriptCallFrame.h
Source/JavaScriptCore/interpreter/StackVisitor.cpp
Source/JavaScriptCore/interpreter/StackVisitor.h
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorCanvas.cpp
Source/WebCore/inspector/InspectorCanvas.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Models/Recording.js
Source/WebInspectorUI/UserInterface/Models/RecordingAction.js
Source/WebInspectorUI/UserInterface/Views/CallFrameView.css
Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js
Source/WebInspectorUI/UserInterface/Views/RecordingTabContentView.js
Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.js [new file with mode: 0644]