This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 396
/
inspector.html
271 lines (247 loc) · 12.9 KB
/
inspector.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Shumway Inspector</title>
<link rel="stylesheet" href="style/style.css">
</head>
<body>
<div id="stage">
<div id="xstats"></div>
</div>
<script src="jquery.min.js"></script>
<script>
var requiredConsoleFunctions = ["profile", "profileEnd", "markTimeline",
"time", "timeEnd"];
for (var i = 0; i < requiredConsoleFunctions.length; i++) {
if (!(requiredConsoleFunctions[i] in console))
console[requiredConsoleFunctions[i]] = function () {};
}
var $DEBUG = true, $RELEASE = false;
</script>
<script src="../../lib/xstats/xstats.js"></script>
<script>
console.time("Load");
</script>
<script src="../../lib/DataView.js/DataView.js"></script>
<script src="../../lib/Kanvas/kanvas.js"></script>
<script> console.time("Load SWF Dependencies"); </script>
<!-- Load SWF Dependencies -->
<script src="../../src/swf/util.js"></script>
<script src="../../src/swf/swf.js"></script>
<script src="../../src/swf/inflate.js"></script>
<script src="../../src/swf/stream.js"></script>
<script src="../../src/swf/bitmap.js"></script>
<script src="../../src/swf/button.js"></script>
<script src="../../src/swf/font.js"></script>
<script src="../../src/swf/image.js"></script>
<script src="../../src/swf/label.js"></script>
<script src="../../src/swf/shape.js"></script>
<script src="../../src/swf/sound.js"></script>
<script src="../../src/swf/text.js"></script>
<script src="../../src/swf/mp3worker.js"></script>
<script src="../../src/swf/embed.js"></script>
<script src="../../src/swf/renderer.js"></script>
<script> console.timeEnd("Load SWF Dependencies"); </script>
<script> console.time("Load SWF Parser"); </script>
<script src="../../src/swf/types.js"></script>
<script src="../../src/swf/structs.js"></script>
<script src="../../src/swf/tags.js"></script>
<script src="../../src/swf/templates.js"></script>
<script src="../../src/swf/generator.js"></script>
<script src="../../src/swf/handlers.js"></script>
<script src="../../src/swf/parser.js"></script>
<script> console.timeEnd("Load SWF Parser"); </script>
<!-- Load AVM1 Dependencies -->
<script> console.time("Load AVM1 Dependencies") </script>
<script src="../../src/avm1/classes.js"></script>
<script src="../../src/avm1/globals.js"></script>
<script src="../../src/avm1/stream.js"></script>
<script src="../../src/avm1/interpreter.js"></script>
<script> console.timeEnd("Load AVM1 Dependencies"); </script>
<script>
window.print = function (msg) {
console.log(msg);
};
var webShell = true;
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return unescape(pair[1]);
}
}
return undefined;
}
</script>
<!-- Load AVM2 Dependencies -->
<script> console.time("Load AVM2 Dependencies"); </script>
<script src="../../src/avm2/config.js"></script>
<script src="../../src/avm2/util.js"></script>
<script src="../../src/avm2/options.js"></script>
<script src="../../src/avm2/metrics.js"></script>
<script>
var Counter = new metrics.Counter(true);
var Timer = metrics.Timer;
var Option = options.Option;
var OptionSet = options.OptionSet;
var systemOptions = new OptionSet("System Options");
var disassemble = systemOptions.register(new Option("d", "disassemble", "boolean", false, "disassemble"));
var traceLevel = systemOptions.register(new Option("t", "traceLevel", "number", 0, "trace level"));
var nativeCreateElement = document.createElement;
document.createElement = function (x) {
Counter.count("createElement: " + x);
return nativeCreateElement.call(document, x);
}
</script>
<script src="../../src/avm2/constants.js"></script>
<script src="../../src/avm2/errors.js"></script>
<script src="../../src/avm2/opcodes.js"></script>
<script src="../../src/avm2/parser.js"></script>
<script src="../../src/avm2/analyze.js"></script>
<script src="../../src/avm2/compiler/lljs/src/estransform.js"></script>
<script src="../../src/avm2/compiler/lljs/src/escodegen.js"></script>
<script src="../../src/avm2/compiler/inferrer.js"></script>
<script src="../../src/avm2/compiler/c4/ir.js"></script>
<script src="../../src/avm2/compiler/builder.js"></script>
<script src="../../src/avm2/compiler/c4/looper.js"></script>
<script src="../../src/avm2/compiler/c4/backend.js"></script>
<script src="../../src/avm2/domain.js"></script>
<script src="../../src/avm2/runtime.js"></script>
<script src="../../src/avm2/xml.js"></script>
<script src="../../src/avm2/amf.js"></script>
<script src="../../src/avm2/proxy.js"></script>
<script src="../../src/avm2/native.js"></script>
<script src="../../src/avm2/disassembler.js"></script>
<script src="../../src/avm2/interpreter.js"></script>
<script src="../../src/avm2/vm.js"></script>
<script> console.timeEnd("Load AVM2 Dependencies"); </script>
<!-- Load Flash Dependencies -->
<script> console.time("Load Flash Dependencies"); </script>
<script src="../../src/flash/util.js"></script>
<!-- Autogenerated flash references: base=../../src/flash/ -->
<script src="../../src/flash/display/Bitmap.js"></script>
<script src="../../src/flash/display/BitmapData.js"></script>
<script src="../../src/flash/display/ContextMenu.js"></script>
<script src="../../src/flash/display/ContextMenuItem.js"></script>
<script src="../../src/flash/display/DisplayObject.js"></script>
<script src="../../src/flash/display/DisplayObjectContainer.js"></script>
<script src="../../src/flash/display/FrameLabel.js"></script>
<script src="../../src/flash/display/GradientType.js"></script>
<script src="../../src/flash/display/Graphics.js"></script>
<script src="../../src/flash/display/InteractiveObject.js"></script>
<script src="../../src/flash/display/Loader.js"></script>
<script src="../../src/flash/display/LoaderInfo.js"></script>
<script src="../../src/flash/display/MorphShape.js"></script>
<script src="../../src/flash/display/MovieClip.js"></script>
<script src="../../src/flash/display/NativeMenu.js"></script>
<script src="../../src/flash/display/NativeMenuItem.js"></script>
<script src="../../src/flash/display/Scene.js"></script>
<script src="../../src/flash/display/Shape.js"></script>
<script src="../../src/flash/display/SimpleButton.js"></script>
<script src="../../src/flash/display/Sprite.js"></script>
<script src="../../src/flash/display/Stage.js"></script>
<script src="../../src/flash/events/Event.js"></script>
<script src="../../src/flash/events/EventDispatcher.js"></script>
<script src="../../src/flash/events/KeyboardEvent.js"></script>
<script src="../../src/flash/events/MouseEvent.js"></script>
<script src="../../src/flash/events/TextEvent.js"></script>
<script src="../../src/flash/events/TimerEvent.js"></script>
<script src="../../src/flash/external/ExternalInterface.js"></script>
<script src="../../src/flash/filters/BevelFilter.js"></script>
<script src="../../src/flash/filters/BitmapFilter.js"></script>
<script src="../../src/flash/filters/BlurFilter.js"></script>
<script src="../../src/flash/filters/ColorMatrixFilter.js"></script>
<script src="../../src/flash/filters/ConvolutionFilter.js"></script>
<script src="../../src/flash/filters/DisplacementMapFilter.js"></script>
<script src="../../src/flash/filters/DropShadowFilter.js"></script>
<script src="../../src/flash/filters/GlowFilter.js"></script>
<script src="../../src/flash/filters/GradientBevelFilter.js"></script>
<script src="../../src/flash/filters/GradientGlowFilter.js"></script>
<script src="../../src/flash/filters/ShaderFilter.js"></script>
<script src="../../src/flash/geom/ColorTransform.js"></script>
<script src="../../src/flash/geom/Matrix.js"></script>
<script src="../../src/flash/geom/Point.js"></script>
<script src="../../src/flash/geom/Rectangle.js"></script>
<script src="../../src/flash/geom/Transform.js"></script>
<script src="../../src/flash/media/ID3Info.js"></script>
<script src="../../src/flash/media/Sound.js"></script>
<script src="../../src/flash/media/SoundChannel.js"></script>
<script src="../../src/flash/media/SoundMixer.js"></script>
<script src="../../src/flash/media/SoundTransform.js"></script>
<script src="../../src/flash/media/StageVideo.js"></script>
<script src="../../src/flash/media/Video.js"></script>
<script src="../../src/flash/net/NetConnection.js"></script>
<script src="../../src/flash/net/NetStream.js"></script>
<script src="../../src/flash/net/ObjectEncoding.js"></script>
<script src="../../src/flash/net/Responder.js"></script>
<script src="../../src/flash/net/SharedObject.js"></script>
<script src="../../src/flash/net/URLLoader.js"></script>
<script src="../../src/flash/net/URLRequest.js"></script>
<script src="../../src/flash/net/URLStream.js"></script>
<script src="../../src/flash/system/ApplicationDomain.js"></script>
<script src="../../src/flash/system/Capabilities.js"></script>
<script src="../../src/flash/system/FSCommand.js"></script>
<script src="../../src/flash/system/Security.js"></script>
<script src="../../src/flash/system/SecurityDomain.js"></script>
<script src="../../src/flash/system/System.js"></script>
<script src="../../src/flash/text/Font.js"></script>
<script src="../../src/flash/text/StaticText.js"></script>
<script src="../../src/flash/text/TextField.js"></script>
<script src="../../src/flash/text/TextFormatClass.js"></script>
<script src="../../src/flash/ui/ContextMenu.js"></script>
<script src="../../src/flash/ui/Keyboard.js"></script>
<script src="../../src/flash/ui/Mouse.js"></script>
<script src="../../src/flash/utils/Dictionary.js"></script>
<script src="../../src/flash/utils/Timer.js"></script>
<!-- Autogenerated flash references end -->
<script src="../../src/flash/stubs.js"></script>
<script src="../../src/flash/playerglobal.js"></script>
<script>
console.timeEnd("Load Flash Dependencies");
console.timeEnd("Load");
</script>
<input type="file" id="files" name="files[]" multiple style="visibility: hidden;" accept="application/x-shockwave-flash">
<!--
Shameless copying from:
http://people.mozilla.com/~shorlander/highlighter-toolbar/highlighter-toolbar.html
-->
<div class="toolbarGroup">
<div class="toolbarBox withEmphasis" style="position: fixed; bottom: 380px; left: auto; right: 0px; width: 300px;" hidden>
<div class="closeButton"></div>
<div class="toolbarLabel " style="width: 240px; text-align: left;" id="message">Test</div>
</div>
<div class="toolbarInfo" style="position: fixed; top: 0px; bottom: 70px; left: auto; right: 0px; width: 300px; font-size: 10px;" id="info">
</div>
<div class="toolbarInfo" style="position: fixed; top: 0px; bottom: 70px; right: 320px; width: 200px;" id="traceSymbolsInfo" hidden>
</div>
<div class="toolbarBox" style="position: fixed; bottom: 35px; left: 0; right: 0; width: auto;" id="openFileToolbar">
<div class="closeButton"></div>
<div class="toolbarLabel " style="width: 140px; text-align: left;">Shumway Inspector</div>
<div class="toolbarButton" id="openFile" title="Select SWF/ABC file (or drag'n'drop the file on the stage).">Open File</div>
</div>
<div class="toolbarBox" style="position: fixed; bottom: 1px; left: 0; right: 0; width: auto;">
<div class="closeButton"></div>
<div class="toolbarLabel" style="width: 140px; text-align: left;">AVM2 Options</div>
<div class="avm2Option toolbarButton" id="sysCompiler" style="width: 60px">Sys</div>
<div class="avm2Option toolbarButton" id="appCompiler" style="width: 60px">App</div>
<div class="avm2Option toolbarButton" style="width: 60px" id="verifier">Verifier</div>
<div class="avm2Option toolbarButton" style="width: 60px" id="trace">Trace</div>
<div class="avm2Option toolbarButton" style="width: 60px" id="release">Release</div>
<div class="avm2Option toolbarButton" style="width: 60px" id="symbolsInfo">Symbols</div>
</div>
</div>
<script src="inspectorSettings.js"></script>
<script src="inspectorLoader.js"></script>
<script src="inspector.js"></script>
<script>
SHUMWAY_ROOT = "../../src/";
</script>
<script>
var stats = new xStats;
document.getElementById('xstats').appendChild(stats.element);
</script>
</body>
</html>