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
+2017-08-02 Devin Rousso <drousso@apple.com>
+
+ Web Inspector: add stack trace information for each RecordingAction
+ https://bugs.webkit.org/show_bug.cgi?id=174663
+
+ Reviewed by Joseph Pecoraro.
+
+ * inspector/canvas/recording-2d-expected.txt:
+ * inspector/canvas/recording-2d.html:
+ * inspector/model/recording-expected.txt:
+ * inspector/model/recording.html:
+
2017-08-02 Chris Dumez <cdumez@apple.com>
NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times
4,
5,
0
+ ],
+ [
+ 4,
+ 6,
+ 7,
+ 9,
+ 11,
+ 13,
+ 16,
+ 18,
+ 20
]
],
[
9,
10,
1
+ ],
+ [
+ 21,
+ 6,
+ 22,
+ 9,
+ 11,
+ 13,
+ 16,
+ 18,
+ 20
]
]
]
],
"data": [
"#000000",
- "arc"
+ "arc",
+ "",
+ "inspector/canvas/recording-2d.html",
+ [
+ 2,
+ 3,
+ 58,
+ 42
+ ],
+ "ignoreException",
+ [
+ 5,
+ 3,
+ 45,
+ 10
+ ],
+ [
+ 2,
+ 3,
+ 58,
+ 28
+ ],
+ "f",
+ [
+ 8,
+ 3,
+ 378,
+ 24
+ ],
+ "performActions",
+ [
+ 10,
+ 3,
+ 382,
+ 6
+ ],
+ "global code",
+ [
+ 12,
+ 2,
+ 1,
+ 15
+ ],
+ "evaluateWithScopeExtension",
+ "[native code]",
+ [
+ 14,
+ 15,
+ 0,
+ 0
+ ],
+ "_evaluateOn",
+ [
+ 17,
+ 2,
+ 128,
+ 29
+ ],
+ "_evaluateAndWrap",
+ [
+ 19,
+ 2,
+ 122,
+ 108
+ ],
+ [
+ 2,
+ 3,
+ 59,
+ 42
+ ],
+ [
+ 2,
+ 3,
+ 59,
+ 28
+ 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 96,
+ 9
]
],
[
- 30,
+ 82,
[
- 21,
+ 63,
27,
28,
29,
32,
33,
34
+ ],
+ [
+ 97,
+ 6,
+ 98,
+ 9
]
],
[
- 30,
+ 82,
[
- 23,
+ 67,
35,
36,
37,
40,
41,
42
+ ],
+ [
+ 99,
+ 6,
+ 100,
+ 9
]
]
]
{
"actions": [
[
- 31,
+ 101,
[
- 19,
+ 59,
1,
2,
3,
6,
7,
8,
- 32
+ 2
+ ],
+ [
+ 102,
+ 9
]
],
[
- 31,
+ 101,
[
- 19,
+ 59,
9,
10,
11,
14,
15,
16,
- 27
+ 76
+ ],
+ [
+ 103,
+ 9
]
]
]
{
"actions": [
[
- 33,
+ 104,
[
1,
2,
6,
7,
0
+ ],
+ [
+ 105,
+ 6,
+ 106,
+ 9
]
],
[
- 33,
+ 104,
[
8,
9,
13,
14,
1
+ ],
+ [
+ 107,
+ 6,
+ 108,
+ 9
]
]
]
{
"actions": [
[
- 34,
+ 109,
+ [
+ 37
+ ],
[
+ 110,
9
]
],
[
- 34,
+ 109,
[
- 10
+ 39
+ ],
+ [
+ 111,
+ 9
]
],
[
- 34,
+ 109,
[
- 11,
+ 41,
+ 37
+ ],
+ [
+ 112,
9
]
],
[
- 34,
+ 109,
[
- 12,
- 10
+ 43,
+ 39
+ ],
+ [
+ 113,
+ 9
]
]
]
{
"actions": [
[
- 35,
+ 114,
[
1,
2,
3,
4
+ ],
+ [
+ 115,
+ 9
]
]
]
{
"actions": [
[
- 36,
- []
+ 116,
+ [],
+ [
+ 117,
+ 9
+ ]
],
[
- 36,
+ 116,
+ [
+ 76
+ ],
[
- 27
+ 118,
+ 9
]
],
[
- 36,
+ 116,
[
- 38
+ 120
+ ],
+ [
+ 121,
+ 9
]
],
[
- 36,
+ 116,
+ [
+ 123
+ ],
[
- 40
+ 124,
+ 9
]
],
[
- 36,
+ 116,
[
- 44
+ 128
+ ],
+ [
+ 129,
+ 9
]
]
]
{
"actions": [
[
- 45,
+ 130,
[
- 20,
+ 60,
1,
2
+ ],
+ [
+ 131,
+ 9
]
],
[
- 45,
+ 130,
[
- 22,
+ 64,
3,
4,
5
+ ],
+ [
+ 132,
+ 9
]
]
]
{
"actions": [
[
- 46,
- []
+ 133,
+ [],
+ [
+ 134,
+ 9
+ ]
],
[
- 46,
+ 133,
+ [
+ 76
+ ],
[
- 27
+ 135,
+ 9
]
]
]
{
"actions": [
[
- 47,
+ 136,
[
1,
2,
3,
4
+ ],
+ [
+ 137,
+ 6,
+ 138,
+ 9
]
]
]
{
"actions": [
[
- 48,
- []
+ 139,
+ [],
+ [
+ 140,
+ 9
+ ]
]
]
},
{
"actions": [
[
- 49,
- []
+ 141,
+ [],
+ [
+ 142,
+ 9
+ ]
]
]
},
{
"actions": [
[
- 50,
- []
+ 143,
+ [],
+ [
+ 144,
+ 9
+ ]
],
[
- 50,
+ 143,
[
0
+ ],
+ [
+ 145,
+ 9
]
]
]
{
"actions": [
[
- 51,
- []
+ 146,
+ [],
+ [
+ 147,
+ 9
+ ]
],
[
- 51,
+ 146,
+ [
+ 76
+ ],
[
- 27
+ 148,
+ 9
]
]
]
{
"actions": [
[
- 52,
- []
+ 149,
+ [],
+ [
+ 150,
+ 9
+ ]
],
[
- 52,
+ 149,
[
1
+ ],
+ [
+ 151,
+ 9
]
]
]
{
"actions": [
[
- 53,
- []
+ 152,
+ [],
+ [
+ 153,
+ 9
+ ]
],
[
- 53,
+ 152,
[
- 54
+ 154
+ ],
+ [
+ 155,
+ 9
]
]
]
{
"actions": [
[
- 55,
+ 156,
[
- 11,
+ 41,
5,
6,
+ 37
+ ],
+ [
+ 157,
9
]
],
[
- 55,
+ 156,
[
- 12,
+ 43,
7,
8,
- 10
+ 39
+ ],
+ [
+ 158,
+ 9
]
],
[
- 55,
+ 156,
[
9,
10,
+ 37
+ ],
+ [
+ 159,
9
]
],
[
- 55,
+ 156,
[
11,
12,
- 10
+ 39
+ ],
+ [
+ 160,
+ 9
]
]
]
{
"actions": [
[
- 56,
+ 161,
[
- 11,
+ 41,
3,
4
+ ],
+ [
+ 162,
+ 9
]
],
[
- 56,
+ 161,
[
5,
6
+ ],
+ [
+ 163,
+ 9
]
]
]
{
"actions": [
[
- 57,
- []
+ 164,
+ [],
+ [
+ 165,
+ 9
+ ]
],
[
- 57,
+ 164,
[
- 27
+ 76
+ ],
+ [
+ 166,
+ 9
]
]
]
{
"actions": [
[
- 58,
- []
+ 167,
+ [],
+ [
+ 168,
+ 9
+ ]
],
[
- 58,
+ 167,
[
1
+ ],
+ [
+ 169,
+ 9
]
]
]
{
"actions": [
[
- 59,
- []
+ 170,
+ [],
+ [
+ 171,
+ 9
+ ]
],
[
- 59,
+ 170,
+ [
+ 76
+ ],
[
- 27
+ 172,
+ 9
]
]
]
{
"actions": [
[
- 60,
+ 173,
[
1,
2
+ ],
+ [
+ 174,
+ 9
]
]
]
{
"actions": [
[
- 61,
- []
+ 175,
+ [],
+ [
+ 176,
+ 9
+ ]
],
[
- 61,
+ 175,
[
1
+ ],
+ [
+ 177,
+ 9
]
]
]
{
"actions": [
[
- 62,
+ 178,
+ [
+ 76
+ ],
[
- 27
+ 179,
+ 9
]
]
]
{
"actions": [
[
- 63,
- []
+ 180,
+ [],
+ [
+ 181,
+ 9
+ ]
],
[
- 63,
+ 180,
[
1
+ ],
+ [
+ 182,
+ 9
]
]
]
{
"actions": [
[
- 64,
+ 183,
[
1,
2
+ ],
+ [
+ 184,
+ 9
]
]
]
{
"actions": [
[
- 65,
+ 185,
[
- 16,
+ 50,
5,
6
+ ],
+ [
+ 186,
+ 9
]
],
[
- 65,
+ 185,
[
- 66,
+ 187,
7,
8,
9,
10,
11,
12
+ ],
+ [
+ 188,
+ 9
]
]
]
{
"actions": [
[
- 67,
+ 189,
[
1,
2,
3,
4
+ ],
+ [
+ 190,
+ 9
]
]
]
{
"actions": [
[
- 68,
+ 191,
[
1,
2,
3,
4
+ ],
+ [
+ 192,
+ 9
]
]
]
{
"actions": [
[
- 69,
- []
+ 193,
+ [],
+ [
+ 194,
+ 9
+ ]
]
]
},
{
"actions": [
[
- 70,
- []
+ 195,
+ [],
+ [
+ 196,
+ 9
+ ]
]
]
},
{
"actions": [
[
- 71,
+ 197,
[
1
+ ],
+ [
+ 198,
+ 9
]
]
]
{
"actions": [
[
- 72,
- []
+ 199,
+ [],
+ [
+ 200,
+ 9
+ ]
]
]
},
{
"actions": [
[
- 73,
+ 201,
[
1,
2
+ ],
+ [
+ 202,
+ 9
]
]
]
{
"actions": [
[
- 74,
+ 203,
[
null
+ ],
+ [
+ 204,
+ 9
]
],
[
- 74,
+ 203,
[
1
+ ],
+ [
+ 205,
+ 9
]
]
]
{
"actions": [
[
- 75,
+ 206,
[
- 76
+ 207
+ ],
+ [
+ 208,
+ 9
]
],
[
- 75,
+ 206,
+ [
+ 76
+ ],
[
- 27
+ 209,
+ 9
]
]
]
{
"actions": [
[
- 77,
+ 210,
[
- 20
+ 60
+ ],
+ [
+ 211,
+ 9
]
],
[
- 77,
+ 210,
[
- 22,
+ 64,
1
+ ],
+ [
+ 212,
+ 9
]
],
[
- 77,
+ 210,
[
2,
1
+ ],
+ [
+ 213,
+ 9
]
],
[
- 77,
+ 210,
[
3,
4
+ ],
+ [
+ 214,
+ 9
]
],
[
- 77,
+ 210,
[
5,
6,
7,
8
+ ],
+ [
+ 215,
+ 9
]
],
[
- 77,
+ 210,
[
9,
10,
11,
12,
13
+ ],
+ [
+ 216,
+ 9
]
]
]
{
"actions": [
[
- 78,
+ 217,
[
- 76
+ 207
+ ],
+ [
+ 218,
+ 9
]
],
[
- 78,
+ 217,
[
- 27
+ 76
+ ],
+ [
+ 219,
+ 9
]
]
]
{
"actions": [
[
- 79,
+ 220,
[
[
1,
2
]
+ ],
+ [
+ 221,
+ 9
]
]
]
{
"actions": [
[
- 80,
+ 222,
[
- 76
+ 207
+ ],
+ [
+ 223,
+ 9
]
],
[
- 80,
+ 222,
[
- 27
+ 76
+ ],
+ [
+ 224,
+ 9
]
]
]
{
"actions": [
[
- 81,
+ 225,
[
null
+ ],
+ [
+ 226,
+ 9
]
],
[
- 81,
+ 225,
[
1
+ ],
+ [
+ 227,
+ 9
]
]
]
{
"actions": [
[
- 82,
+ 228,
[
null
+ ],
+ [
+ 229,
+ 9
]
],
[
- 82,
+ 228,
[
1
+ ],
+ [
+ 230,
+ 9
]
]
]
{
"actions": [
[
- 83,
+ 231,
[
1,
2,
3,
- 84
+ 232
+ ],
+ [
+ 233,
+ 9
]
],
[
- 83,
+ 231,
[
4,
5,
6,
- 27,
+ 76,
7
+ ],
+ [
+ 234,
+ 9
]
],
[
- 83,
+ 231,
[
8,
9,
10,
11,
1
+ ],
+ [
+ 235,
+ 9
]
],
[
- 83,
+ 231,
[
12,
13,
14,
15,
16
+ ],
+ [
+ 236,
+ 9
]
],
[
- 83,
+ 231,
[
17,
18,
21,
22,
23
+ ],
+ [
+ 237,
+ 9
]
],
[
- 83,
+ 231,
[
24,
25,
29,
30,
31
+ ],
+ [
+ 238,
+ 9
]
]
]
{
"actions": [
[
- 85,
+ 239,
[
- 20
+ 60
+ ],
+ [
+ 240,
+ 9
]
],
[
- 85,
+ 239,
[
- 22,
+ 64,
1
+ ],
+ [
+ 241,
+ 9
]
],
[
- 85,
+ 239,
[
2,
1
+ ],
+ [
+ 242,
+ 9
]
],
[
- 85,
+ 239,
[
3,
4
+ ],
+ [
+ 243,
+ 9
]
],
[
- 85,
+ 239,
[
5,
6,
7,
8
+ ],
+ [
+ 244,
+ 9
]
],
[
- 85,
+ 239,
[
9,
10,
11,
12,
13
+ ],
+ [
+ 245,
+ 9
]
]
]
{
"actions": [
[
- 86,
+ 246,
[
1,
2,
4,
5,
6
+ ],
+ [
+ 247,
+ 9
]
],
[
- 86,
+ 246,
[
[
1,
0,
0
]
+ ],
+ [
+ 248,
+ 6,
+ 249,
+ 9
]
],
[
- 86,
+ 246,
[
[
7,
11,
12
]
+ ],
+ [
+ 250,
+ 6,
+ 251,
+ 9
]
]
]
{
"actions": [
[
- 87,
- []
+ 252,
+ [],
+ [
+ 253,
+ 9
+ ]
],
[
- 87,
+ 252,
[
1
+ ],
+ [
+ 254,
+ 9
]
]
]
{
"actions": [
[
- 88,
- []
+ 255,
+ [],
+ [
+ 256,
+ 9
+ ]
],
[
- 88,
+ 255,
[
- 27
+ 76
+ ],
+ [
+ 257,
+ 9
]
]
]
{
"actions": [
[
- 89,
- []
- ],
+ 258,
+ [],
+ [
+ 259,
+ 9
+ ]
+ ],
[
- 89,
+ 258,
[
1
+ ],
+ [
+ 260,
+ 9
]
]
]
{
"actions": [
[
- 90,
- []
+ 261,
+ [],
+ [
+ 262,
+ 9
+ ]
],
[
- 90,
+ 261,
[
1
+ ],
+ [
+ 263,
+ 9
]
]
]
{
"actions": [
[
- 91,
- []
+ 264,
+ [],
+ [
+ 265,
+ 9
+ ]
],
[
- 91,
+ 264,
[
- 11
+ 41
+ ],
+ [
+ 266,
+ 9
]
]
]
{
"actions": [
[
- 92,
+ 267,
[
1,
2,
3,
4
+ ],
+ [
+ 268,
+ 9
]
]
]
{
"actions": [
[
- 93,
- []
+ 269,
+ [],
+ [
+ 270,
+ 9
+ ]
],
[
- 93,
+ 269,
+ [
+ 76
+ ],
[
- 27
+ 271,
+ 9
]
],
[
- 93,
+ 269,
[
- 38
+ 120
+ ],
+ [
+ 272,
+ 9
]
],
[
- 93,
+ 269,
[
- 40
+ 123
+ ],
+ [
+ 273,
+ 9
]
],
[
- 93,
+ 269,
[
- 44
+ 128
+ ],
+ [
+ 274,
+ 9
]
]
]
{
"actions": [
[
- 94,
+ 275,
[
- 20,
+ 60,
1,
2
+ ],
+ [
+ 276,
+ 9
]
],
[
- 94,
+ 275,
[
- 22,
+ 64,
3,
4,
5
+ ],
+ [
+ 277,
+ 9
]
]
]
{
"actions": [
[
- 95,
- []
+ 278,
+ [],
+ [
+ 279,
+ 9
+ ]
],
[
- 95,
+ 278,
+ [
+ 76
+ ],
[
- 27
+ 280,
+ 9
]
]
]
{
"actions": [
[
- 96,
- []
+ 281,
+ [],
+ [
+ 282,
+ 9
+ ]
],
[
- 96,
+ 281,
+ [
+ 76
+ ],
[
- 27
+ 283,
+ 9
]
]
]
{
"actions": [
[
- 97,
+ 284,
[
1,
2,
4,
5,
6
+ ],
+ [
+ 285,
+ 9
]
]
]
{
"actions": [
[
- 98,
+ 286,
[
1,
2
+ ],
+ [
+ 287,
+ 9
]
]
]
{
"actions": [
[
- 99,
- []
+ 288,
+ [],
+ [
+ 289,
+ 9
+ ]
]
]
},
{
"actions": [
[
- 100,
+ 290,
[
1,
2,
3,
4
+ ],
+ [
+ 291,
+ 6,
+ 292,
+ 9
]
]
]
{
"actions": [
[
- 101,
- []
+ 293,
+ [],
+ [
+ 294,
+ 9
+ ]
],
[
- 101,
+ 293,
[
1
+ ],
+ [
+ 295,
+ 9
]
]
]
{
"actions": [
[
- 102,
- []
+ 296,
+ [],
+ [
+ 297,
+ 9
+ ]
],
[
- 102,
+ 296,
[
[
1,
2
]
+ ],
+ [
+ 298,
+ 9
]
]
]
{
"actions": [
[
- 103,
- []
+ 299,
+ [],
+ [
+ 300,
+ 9
+ ]
],
[
- 103,
+ 299,
[
1
+ ],
+ [
+ 301,
+ 9
]
]
]
{
"actions": [
[
- 104,
+ 302,
[
- 16,
+ 50,
5,
6
+ ],
+ [
+ 303,
+ 9
]
],
[
- 104,
+ 302,
[
- 66,
+ 187,
7,
8,
9,
10,
11,
12
+ ],
+ [
+ 304,
+ 9
]
]
]
"data": [
"#000000",
"arc",
+ "",
+ "inspector/canvas/recording-2d.html",
+ [
+ 2,
+ 3,
+ 58,
+ 42
+ ],
+ "ignoreException",
+ [
+ 5,
+ 3,
+ 45,
+ 10
+ ],
+ [
+ 2,
+ 3,
+ 58,
+ 28
+ ],
+ "f",
+ [
+ 8,
+ 3,
+ 378,
+ 24
+ ],
+ "performActions",
+ [
+ 10,
+ 3,
+ 382,
+ 6
+ ],
+ "global code",
+ [
+ 12,
+ 2,
+ 1,
+ 15
+ ],
+ "evaluateWithScopeExtension",
+ "[native code]",
+ [
+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ASUVORK5CYII=",
"testA",
+ [
+ 2,
+ 3,
+ 99,
+ 52
+ ],
+ [
+ 2,
+ 3,
+ 99,
+ 28
+ ],
"data:,",
"testB",
+ [
+ 2,
+ 3,
+ 100,
+ 52
+ ],
+ [
+ 2,
+ 3,
+ 100,
+ 28
+ ],
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAAAtJREFUCB1jYEAHAAASAAGAFMrMAAAAAElFTkSuQmCC",
"testC",
+ [
+ 2,
+ 3,
+ 101,
+ 52
+ ],
+ [
+ 2,
+ 3,
+ 101,
+ 28
+ ],
"createRadialGradient",
+ [
+ 2,
+ 3,
+ 104,
+ 59
+ ],
+ [
+ 2,
+ 3,
+ 104,
+ 28
+ ],
"direction",
+ [
+ 2,
+ 3,
+ 107,
+ 16
+ ],
"test",
+ [
+ 2,
+ 3,
+ 108,
+ 16
+ ],
"drawFocusIfNeeded",
"element",
- "drawImage",
- "drawImageFromRect",
- "",
- "ellipse",
- "fill",
- "fillRect",
- "fillStyle",
- "linear-gradient",
[
- 37,
- [
- 1,
- 2,
- 3,
- 4
- ],
- []
+ 2,
+ 3,
+ 111,
+ 34
],
- "radial-gradient",
[
- 39,
- [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- ],
- []
+ 2,
+ 3,
+ 112,
+ 34
],
- "pattern",
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII=",
- "no-repeat",
+ "drawImage",
[
- 41,
- 42,
- 43
+ 2,
+ 3,
+ 115,
+ 48
],
- "fillText",
- "font",
- "getImageData",
- "getLineDash",
- "getTransform",
- "globalAlpha",
- "globalCompositeOperation",
- "imageSmoothingEnabled",
- "imageSmoothingQuality",
- "low",
- "isPointInPath",
- "isPointInStroke",
- "lineCap",
- "lineD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
+ 143,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 144,
+ 16
+ ],
+ "linear-gradient",
+ [
+ 119,
+ [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ []
+ ],
+ [
+ 2,
+ 3,
+ 145,
+ 16
+ ],
+ "radial-gradient",
+ [
+ 122,
+ [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6
+ ],
+ []
+ ],
+ [
+ 2,
+ 3,
+ 146,
+ 16
+ ],
+ "pattern",
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII=",
+ "no-repeat",
+ [
+ 125,
+ 126,
+ 127
+ ],
+ [
+ 2,
+ 3,
+ 147,
+ 16
+ ],
+ "fillText",
+ [
+ 2,
+ 3,
+ 150,
+ 25
+ ],
+ [
+ 2,
+ 3,
+ 151,
+ 25
+ ],
+ "font",
+ [
+ 2,
+ 3,
+ 154,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 155,
+ 16
+ ],
+ "getImageData",
+ [
+ 2,
+ 3,
+ 158,
+ 51
+ ],
+ [
+ 2,
+ 3,
+ 158,
+ 28
+ ],
+ "getLineDash",
+ [
+ 2,
+ 3,
+ 161,
+ 28
+ ],
+ "getTransform",
+ [
+ 2,
+ 3,
+ 164,
+ 29
+ ],
+ "globalAlpha",
+ [
+ 2,
+ 3,
+ 167,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 168,
+ 16
+ ],
+ "globalCompositeOperation",
+ [
+ 2,
+ 3,
+ 171,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 172,
+ 16
+ ],
+ "imageSmoothingEnabled",
+ [
+ 2,
+ 3,
+ 175,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 176,
+ 16
+ ],
+ "imageSmoothingQuality",
+ [
+ 2,
+ 3,
+ 179,
+ 16
+ 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 338,
+ 16
+ ],
"textBaseline",
+ [
+ 2,
+ 3,
+ 341,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 342,
+ 16
+ ],
"transform",
+ [
+ 2,
+ 3,
+ 345,
+ 26
+ ],
"translate",
+ [
+ 2,
+ 3,
+ 348,
+ 26
+ ],
"webkitBackingStorePixelRatio",
+ [
+ 2,
+ 3,
+ 351,
+ 16
+ ],
"webkitGetImageDataHD",
+ [
+ 2,
+ 3,
+ 354,
+ 59
+ ],
+ [
+ 2,
+ 3,
+ 354,
+ 28
+ ],
"webkitImageSmoothingEnabled",
+ [
+ 2,
+ 3,
+ 357,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 358,
+ 16
+ ],
"webkitLineDash",
+ [
+ 2,
+ 3,
+ 361,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 362,
+ 16
+ ],
"webkitLineDashOffset",
- "webkitPutImageDataHD"
+ [
+ 2,
+ 3,
+ 365,
+ 16
+ ],
+ [
+ 2,
+ 3,
+ 366,
+ 16
+ ],
+ "webkitPutImageDataHD",
+ [
+ 2,
+ 3,
+ 369,
+ 37
+ ],
+ [
+ 2,
+ 3,
+ 370,
+ 37
+ ]
]
}
4,
5,
0
+ ],
+ [
+ 8,
+ 10,
+ 11,
+ 13,
+ 15,
+ 17,
+ 20,
+ 22,
+ 24
]
]
],
2
],
"#ffffff",
- "arc"
+ "arc",
+ "",
+ "inspector/canvas/recording-2d.html",
+ [
+ 6,
+ 7,
+ 58,
+ 42
+ ],
+ "ignoreException",
+ [
+ 9,
+ 7,
+ 45,
+ 10
+ ],
+ [
+ 6,
+ 7,
+ 58,
+ 28
+ ],
+ "f",
+ [
+ 12,
+ 7,
+ 378,
+ 24
+ ],
+ "performActions",
+ [
+ 14,
+ 7,
+ 382,
+ 6
+ ],
+ "global code",
+ [
+ 16,
+ 6,
+ 1,
+ 15
+ ],
+ "evaluateWithScopeExtension",
+ "[native code]",
+ [
+ 18,
+ 19,
+ 0,
+ 0
+ ],
+ "_evaluateOn",
+ [
+ 21,
+ 6,
+ 128,
+ 29
+ ],
+ "_evaluateAndWrap",
+ [
+ 23,
+ 6,
+ 122,
+ 108
+ ]
]
}
function test() {
let suite = InspectorTest.createAsyncSuite("Canvas.recording2D");
+ function sanitizeURL(url) {
+ return url.replace(/^.*?LayoutTests\//, "");
+ }
+
function getCanvas() {
let canvases = WI.canvasManager.canvases.filter((canvas) => canvas.contextType === WI.Canvas.ContextType.Canvas2D);
InspectorTest.assert(canvases.length === 1, "There should only be one canvas-2d.");
InspectorTest.evaluateInPage(`cancelActions()`);
let json = event.data.recording.toJSON();
+ json.data = json.data.map((item) => {
+ if (typeof item !== "string")
+ return item;
+
+ return sanitizeURL(item);
+ });
InspectorTest.log(JSON.stringify(json, null, 2));
})
.then(resolve, reject);
"actions": [
[
-1,
+ [],
[]
]
],
"actions": [
[
null,
+ [],
[]
]
],
"actions": [
[
0,
+ [
+ 0
+ ],
[
0
]
[
null,
null,
+ null,
],
],
incomplete: true,
[
0,
[0],
+ [0],
],
],
incomplete: true,
+2017-08-02 Devin Rousso <drousso@apple.com>
+
+ Web Inspector: add stack trace information for each RecordingAction
+ https://bugs.webkit.org/show_bug.cgi?id=174663
+
+ Reviewed by Joseph Pecoraro.
+
+ * 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.
+
2017-08-02 Yusuke Suzuki <utatane.tea@gmail.com>
Merge WTFThreadData to Thread::current
bool isEqual(const ScriptCallFrame&) const;
bool isNative() const;
+ bool operator==(const ScriptCallFrame& other) const { return isEqual(other); }
+
Ref<Inspector::Protocol::Console::CallFrame> buildInspectorObject() const;
private:
}
#endif // ENABLE(DFG_JIT)
-bool StackVisitor::Frame::isWasmFrame() const
-{
- return m_isWasmFrame;
-}
-
StackVisitor::Frame::CodeType StackVisitor::Frame::codeType() const
{
if (isWasmFrame())
bool isNativeFrame() const { return !codeBlock() && !isWasmFrame(); }
bool isInlinedFrame() const { return !!inlineCallFrame(); }
- bool isWasmFrame() const;
+ bool isWasmFrame() const { return m_isWasmFrame; }
Wasm::IndexOrName const wasmFunctionIndexOrName()
{
ASSERT(isWasmFrame());
JS_EXPORT_PRIVATE String sourceURL() const;
JS_EXPORT_PRIVATE String toString() const;
- intptr_t sourceID();
+ JS_EXPORT_PRIVATE intptr_t sourceID();
CodeType codeType() const;
bool hasLineAndColumnInfo() const;
+2017-08-02 Devin Rousso <drousso@apple.com>
+
+ Web Inspector: add stack trace information for each RecordingAction
+ https://bugs.webkit.org/show_bug.cgi?id=174663
+
+ Reviewed by Joseph Pecoraro.
+
+ Tests: inspector/canvas/recording-2d.html
+ inspector/model/recording.html
+
+ * inspector/InspectorCanvas.h:
+ * inspector/InspectorCanvas.cpp:
+ (WebCore::InspectorCanvas::indexForData):
+ (WebCore::InspectorCanvas::buildAction):
+
2017-08-02 Yusuke Suzuki <utatane.tea@gmail.com>
Merge WTFThreadData to Thread::current
#include "InspectorDOMAgent.h"
#include "InspectorPageAgent.h"
#include "InstrumentingAgents.h"
+#include "JSMainThreadExecState.h"
#include "Pattern.h"
#include "SVGPathUtilities.h"
#include "StringAdaptors.h"
#include "WebGPURenderingContext.h"
#endif
#include <inspector/IdentifiersFactory.h>
+#include <interpreter/CallFrame.h>
+#include <interpreter/StackVisitor.h>
using namespace Inspector;
[&] (const CanvasGradient* canvasGradient) { item = buildArrayForCanvasGradient(*canvasGradient); },
[&] (const CanvasPattern* canvasPattern) { item = buildArrayForCanvasPattern(*canvasPattern); },
[&] (const ImageData* imageData) { item = buildArrayForImageData(*imageData); },
+ [&] (const ScriptCallFrame& scriptCallFrame) {
+ auto array = Inspector::Protocol::Array<double>::create();
+ array->addItem(indexForData(scriptCallFrame.functionName()));
+ array->addItem(indexForData(scriptCallFrame.sourceURL()));
+ array->addItem(static_cast<int>(scriptCallFrame.lineNumber()));
+ array->addItem(static_cast<int>(scriptCallFrame.columnNumber()));
+ item = WTFMove(array);
+ },
[&] (const String& value) { item = InspectorValue::create(value); }
);
}
action->addItem(WTFMove(parametersData));
+ RefPtr<Inspector::Protocol::Array<double>> trace = Inspector::Protocol::Array<double>::create();
+ if (JSC::CallFrame* callFrame = JSMainThreadExecState::currentState()->vm().topCallFrame) {
+ callFrame->iterate([&] (JSC::StackVisitor& visitor) {
+ // Only skip Native frames if they are the first frame (e.g. CanvasRenderingContext2D.prototype.save).
+ if (!trace->length() && visitor->isNativeFrame())
+ return JSC::StackVisitor::Continue;
+
+ unsigned line = 0;
+ unsigned column = 0;
+ visitor->computeLineAndColumn(line, column);
+
+ ScriptCallFrame scriptCallFrame(visitor->functionName(), visitor->sourceURL(), static_cast<JSC::SourceID>(visitor->sourceID()), line, column);
+ trace->addItem(indexForData(scriptCallFrame));
+
+ return JSC::StackVisitor::Continue;
+ });
+ }
+ action->addItem(WTFMove(trace));
+
return action;
}
#include "CallTracerTypes.h"
#include <inspector/InspectorProtocolObjects.h>
#include <inspector/InspectorValues.h>
+#include <inspector/ScriptCallFrame.h>
#include <wtf/HashMap.h>
#include <wtf/Ref.h>
#include <wtf/RefPtr.h>
HTMLVideoElement*,
#endif
ImageData*,
+ Inspector::ScriptCallFrame,
String
> DuplicateDataVariant;
+2017-08-02 Devin Rousso <drousso@apple.com>
+
+ Web Inspector: add stack trace information for each RecordingAction
+ https://bugs.webkit.org/show_bug.cgi?id=174663
+
+ Reviewed by Joseph Pecoraro.
+
+ * 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.
+
2017-08-02 Devin Rousso <drousso@apple.com>
Web Inspector: add TreeElement virtualization for the Recording tab
localizedStrings["No Response Headers"] = "No Response Headers";
localizedStrings["No Results Found"] = "No Results Found";
localizedStrings["No Search Results"] = "No Search Results";
+localizedStrings["No Trace Data"] = "No Trace Data";
localizedStrings["No Watch Expressions"] = "No Watch Expressions";
localizedStrings["No matching ARIA role"] = "No matching ARIA role";
localizedStrings["No preview available"] = "No preview available";
<link rel="stylesheet" href="Views/RadioButtonNavigationItem.css">
<link rel="stylesheet" href="Views/RecordingContentView.css">
<link rel="stylesheet" href="Views/RecordingStateDetailsSidebarPanel.css">
+ <link rel="stylesheet" href="Views/RecordingTraceDetailsSidebarPanel.css">
<link rel="stylesheet" href="Views/RecordingNavigationSidebarPanel.css">
<link rel="stylesheet" href="Views/RenderingFrameTimelineOverviewGraph.css">
<link rel="stylesheet" href="Views/RenderingFrameTimelineView.css">
<script src="Views/RecordingContentView.js"></script>
<script src="Views/RecordingNavigationSidebarPanel.js"></script>
<script src="Views/RecordingStateDetailsSidebarPanel.js"></script>
+ <script src="Views/RecordingTraceDetailsSidebarPanel.js"></script>
<script src="Views/RenderingFrameTimelineDataGridNode.js"></script>
<script src="Views/RenderingFrameTimelineOverviewGraph.js"></script>
<script src="Views/RenderingFrameTimelineView.js"></script>
try {
let data = this._data[index];
switch (type) {
+ case WI.Recording.Swizzle.Array:
+ if (Array.isArray(data))
+ this._swizzle[index][type] = data;
+ break;
case WI.Recording.Swizzle.CanvasStyle:
if (Array.isArray(data)) {
let context = document.createElement("canvas").getContext("2d");
};
WI.Recording.Swizzle = {
+ Array: "Array",
CanvasStyle: "CanvasStyle",
Element: "Element",
Image: "Image",
WI.RecordingAction = class RecordingAction
{
- constructor(name, parameters)
+ constructor(name, parameters, trace)
{
this._payloadName = name;
this._payloadParameters = parameters;
+ this._payloadTrace = trace;
this._name = "";
this._parameters = [];
+ this._trace = [];
this._valid = true;
// Static
- // Payload format: [name, parameters]
+ // Payload format: [name, parameters, trace]
static fromPayload(payload)
{
if (!Array.isArray(payload))
if (!Array.isArray(payload[1]))
payload[1] = [];
+ if (!Array.isArray(payload[2]))
+ payload[2] = [];
+
return new WI.RecordingAction(...payload);
}
get name() { return this._name; }
get parameters() { return this._parameters; }
+ get trace() { return this._trace; }
get valid() { return this._valid; }
set valid(valid) { this._valid = !!valid; }
return swizzled;
});
+ for (let item of this._payloadTrace) {
+ try {
+ let array = recording.swizzle(item, WI.Recording.Swizzle.Array);
+ let callFrame = WI.CallFrame.fromPayload(WI.mainTarget, {
+ functionName: recording.swizzle(array[0], WI.Recording.Swizzle.String),
+ url: recording.swizzle(array[1], WI.Recording.Swizzle.String),
+ lineNumber: array[2],
+ columnNumber: array[3],
+ });
+ this._trace.push(callFrame);
+ } catch { }
+ }
+
this._isFunction = WI.RecordingAction.isFunctionForType(recording.type, this._name);
this._isGetter = !this._isFunction && !this._parameters.length;
toJSON()
{
- return [this._payloadName, this._payloadParameters];
+ return [this._payloadName, this._payloadParameters, this._payloadTrace];
}
};
*/
.call-frame {
+ overflow: hidden;
+ text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
+
+ --icon-margin-end: 3px;
}
.call-frame .icon {
height: 16px;
}
+body[dir=ltr] .call-frame .icon {
+ margin-right: var(--icon-margin-end);
+}
+
+body[dir=rtl] .call-frame .icon {
+ margin-left: var(--icon-margin-end);
+}
+
.call-frame .titles {
display: inline-block;
}
contextMenu.appendSeparator();
+ let callFrame = this.representedObject.trace[0];
+ if (callFrame) {
+ contextMenu.appendItem(WI.UIString("Reveal in Resources Tab"), () => {
+ WI.showSourceCodeLocation(callFrame.sourceCodeLocation, {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ });
+ });
+
+ contextMenu.appendSeparator();
+ }
+
super.populateContextMenu(contextMenu, event);
}
};
let tabBarItem = new WI.GeneralTabBarItem(image, title);
const navigationSidebarPanelConstructor = WI.RecordingNavigationSidebarPanel;
- const detailsSidebarPanelConstructors = [WI.RecordingStateDetailsSidebarPanel, WI.CanvasDetailsSidebarPanel];
+ const detailsSidebarPanelConstructors = [WI.RecordingStateDetailsSidebarPanel, WI.RecordingTraceDetailsSidebarPanel, WI.CanvasDetailsSidebarPanel];
const disableBackForward = true;
let flexibleNavigationItem = new WI.ScrubberNavigationItem;
super("recording", "recording", tabBarItem, navigationSidebarPanelConstructor, detailsSidebarPanelConstructors, disableBackForward, flexibleNavigationItem);
--- /dev/null
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.sidebar > .panel.details.recording-trace > .content > .call-frame {
+ height: 20px;
+ padding: 2px 5px;
+}
+
+.sidebar > .details.recording-trace > .content > .no-trace-data {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: 0;
+ overflow: hidden;
+}
+
+.sidebar > .details.recording-trace > .content > .no-trace-data > .message {
+ display: inline-block;
+ padding: 5px 15px 6px;
+ font-size: 13px;
+ white-space: nowrap;
+ color: white;
+ text-shadow: hsla(0, 0%, 0%, 0.2) 0 1px 0;
+ background-color: hsla(0, 0%, 0%, 0.15);
+ box-shadow: inset hsla(0, 0%, 0%, 0.2) 0 1px 0, hsla(0, 0%, 100%, 0.4) 0 1px 0;
+ border-radius: 6px;
+}
--- /dev/null
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WI.RecordingTraceDetailsSidebarPanel = class RecordingTraceDetailsSidebarPanel extends WI.DetailsSidebarPanel
+{
+ constructor()
+ {
+ super("recording-trace", WI.UIString("Trace"));
+
+ this._recording = null;
+ this._index = NaN;
+ }
+
+ // Static
+
+ static disallowInstanceForClass()
+ {
+ return true;
+ }
+
+ // Public
+
+ inspect(objects)
+ {
+ if (!(objects instanceof Array))
+ objects = [objects];
+
+ this.recording = objects.find((object) => object instanceof WI.Recording);
+
+ return !!this._recording;
+ }
+
+ set recording(recording)
+ {
+ if (recording === this._recording)
+ return;
+
+ this._recording = recording;
+ this._index = NaN;
+
+ this.contentView.element.removeChildren();
+ }
+
+ updateActionIndex(index, context, options = {})
+ {
+ console.assert(!this._recording || (index >= 0 && index < this._recording.actions.length));
+ if (!this._recording || index < 0 || index > this._recording.actions.length || index === this._index)
+ return;
+
+ this._index = index;
+
+ this.contentView.element.removeChildren();
+
+ let trace = this._recording.actions[this._index].trace;
+ if (!trace.length) {
+ let noTraceDataElement = this.contentView.element.appendChild(document.createElement("div"));
+ noTraceDataElement.classList.add("no-trace-data");
+
+ let noTraceDataMessageElement = noTraceDataElement.appendChild(document.createElement("div"));
+ noTraceDataMessageElement.classList.add("message");
+ noTraceDataMessageElement.textContent = WI.UIString("No Trace Data");
+ return;
+ }
+
+ const showFunctionName = true;
+ for (let callFrame of trace)
+ this.contentView.element.appendChild(new WI.CallFrameView(callFrame, showFunctionName));
+ }
+};