Web Inspector: Support overloaded CanvasRenderingContext2D actions with identical parameter counts
https://bugs.webkit.org/show_bug.cgi?id=176178
<rdar://problem/34192229>

Reviewed by Matt Baker.

Source/WebCore:

Update existing tests.

* WebCore.xcodeproj/project.pbxproj:

* inspector/InspectorCanvas.cpp:
(WebCore::buildArrayForVector):
(WebCore::InspectorCanvas::buildAction):
Add another array to each action that contains a swizzle type for each parameter. This is
used by the frontend to determine how to regenerate the value from what is given in the JSON.

* inspector/RecordingSwizzleTypes.h: Added.
Contains a value-specified enum of types that translate into int values, which are mirrored
by an object in the frontend, that indicate the type of each parameter. This enum matches
the values in WI.Recording.Swizzle.

Source/WebInspectorUI:

* UserInterface/Models/Recording.js:
(WI.Recording.displayNameForSwizzleType):
(WI.Recording.prototype.swizzle):
Replace WI.Recording.Swizzle with an object of swizzle type keys to int values. This object
matches the values in WebCore::RecordingSwizzleTypes.h.

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction):
(WI.RecordingAction.fromPayload):
(WI.RecordingAction.prototype.get swizzleTypes):
(WI.RecordingAction.prototype.swizzle):
(WI.RecordingAction.prototype.toJSON):
(WI.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex): Deleted.
Replace WI.RecordingAction._parameterSwizzleTypeForTypeAtIndex with an array of parameter
types sent in the payload. This gives more control over the swizzling to the JSON, but also
simplifies the way we regenerate the data in the frontend.

* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement._generateDOM):

* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype._generateContentCanvas2D):
(WI.RecordingContentView.prototype._applyAction):

* UserInterface/Views/RecordingNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid)):
(.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,): Deleted.

LayoutTests:

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@221695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index adad9d1..ac2e5ed 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2017-09-06  Devin Rousso  <webkit@devinrousso.com>
+
+        Web Inspector: Support overloaded CanvasRenderingContext2D actions with identical parameter counts
+        https://bugs.webkit.org/show_bug.cgi?id=176178
+        <rdar://problem/34192229>
+
+        Reviewed by Matt Baker.
+
+        * inspector/canvas/recording-2d-expected.txt:
+        * inspector/canvas/recording-webgl-expected.txt:
+        * inspector/canvas/recording-webgl-snapshots-expected.txt:
+        * inspector/model/recording-expected.txt:
+        * inspector/model/recording.html:
+
 2017-09-06  Sam Weinig  <sam@webkit.org>
 
         REGRESSION (r221598): Legacy "round" and "bevel" options can no longer be used with the legacy CanvasRenderingContext2D setLineJoin operation
diff --git a/LayoutTests/inspector/canvas/recording-2d-expected.txt b/LayoutTests/inspector/canvas/recording-2d-expected.txt
index dbcf428..a9d2783 100644
--- a/LayoutTests/inspector/canvas/recording-2d-expected.txt
+++ b/LayoutTests/inspector/canvas/recording-2d-expected.txt
@@ -60,6 +60,14 @@
             0
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
             13,
             15,
             16,
@@ -82,6 +90,14 @@
             1
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
             30,
             15,
             31,
@@ -245,6 +261,14 @@
             0
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
             13,
             15,
             16,
@@ -267,6 +291,14 @@
             1
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
             30,
             15,
             31,
@@ -292,6 +324,13 @@
             5
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
             33,
             15,
             34,
@@ -305,6 +344,7 @@
         [
           35,
           [],
+          [],
           [
             36,
             18
@@ -325,6 +365,14 @@
             6
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
             38,
             18
           ]
@@ -342,6 +390,12 @@
             4
           ],
           [
+            1,
+            1,
+            1,
+            1
+          ],
+          [
             40,
             18
           ]
@@ -353,6 +407,7 @@
         [
           41,
           [],
+          [],
           [
             42,
             18
@@ -368,6 +423,9 @@
             44
           ],
           [
+            3
+          ],
+          [
             45,
             18
           ]
@@ -378,6 +436,9 @@
             46
           ],
           [
+            3
+          ],
+          [
             47,
             18
           ]
@@ -389,6 +450,10 @@
             44
           ],
           [
+            9,
+            3
+          ],
+          [
             49,
             18
           ]
@@ -400,6 +465,10 @@
             46
           ],
           [
+            9,
+            3
+          ],
+          [
             51,
             18
           ]
@@ -411,6 +480,7 @@
         [
           52,
           [],
+          [],
           [
             53,
             18
@@ -423,6 +493,7 @@
         [
           54,
           [],
+          [],
           [
             55,
             18
@@ -438,6 +509,9 @@
             57
           ],
           [
+            7
+          ],
+          [
             58,
             15,
             59,
@@ -451,6 +525,10 @@
             3
           ],
           [
+            1,
+            1
+          ],
+          [
             60,
             15,
             61,
@@ -470,6 +548,12 @@
             4
           ],
           [
+            1,
+            1,
+            1,
+            1
+          ],
+          [
             63,
             15,
             64,
@@ -487,6 +571,10 @@
             67
           ],
           [
+            6,
+            3
+          ],
+          [
             68,
             15,
             69,
@@ -500,6 +588,10 @@
             71
           ],
           [
+            6,
+            3
+          ],
+          [
             72,
             15,
             73,
@@ -513,6 +605,10 @@
             75
           ],
           [
+            6,
+            3
+          ],
+          [
             76,
             15,
             77,
@@ -534,6 +630,14 @@
             6
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
             79,
             15,
             80,
@@ -547,6 +651,7 @@
         [
           81,
           [],
+          [],
           [
             82,
             18
@@ -559,10 +664,13 @@
         [
           83,
           [
-            84
+            0
           ],
           [
-            85,
+            0
+          ],
+          [
+            84,
             18
           ]
         ],
@@ -570,10 +678,14 @@
           83,
           [
             48,
-            84
+            0
           ],
           [
-            86,
+            9,
+            0
+          ],
+          [
+            85,
             18
           ]
         ]
@@ -582,49 +694,64 @@
     {
       "actions": [
         [
-          87,
+          86,
           [
             66,
             1,
             2
           ],
           [
-            88,
+            6,
+            1,
+            1
+          ],
+          [
+            87,
             15,
-            89,
+            88,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             70,
             3,
             4
           ],
           [
-            90,
+            6,
+            1,
+            1
+          ],
+          [
+            89,
             15,
-            91,
+            90,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             74,
             5,
             6
           ],
           [
-            92,
+            6,
+            1,
+            1
+          ],
+          [
+            91,
             15,
-            93,
+            92,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             66,
             7,
@@ -633,14 +760,21 @@
             10
           ],
           [
-            94,
+            6,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            93,
             15,
-            95,
+            94,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             70,
             11,
@@ -649,14 +783,21 @@
             14
           ],
           [
-            96,
+            6,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            95,
             15,
-            97,
+            96,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             74,
             15,
@@ -665,14 +806,21 @@
             18
           ],
           [
-            98,
+            6,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            97,
             15,
-            99,
+            98,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             66,
             19,
@@ -685,14 +833,25 @@
             26
           ],
           [
-            100,
+            6,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            99,
             15,
-            101,
+            100,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             70,
             27,
@@ -705,14 +864,25 @@
             34
           ],
           [
-            102,
+            6,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            101,
             15,
-            103,
+            102,
             18
           ]
         ],
         [
-          87,
+          86,
           [
             74,
             35,
@@ -725,9 +895,20 @@
             42
           ],
           [
-            104,
+            6,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            103,
             15,
-            105,
+            104,
             18
           ]
         ]
@@ -736,7 +917,7 @@
     {
       "actions": [
         [
-          106,
+          105,
           [
             66,
             1,
@@ -750,12 +931,24 @@
             10
           ],
           [
-            107,
+            6,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            3
+          ],
+          [
+            106,
             18
           ]
         ],
         [
-          106,
+          105,
           [
             66,
             9,
@@ -766,10 +959,22 @@
             14,
             15,
             16,
-            108
+            107
           ],
           [
-            109,
+            6,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            3
+          ],
+          [
+            108,
             18
           ]
         ]
@@ -778,7 +983,7 @@
     {
       "actions": [
         [
-          110,
+          109,
           [
             1,
             2,
@@ -790,14 +995,24 @@
             0
           ],
           [
-            111,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
+            110,
             15,
-            112,
+            111,
             18
           ]
         ],
         [
-          110,
+          109,
           [
             8,
             9,
@@ -809,9 +1024,19 @@
             1
           ],
           [
-            113,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
+            112,
             15,
-            114,
+            113,
             18
           ]
         ]
@@ -820,19 +1045,40 @@
     {
       "actions": [
         [
-          115,
+          114,
           [
             44
           ],
           [
+            3
+          ],
+          [
+            115,
+            18
+          ]
+        ],
+        [
+          114,
+          [
+            46
+          ],
+          [
+            3
+          ],
+          [
             116,
             18
           ]
         ],
         [
-          115,
+          114,
           [
-            46
+            48,
+            44
+          ],
+          [
+            9,
+            3
           ],
           [
             117,
@@ -840,24 +1086,17 @@
           ]
         ],
         [
-          115,
-          [
-            48,
-            44
-          ],
-          [
-            118,
-            18
-          ]
-        ],
-        [
-          115,
+          114,
           [
             50,
             46
           ],
           [
-            119,
+            9,
+            3
+          ],
+          [
+            118,
             18
           ]
         ]
@@ -866,7 +1105,7 @@
     {
       "actions": [
         [
-          120,
+          119,
           [
             1,
             2,
@@ -874,7 +1113,13 @@
             4
           ],
           [
-            121,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            120,
             18
           ]
         ]
@@ -883,50 +1128,63 @@
     {
       "actions": [
         [
-          122,
+          121,
           [],
+          [],
+          [
+            122,
+            18
+          ]
+        ],
+        [
+          121,
+          [
+            107
+          ],
+          [
+            3
+          ],
           [
             123,
             18
           ]
         ],
         [
-          122,
+          121,
           [
-            108
+            125
           ],
           [
-            124,
+            10
+          ],
+          [
+            126,
             18
           ]
         ],
         [
-          122,
+          121,
           [
-            126
+            128
           ],
           [
-            127,
+            10
+          ],
+          [
+            129,
             18
           ]
         ],
         [
-          122,
+          121,
           [
-            129
+            133
           ],
           [
-            130,
-            18
-          ]
-        ],
-        [
-          122,
-          [
-            134
+            11
           ],
           [
-            135,
+            134,
             18
           ]
         ]
@@ -935,19 +1193,24 @@
     {
       "actions": [
         [
-          136,
+          135,
           [
             67,
             1,
             2
           ],
           [
-            137,
+            3,
+            1,
+            1
+          ],
+          [
+            136,
             18
           ]
         ],
         [
-          136,
+          135,
           [
             71,
             3,
@@ -955,7 +1218,13 @@
             5
           ],
           [
-            138,
+            3,
+            1,
+            1,
+            1
+          ],
+          [
+            137,
             18
           ]
         ]
@@ -964,20 +1233,24 @@
     {
       "actions": [
         [
-          139,
+          138,
+          [],
           [],
           [
-            140,
+            139,
             18
           ]
         ],
         [
-          139,
+          138,
           [
-            108
+            107
           ],
           [
-            141,
+            3
+          ],
+          [
+            140,
             18
           ]
         ]
@@ -986,7 +1259,7 @@
     {
       "actions": [
         [
-          142,
+          141,
           [
             1,
             2,
@@ -994,9 +1267,15 @@
             4
           ],
           [
-            143,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            142,
             15,
-            144,
+            143,
             18
           ]
         ]
@@ -1005,10 +1284,11 @@
     {
       "actions": [
         [
-          145,
+          144,
+          [],
           [],
           [
-            146,
+            145,
             18
           ]
         ]
@@ -1017,10 +1297,11 @@
     {
       "actions": [
         [
-          147,
+          146,
+          [],
           [],
           [
-            148,
+            147,
             18
           ]
         ]
@@ -1029,20 +1310,24 @@
     {
       "actions": [
         [
-          149,
+          148,
+          [],
           [],
           [
-            150,
+            149,
             18
           ]
         ],
         [
-          149,
+          148,
           [
             0
           ],
           [
-            151,
+            1
+          ],
+          [
+            150,
             18
           ]
         ]
@@ -1051,42 +1336,50 @@
     {
       "actions": [
         [
-          152,
+          151,
           [],
+          [],
+          [
+            152,
+            18
+          ]
+        ],
+        [
+          151,
+          [
+            107
+          ],
+          [
+            3
+          ],
           [
             153,
             18
           ]
-        ],
-        [
-          152,
-          [
-            108
-          ],
-          [
-            154,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          155,
+          154,
+          [],
           [],
           [
-            156,
+            155,
             18
           ]
         ],
         [
-          155,
+          154,
           [
             1
           ],
           [
-            157,
+            2
+          ],
+          [
+            156,
             18
           ]
         ]
@@ -1095,20 +1388,24 @@
     {
       "actions": [
         [
-          158,
+          157,
+          [],
           [],
           [
-            159,
+            158,
             18
           ]
         ],
         [
-          158,
+          157,
           [
             9
           ],
           [
-            160,
+            3
+          ],
+          [
+            159,
             18
           ]
         ]
@@ -1117,7 +1414,7 @@
     {
       "actions": [
         [
-          161,
+          160,
           [
             48,
             5,
@@ -1125,12 +1422,18 @@
             44
           ],
           [
-            162,
+            9,
+            1,
+            1,
+            3
+          ],
+          [
+            161,
             18
           ]
         ],
         [
-          161,
+          160,
           [
             50,
             7,
@@ -1138,31 +1441,47 @@
             46
           ],
           [
-            163,
+            9,
+            1,
+            1,
+            3
+          ],
+          [
+            162,
             18
           ]
         ],
         [
-          161,
+          160,
           [
             9,
             10,
             44
           ],
           [
-            164,
+            1,
+            1,
+            3
+          ],
+          [
+            163,
             18
           ]
         ],
         [
-          161,
+          160,
           [
             11,
             12,
             46
           ],
           [
-            165,
+            1,
+            1,
+            3
+          ],
+          [
+            164,
             18
           ]
         ]
@@ -1171,25 +1490,34 @@
     {
       "actions": [
         [
-          166,
+          165,
           [
             48,
             3,
             4
           ],
           [
-            167,
+            9,
+            1,
+            1
+          ],
+          [
+            166,
             18
           ]
         ],
         [
-          166,
+          165,
           [
             5,
             6
           ],
           [
-            168,
+            1,
+            1
+          ],
+          [
+            167,
             18
           ]
         ]
@@ -1198,10 +1526,11 @@
     {
       "actions": [
         [
-          169,
+          168,
+          [],
           [],
           [
-            170,
+            169,
             18
           ]
         ]
@@ -1210,32 +1539,37 @@
     {
       "actions": [
         [
-          171,
+          170,
           [],
+          [],
+          [
+            171,
+            18
+          ]
+        ],
+        [
+          170,
+          [
+            1
+          ],
+          [
+            1
+          ],
           [
             172,
             18
           ]
-        ],
-        [
-          171,
-          [
-            1
-          ],
-          [
-            173,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          174,
+          173,
+          [],
           [],
           [
-            175,
+            174,
             18
           ]
         ]
@@ -1244,13 +1578,17 @@
     {
       "actions": [
         [
-          176,
+          175,
           [
             1,
             2
           ],
           [
-            177,
+            1,
+            1
+          ],
+          [
+            176,
             18
           ]
         ]
@@ -1259,71 +1597,86 @@
     {
       "actions": [
         [
-          178,
+          177,
           [],
+          [],
+          [
+            178,
+            18
+          ]
+        ],
+        [
+          177,
+          [
+            1
+          ],
+          [
+            1
+          ],
           [
             179,
             18
           ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          180,
+          [
+            107
+          ],
+          [
+            3
+          ],
+          [
+            181,
+            18
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          182,
+          [],
+          [],
+          [
+            183,
+            18
+          ]
         ],
         [
-          178,
+          182,
           [
             1
           ],
           [
-            180,
-            18
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          181,
-          [
-            108
+            1
           ],
           [
-            182,
-            18
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          183,
-          [],
-          [
             184,
             18
           ]
-        ],
-        [
-          183,
-          [
-            1
-          ],
-          [
-            185,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          186,
+          185,
           [
             1,
             2
           ],
           [
-            187,
+            1,
+            1
+          ],
+          [
+            186,
             18
           ]
         ]
@@ -1332,21 +1685,26 @@
     {
       "actions": [
         [
-          188,
+          187,
           [
             57,
             5,
             6
           ],
           [
-            189,
+            7,
+            1,
+            1
+          ],
+          [
+            188,
             18
           ]
         ],
         [
-          188,
+          187,
           [
-            190,
+            189,
             7,
             8,
             9,
@@ -1355,7 +1713,16 @@
             12
           ],
           [
-            191,
+            7,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            190,
             18
           ]
         ]
@@ -1364,7 +1731,7 @@
     {
       "actions": [
         [
-          192,
+          191,
           [
             1,
             2,
@@ -1372,7 +1739,13 @@
             4
           ],
           [
-            193,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            192,
             18
           ]
         ]
@@ -1381,7 +1754,7 @@
     {
       "actions": [
         [
-          194,
+          193,
           [
             1,
             2,
@@ -1389,7 +1762,13 @@
             4
           ],
           [
-            195,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            194,
             18
           ]
         ]
@@ -1398,10 +1777,11 @@
     {
       "actions": [
         [
-          196,
+          195,
+          [],
           [],
           [
-            197,
+            196,
             18
           ]
         ]
@@ -1410,10 +1790,11 @@
     {
       "actions": [
         [
-          198,
+          197,
+          [],
           [],
           [
-            199,
+            198,
             18
           ]
         ]
@@ -1422,12 +1803,15 @@
     {
       "actions": [
         [
-          200,
+          199,
           [
             1
           ],
           [
-            201,
+            1
+          ],
+          [
+            200,
             18
           ]
         ]
@@ -1436,10 +1820,11 @@
     {
       "actions": [
         [
-          202,
+          201,
+          [],
           [],
           [
-            203,
+            202,
             18
           ]
         ]
@@ -1448,13 +1833,17 @@
     {
       "actions": [
         [
-          204,
+          203,
           [
             1,
             2
           ],
           [
-            205,
+            1,
+            1
+          ],
+          [
+            204,
             18
           ]
         ]
@@ -1463,67 +1852,101 @@
     {
       "actions": [
         [
-          206,
+          205,
           [
             null
           ],
           [
+            1
+          ],
+          [
+            206,
+            18
+          ]
+        ],
+        [
+          205,
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
             207,
             18
           ]
-        ],
-        [
-          206,
-          [
-            1
-          ],
-          [
-            208,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          209,
+          208,
           [
-            210
+            209
+          ],
+          [
+            3
+          ],
+          [
+            210,
+            18
+          ]
+        ],
+        [
+          208,
+          [
+            107
+          ],
+          [
+            3
           ],
           [
             211,
             18
           ]
-        ],
-        [
-          209,
-          [
-            108
-          ],
-          [
-            212,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          213,
+          212,
           [
             67
           ],
           [
+            3
+          ],
+          [
+            213,
+            18
+          ]
+        ],
+        [
+          212,
+          [
+            71,
+            1
+          ],
+          [
+            3,
+            1
+          ],
+          [
             214,
             18
           ]
         ],
         [
-          213,
+          212,
           [
-            71,
+            2,
+            1
+          ],
+          [
+            1,
             1
           ],
           [
@@ -1532,9 +1955,13 @@
           ]
         ],
         [
-          213,
+          212,
           [
-            2,
+            3,
+            4
+          ],
+          [
+            1,
             1
           ],
           [
@@ -1543,18 +1970,7 @@
           ]
         ],
         [
-          213,
-          [
-            3,
-            4
-          ],
-          [
-            217,
-            18
-          ]
-        ],
-        [
-          213,
+          212,
           [
             5,
             6,
@@ -1562,12 +1978,18 @@
             8
           ],
           [
-            218,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            217,
             18
           ]
         ],
         [
-          213,
+          212,
           [
             9,
             10,
@@ -1576,7 +1998,14 @@
             13
           ],
           [
-            219,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            218,
             18
           ]
         ]
@@ -1585,31 +2014,37 @@
     {
       "actions": [
         [
-          220,
+          219,
           [
-            210
+            209
+          ],
+          [
+            3
+          ],
+          [
+            220,
+            18
+          ]
+        ],
+        [
+          219,
+          [
+            107
+          ],
+          [
+            3
           ],
           [
             221,
             18
           ]
-        ],
-        [
-          220,
-          [
-            108
-          ],
-          [
-            222,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          223,
+          222,
           [
             [
               1,
@@ -1617,7 +2052,10 @@
             ]
           ],
           [
-            224,
+            4
+          ],
+          [
+            223,
             18
           ]
         ]
@@ -1626,84 +2064,129 @@
     {
       "actions": [
         [
-          225,
+          224,
           [
-            210
+            209
+          ],
+          [
+            3
+          ],
+          [
+            225,
+            18
+          ]
+        ],
+        [
+          224,
+          [
+            107
+          ],
+          [
+            3
           ],
           [
             226,
             18
           ]
-        ],
-        [
-          225,
-          [
-            108
-          ],
-          [
-            227,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          228,
+          227,
           [
             null
           ],
           [
+            1
+          ],
+          [
+            228,
+            18
+          ]
+        ],
+        [
+          227,
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
             229,
             18
           ]
-        ],
-        [
-          228,
-          [
-            1
-          ],
-          [
-            230,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          231,
+          230,
           [
             null
           ],
           [
+            1
+          ],
+          [
+            231,
+            18
+          ]
+        ],
+        [
+          230,
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
             232,
             18
           ]
-        ],
-        [
-          231,
-          [
-            1
-          ],
-          [
-            233,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          234,
+          233,
           [
             1,
             2,
             3,
-            235
+            234
+          ],
+          [
+            1,
+            1,
+            1,
+            3
+          ],
+          [
+            235,
+            18
+          ]
+        ],
+        [
+          233,
+          [
+            4,
+            5,
+            6,
+            107,
+            7
+          ],
+          [
+            1,
+            1,
+            1,
+            3,
+            1
           ],
           [
             236,
@@ -1711,21 +2194,7 @@
           ]
         ],
         [
-          234,
-          [
-            4,
-            5,
-            6,
-            108,
-            7
-          ],
-          [
-            237,
-            18
-          ]
-        ],
-        [
-          234,
+          233,
           [
             8,
             9,
@@ -1734,12 +2203,19 @@
             1
           ],
           [
-            238,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            237,
             18
           ]
         ],
         [
-          234,
+          233,
           [
             12,
             13,
@@ -1748,12 +2224,19 @@
             16
           ],
           [
-            239,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            238,
             18
           ]
         ],
         [
-          234,
+          233,
           [
             17,
             18,
@@ -1764,12 +2247,21 @@
             23
           ],
           [
-            240,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            239,
             18
           ]
         ],
         [
-          234,
+          233,
           [
             24,
             25,
@@ -1781,7 +2273,17 @@
             31
           ],
           [
-            241,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            240,
             18
           ]
         ]
@@ -1790,19 +2292,41 @@
     {
       "actions": [
         [
-          242,
+          241,
           [
             67
           ],
           [
+            3
+          ],
+          [
+            242,
+            18
+          ]
+        ],
+        [
+          241,
+          [
+            71,
+            1
+          ],
+          [
+            3,
+            1
+          ],
+          [
             243,
             18
           ]
         ],
         [
-          242,
+          241,
           [
-            71,
+            2,
+            1
+          ],
+          [
+            1,
             1
           ],
           [
@@ -1811,9 +2335,13 @@
           ]
         ],
         [
-          242,
+          241,
           [
-            2,
+            3,
+            4
+          ],
+          [
+            1,
             1
           ],
           [
@@ -1822,18 +2350,7 @@
           ]
         ],
         [
-          242,
-          [
-            3,
-            4
-          ],
-          [
-            246,
-            18
-          ]
-        ],
-        [
-          242,
+          241,
           [
             5,
             6,
@@ -1841,12 +2358,18 @@
             8
           ],
           [
-            247,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            246,
             18
           ]
         ],
         [
-          242,
+          241,
           [
             9,
             10,
@@ -1855,7 +2378,14 @@
             13
           ],
           [
-            248,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            247,
             18
           ]
         ]
@@ -1864,7 +2394,7 @@
     {
       "actions": [
         [
-          249,
+          248,
           [
             1,
             2,
@@ -1874,12 +2404,20 @@
             6
           ],
           [
-            250,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            249,
             18
           ]
         ],
         [
-          249,
+          248,
           [
             [
               1,
@@ -1891,14 +2429,17 @@
             ]
           ],
           [
-            251,
+            8
+          ],
+          [
+            250,
             15,
-            252,
+            251,
             18
           ]
         ],
         [
-          249,
+          248,
           [
             [
               7,
@@ -1910,9 +2451,12 @@
             ]
           ],
           [
-            253,
+            8
+          ],
+          [
+            252,
             15,
-            254,
+            253,
             18
           ]
         ]
@@ -1921,108 +2465,128 @@
     {
       "actions": [
         [
-          255,
+          254,
           [],
+          [],
+          [
+            255,
+            18
+          ]
+        ],
+        [
+          254,
+          [
+            1
+          ],
+          [
+            1
+          ],
           [
             256,
             18
           ]
-        ],
-        [
-          255,
-          [
-            1
-          ],
-          [
-            257,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          258,
+          257,
           [],
+          [],
+          [
+            258,
+            18
+          ]
+        ],
+        [
+          257,
+          [
+            107
+          ],
+          [
+            3
+          ],
           [
             259,
             18
           ]
-        ],
-        [
-          258,
-          [
-            108
-          ],
-          [
-            260,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          261,
+          260,
           [],
+          [],
+          [
+            261,
+            18
+          ]
+        ],
+        [
+          260,
+          [
+            1
+          ],
+          [
+            1
+          ],
           [
             262,
             18
           ]
-        ],
-        [
-          261,
-          [
-            1
-          ],
-          [
-            263,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          264,
+          263,
           [],
+          [],
+          [
+            264,
+            18
+          ]
+        ],
+        [
+          263,
+          [
+            1
+          ],
+          [
+            1
+          ],
           [
             265,
             18
           ]
-        ],
-        [
-          264,
-          [
-            1
-          ],
-          [
-            266,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          267,
+          266,
+          [],
           [],
           [
-            268,
+            267,
             18
           ]
         ],
         [
-          267,
+          266,
           [
             48
           ],
           [
-            269,
+            9
+          ],
+          [
+            268,
             18
           ]
         ]
@@ -2031,7 +2595,7 @@
     {
       "actions": [
         [
-          270,
+          269,
           [
             1,
             2,
@@ -2039,7 +2603,13 @@
             4
           ],
           [
-            271,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            270,
             18
           ]
         ]
@@ -2048,17 +2618,34 @@
     {
       "actions": [
         [
-          272,
+          271,
           [],
+          [],
+          [
+            272,
+            18
+          ]
+        ],
+        [
+          271,
+          [
+            107
+          ],
+          [
+            3
+          ],
           [
             273,
             18
           ]
         ],
         [
-          272,
+          271,
           [
-            108
+            125
+          ],
+          [
+            10
           ],
           [
             274,
@@ -2066,9 +2653,12 @@
           ]
         ],
         [
-          272,
+          271,
           [
-            126
+            128
+          ],
+          [
+            10
           ],
           [
             275,
@@ -2076,43 +2666,41 @@
           ]
         ],
         [
-          272,
+          271,
           [
-            129
+            133
+          ],
+          [
+            11
           ],
           [
             276,
             18
           ]
-        ],
-        [
-          272,
-          [
-            134
-          ],
-          [
-            277,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          278,
+          277,
           [
             67,
             1,
             2
           ],
           [
-            279,
+            3,
+            1,
+            1
+          ],
+          [
+            278,
             18
           ]
         ],
         [
-          278,
+          277,
           [
             71,
             3,
@@ -2120,7 +2708,13 @@
             5
           ],
           [
-            280,
+            3,
+            1,
+            1,
+            1
+          ],
+          [
+            279,
             18
           ]
         ]
@@ -2129,10 +2723,11 @@
     {
       "actions": [
         [
-          281,
+          280,
+          [],
           [],
           [
-            282,
+            281,
             18
           ]
         ]
@@ -2141,10 +2736,11 @@
     {
       "actions": [
         [
-          283,
+          282,
+          [],
           [],
           [
-            284,
+            283,
             18
           ]
         ]
@@ -2153,7 +2749,7 @@
     {
       "actions": [
         [
-          285,
+          284,
           [
             1,
             2,
@@ -2163,7 +2759,15 @@
             6
           ],
           [
-            286,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            285,
             18
           ]
         ]
@@ -2172,13 +2776,17 @@
     {
       "actions": [
         [
-          287,
+          286,
           [
             1,
             2
           ],
           [
-            288,
+            1,
+            1
+          ],
+          [
+            287,
             18
           ]
         ]
@@ -2187,7 +2795,7 @@
     {
       "actions": [
         [
-          289,
+          288,
           [
             1,
             2,
@@ -2195,9 +2803,15 @@
             4
           ],
           [
-            290,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            289,
             15,
-            291,
+            290,
             18
           ]
         ]
@@ -2206,20 +2820,24 @@
     {
       "actions": [
         [
-          292,
+          291,
+          [],
           [],
           [
-            293,
+            292,
             18
           ]
         ],
         [
-          292,
+          291,
           [
             1
           ],
           [
-            294,
+            2
+          ],
+          [
+            293,
             18
           ]
         ]
@@ -2228,15 +2846,16 @@
     {
       "actions": [
         [
-          295,
+          294,
+          [],
           [],
           [
-            296,
+            295,
             18
           ]
         ],
         [
-          295,
+          294,
           [
             [
               1,
@@ -2244,7 +2863,10 @@
             ]
           ],
           [
-            297,
+            4
+          ],
+          [
+            296,
             18
           ]
         ]
@@ -2253,20 +2875,24 @@
     {
       "actions": [
         [
-          298,
+          297,
+          [],
           [],
           [
-            299,
+            298,
             18
           ]
         ],
         [
-          298,
+          297,
           [
             1
           ],
           [
-            300,
+            1
+          ],
+          [
+            299,
             18
           ]
         ]
@@ -2275,21 +2901,26 @@
     {
       "actions": [
         [
-          301,
+          300,
           [
             57,
             5,
             6
           ],
           [
-            302,
+            7,
+            1,
+            1
+          ],
+          [
+            301,
             18
           ]
         ],
         [
-          301,
+          300,
           [
-            190,
+            189,
             7,
             8,
             9,
@@ -2298,7 +2929,16 @@
             12
           ],
           [
-            303,
+            7,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            302,
             18
           ]
         ]
@@ -2601,7 +3241,6 @@
       16
     ],
     "drawFocusIfNeeded",
-    "element",
     [
       10,
       12,
@@ -2809,7 +3448,7 @@
     ],
     "linear-gradient",
     [
-      125,
+      124,
       [
         1,
         2,
@@ -2826,7 +3465,7 @@
     ],
     "radial-gradient",
     [
-      128,
+      127,
       [
         1,
         2,
@@ -2847,9 +3486,9 @@
     "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII=",
     "no-repeat",
     [
+      130,
       131,
-      132,
-      133
+      132
     ],
     [
       10,
@@ -3665,6 +4304,14 @@
             0
           ],
           [
+            1,
+            1,
+            1,
+            1,
+            1,
+            2
+          ],
+          [
             13,
             15,
             16,
diff --git a/LayoutTests/inspector/canvas/recording-webgl-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-expected.txt
index ef5e568..41e4b0c 100644
--- a/LayoutTests/inspector/canvas/recording-webgl-expected.txt
+++ b/LayoutTests/inspector/canvas/recording-webgl-expected.txt
@@ -33,6 +33,9 @@
             1
           ],
           [
+            1
+          ],
+          [
             3,
             5,
             7,
@@ -132,6 +135,9 @@
             1
           ],
           [
+            1
+          ],
+          [
             3,
             5,
             7,
@@ -148,11 +154,15 @@
         [
           17,
           [
-            18,
-            19
+            0,
+            0
           ],
           [
-            20,
+            17,
+            16
+          ],
+          [
+            18,
             5
           ]
         ]
@@ -161,11 +171,35 @@
     {
       "actions": [
         [
-          21,
+          19,
           [
-            18,
+            0,
             1,
-            22
+            20
+          ],
+          [
+            17,
+            1,
+            3
+          ],
+          [
+            21,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          22,
+          [
+            1,
+            0
+          ],
+          [
+            1,
+            12
           ],
           [
             23,
@@ -180,10 +214,14 @@
           24,
           [
             1,
-            25
+            0
           ],
           [
-            26,
+            1,
+            13
+          ],
+          [
+            25,
             5
           ]
         ]
@@ -192,10 +230,33 @@
     {
       "actions": [
         [
-          27,
+          26,
           [
             1,
-            28
+            0
+          ],
+          [
+            1,
+            14
+          ],
+          [
+            27,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          28,
+          [
+            1,
+            0
+          ],
+          [
+            1,
+            15
           ],
           [
             29,
@@ -210,10 +271,18 @@
           30,
           [
             1,
-            31
+            2,
+            3,
+            4
           ],
           [
-            32,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            31,
             5
           ]
         ]
@@ -222,10 +291,31 @@
     {
       "actions": [
         [
-          33,
+          32,
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
+            33,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          34,
           [
             1,
-            34
+            2
+          ],
+          [
+            1,
+            1
           ],
           [
             35,
@@ -240,9 +330,11 @@
           36,
           [
             1,
-            2,
-            3,
-            4
+            2
+          ],
+          [
+            1,
+            1
           ],
           [
             37,
@@ -256,6 +348,15 @@
         [
           38,
           [
+            1,
+            2,
+            3,
+            4
+          ],
+          [
+            1,
+            1,
+            1,
             1
           ],
           [
@@ -271,70 +372,33 @@
           40,
           [
             1,
+            0,
             2
           ],
           [
+            1,
+            5,
+            1
+          ],
+          [
             41,
             5
           ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          42,
-          [
-            1,
-            2
-          ],
-          [
-            43,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          44,
-          [
-            1,
-            2,
-            3,
-            4
-          ],
-          [
-            45,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          46,
-          [
-            1,
-            47,
-            2
-          ],
-          [
-            48,
-            5
-          ]
         ],
         [
-          46,
+          40,
           [
             3,
             4,
             5
           ],
           [
-            49,
+            1,
+            1,
+            1
+          ],
+          [
+            42,
             5
           ]
         ]
@@ -343,11 +407,74 @@
     {
       "actions": [
         [
+          43,
+          [
+            1,
+            2,
+            0
+          ],
+          [
+            1,
+            1,
+            5
+          ],
+          [
+            44,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          45,
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
+            46,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          47,
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
+            48,
+            5
+          ],
+          49
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
           50,
           [
             1,
             2,
-            47
+            3,
+            4
+          ],
+          [
+            1,
+            1,
+            1,
+            1
           ],
           [
             51,
@@ -364,6 +491,9 @@
             1
           ],
           [
+            1
+          ],
+          [
             53,
             5
           ]
@@ -378,26 +508,11 @@
             1
           ],
           [
+            1
+          ],
+          [
             55,
             5
-          ],
-          56
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          57,
-          [
-            1,
-            2,
-            3,
-            4
-          ],
-          [
-            58,
-            5
           ]
         ]
       ]
@@ -405,35 +520,7 @@
     {
       "actions": [
         [
-          59,
-          [
-            1
-          ],
-          [
-            60,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          61,
-          [
-            1
-          ],
-          [
-            62,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          63,
+          56,
           [
             1,
             0,
@@ -441,21 +528,13 @@
             0
           ],
           [
-            64,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          65,
-          [
-            19
+            2,
+            2,
+            2,
+            2
           ],
           [
-            66,
+            57,
             5
           ]
         ]
@@ -464,7 +543,24 @@
     {
       "actions": [
         [
-          67,
+          58,
+          [
+            0
+          ],
+          [
+            16
+          ],
+          [
+            59,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          60,
           [
             1,
             2,
@@ -472,10 +568,19 @@
             4,
             5,
             6,
-            47
+            0
           ],
           [
-            68,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            5
+          ],
+          [
+            61,
             5
           ]
         ]
@@ -484,7 +589,7 @@
     {
       "actions": [
         [
-          69,
+          62,
           [
             1,
             2,
@@ -493,10 +598,20 @@
             5,
             6,
             7,
-            47
+            0
           ],
           [
-            70,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            5
+          ],
+          [
+            63,
             5
           ]
         ]
@@ -505,7 +620,7 @@
     {
       "actions": [
         [
-          71,
+          64,
           [
             1,
             2,
@@ -517,7 +632,17 @@
             8
           ],
           [
-            72,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            65,
             5
           ]
         ]
@@ -526,7 +651,7 @@
     {
       "actions": [
         [
-          73,
+          66,
           [
             1,
             2,
@@ -538,7 +663,17 @@
             8
           ],
           [
-            74,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            67,
             5
           ]
         ]
@@ -547,10 +682,11 @@
     {
       "actions": [
         [
-          75,
+          68,
+          [],
           [],
           [
-            76,
+            69,
             5
           ]
         ]
@@ -559,10 +695,11 @@
     {
       "actions": [
         [
-          77,
+          70,
+          [],
           [],
           [
-            78,
+            71,
             5
           ]
         ]
@@ -571,10 +708,11 @@
     {
       "actions": [
         [
-          79,
+          72,
+          [],
           [],
           [
-            80,
+            73,
             5
           ]
         ]
@@ -583,10 +721,11 @@
     {
       "actions": [
         [
-          81,
+          74,
+          [],
           [],
           [
-            82,
+            75,
             5
           ]
         ]
@@ -595,12 +734,15 @@
     {
       "actions": [
         [
-          83,
+          76,
           [
             1
           ],
           [
-            84,
+            1
+          ],
+          [
+            77,
             5
           ]
         ]
@@ -609,10 +751,11 @@
     {
       "actions": [
         [
-          85,
+          78,
+          [],
           [],
           [
-            86,
+            79,
             5
           ]
         ]
@@ -621,26 +764,15 @@
     {
       "actions": [
         [
-          87,
+          80,
           [
             1
           ],
           [
-            88,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          89,
-          [
-            25
+            1
           ],
           [
-            90,
+            81,
             5
           ]
         ]
@@ -649,26 +781,15 @@
     {
       "actions": [
         [
-          91,
+          82,
           [
-            28
+            0
           ],
           [
-            92,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          93,
-          [
-            18
+            12
           ],
           [
-            94,
+            83,
             5
           ]
         ]
@@ -677,26 +798,15 @@
     {
       "actions": [
         [
-          95,
+          84,
           [
-            31
+            0
           ],
           [
-            96,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          97,
-          [
-            19
+            13
           ],
           [
-            98,
+            85,
             5
           ]
         ]
@@ -705,12 +815,15 @@
     {
       "actions": [
         [
-          99,
+          86,
           [
-            34
+            0
           ],
           [
-            100,
+            17
+          ],
+          [
+            87,
             5
           ]
         ]
@@ -719,12 +832,66 @@
     {
       "actions": [
         [
-          101,
+          88,
+          [
+            0
+          ],
+          [
+            14
+          ],
+          [
+            89,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          90,
+          [
+            0
+          ],
+          [
+            16
+          ],
+          [
+            91,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          92,
+          [
+            0
+          ],
+          [
+            15
+          ],
+          [
+            93,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          94,
           [
             1
           ],
           [
-            102,
+            1
+          ],
+          [
+            95,
             5
           ]
         ]
@@ -733,12 +900,15 @@
     {
       "actions": [
         [
-          103,
+          96,
           [
             1
           ],
           [
-            104,
+            2
+          ],
+          [
+            97,
             5
           ]
         ]
@@ -747,28 +917,17 @@
     {
       "actions": [
         [
-          105,
+          98,
           [
             1,
             2
           ],
           [
-            106,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          107,
-          [
-            18,
-            19
+            1,
+            1
           ],
           [
-            108,
+            99,
             5
           ]
         ]
@@ -777,12 +936,34 @@
     {
       "actions": [
         [
-          109,
+          100,
+          [
+            0,
+            0
+          ],
+          [
+            17,
+            16
+          ],
+          [
+            101,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          102,
           [
             1
           ],
           [
-            110,
+            1
+          ],
+          [
+            103,
             5
           ]
         ]
@@ -791,12 +972,15 @@
     {
       "actions": [
         [
-          111,
+          104,
           [
             1
           ],
           [
-            112,
+            1
+          ],
+          [
+            105,
             5
           ]
         ]
@@ -805,24 +989,29 @@
     {
       "actions": [
         [
-          113,
+          106,
           [
             1,
             2,
             3
           ],
           [
-            114,
+            1,
+            1,
+            1
+          ],
+          [
+            107,
             5
           ],
-          56
+          49
         ]
       ]
     },
     {
       "actions": [
         [
-          115,
+          108,
           [
             1,
             2,
@@ -830,22 +1019,31 @@
             4
           ],
           [
-            116,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            109,
             5
           ],
-          56
+          49
         ]
       ]
     },
     {
       "actions": [
         [
-          117,
+          110,
           [
             1
           ],
           [
-            118,
+            1
+          ],
+          [
+            111,
             5
           ]
         ]
@@ -854,53 +1052,15 @@
     {
       "actions": [
         [
-          119,
+          112,
           [
             1
           ],
           [
-            120,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          121,
-          [],
-          [
-            122,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          123,
-          [],
-          [
-            124,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          125,
-          [
-            1,
-            2,
-            3,
-            31
+            1
           ],
           [
-            126,
+            113,
             5
           ]
         ]
@@ -909,16 +1069,72 @@
     {
       "actions": [
         [
-          127,
+          114,
+          [],
+          [],
+          [
+            115,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          116,
+          [],
+          [],
+          [
+            117,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          118,
           [
             1,
             2,
             3,
-            34,
+            0
+          ],
+          [
+            1,
+            1,
+            1,
+            14
+          ],
+          [
+            119,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          120,
+          [
+            1,
+            2,
+            3,
+            0,
             4
           ],
           [
-            128,
+            1,
+            1,
+            1,
+            15,
+            1
+          ],
+          [
+            121,
             5
           ]
         ]
@@ -927,12 +1143,15 @@
     {
       "actions": [
         [
-          129,
+          122,
           [
             1
           ],
           [
-            130,
+            1
+          ],
+          [
+            123,
             5
           ]
         ]
@@ -941,27 +1160,15 @@
     {
       "actions": [
         [
-          131,
+          124,
           [
             1
           ],
           [
-            132,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          133,
-          [
-            18,
             1
           ],
           [
-            134,
+            125,
             5
           ]
         ]
@@ -970,27 +1177,17 @@
     {
       "actions": [
         [
-          135,
+          126,
           [
-            18,
+            0,
             1
           ],
           [
-            136,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          137,
-          [
-            18
+            17,
+            1
           ],
           [
-            138,
+            127,
             5
           ]
         ]
@@ -999,13 +1196,17 @@
     {
       "actions": [
         [
-          139,
+          128,
           [
-            18,
-            22
+            0,
+            1
           ],
           [
-            140,
+            17,
+            1
+          ],
+          [
+            129,
             5
           ]
         ]
@@ -1014,51 +1215,53 @@
     {
       "actions": [
         [
-          141,
+          130,
+          [
+            0
+          ],
+          [
+            17
+          ],
+          [
+            131,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          132,
+          [
+            0,
+            20
+          ],
+          [
+            17,
+            3
+          ],
+          [
+            133,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          134,
           [
             1,
             2
           ],
           [
-            142,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          143,
-          [],
-          [
-            144,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          145,
-          [],
-          [
-            146,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          147,
-          [
-            22
+            1,
+            1
           ],
           [
-            148,
+            135,
             5
           ]
         ]
@@ -1067,14 +1270,62 @@
     {
       "actions": [
         [
-          149,
+          136,
+          [],
+          [],
+          [
+            137,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          138,
+          [],
+          [],
+          [
+            139,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          140,
+          [
+            20
+          ],
+          [
+            3
+          ],
+          [
+            141,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          142,
           [
             1,
             2,
             3
           ],
           [
-            150,
+            1,
+            1,
+            1
+          ],
+          [
+            143,
             5
           ]
         ]
@@ -1083,41 +1334,15 @@
     {
       "actions": [
         [
-          151,
+          144,
           [
             1
           ],
           [
-            152,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          153,
-          [
-            18
-          ],
-          [
-            154,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          155,
-          [
-            18,
             1
           ],
           [
-            156,
+            145,
             5
           ]
         ]
@@ -1126,42 +1351,53 @@
     {
       "actions": [
         [
-          157,
+          146,
+          [
+            0
+          ],
+          [
+            17
+          ],
+          [
+            147,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          148,
+          [
+            0,
+            1
+          ],
+          [
+            17,
+            1
+          ],
+          [
+            149,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          150,
           [
             1,
             2
           ],
           [
-            158,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          159,
-          [
-            19
-          ],
-          [
-            160,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          161,
-          [
-            19,
+            1,
             1
           ],
           [
-            162,
+            151,
             5
           ]
         ]
@@ -1170,27 +1406,53 @@
     {
       "actions": [
         [
-          163,
+          152,
+          [
+            0
+          ],
+          [
+            16
+          ],
+          [
+            153,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          154,
+          [
+            0,
+            1
+          ],
+          [
+            16,
+            1
+          ],
+          [
+            155,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          156,
           [
             1,
             2
           ],
           [
-            164,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          165,
-          [
-            19
+            1,
+            1
           ],
           [
-            166,
+            157,
             5
           ]
         ]
@@ -1199,10 +1461,28 @@
     {
       "actions": [
         [
-          167,
+          158,
+          [
+            0
+          ],
+          [
+            16
+          ],
+          [
+            159,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          160,
+          [],
           [],
           [
-            168,
+            161,
             5
           ]
         ]
@@ -1211,27 +1491,17 @@
     {
       "actions": [
         [
-          169,
+          162,
           [
             1,
             2
           ],
           [
-            170,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          171,
-          [
-            18
+            1,
+            1
           ],
           [
-            172,
+            163,
             5
           ]
         ]
@@ -1240,13 +1510,15 @@
     {
       "actions": [
         [
-          173,
+          164,
           [
-            18,
-            22
+            0
           ],
           [
-            174,
+            17
+          ],
+          [
+            165,
             5
           ]
         ]
@@ -1255,13 +1527,36 @@
     {
       "actions": [
         [
-          175,
+          166,
+          [
+            0,
+            20
+          ],
+          [
+            17,
+            3
+          ],
+          [
+            167,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          168,
           [
             1,
             2
           ],
           [
-            176,
+            1,
+            1
+          ],
+          [
+            169,
             5
           ]
         ]
@@ -1270,13 +1565,17 @@
     {
       "actions": [
         [
-          177,
+          170,
           [
             1,
             2
           ],
           [
-            178,
+            1,
+            1
+          ],
+          [
+            171,
             5
           ]
         ]
@@ -1285,27 +1584,17 @@
     {
       "actions": [
         [
-          179,
+          172,
           [
             1,
             2
           ],
           [
-            180,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          181,
-          [
-            25
+            1,
+            1
           ],
           [
-            182,
+            173,
             5
           ]
         ]
@@ -1314,10 +1603,28 @@
     {
       "actions": [
         [
-          183,
+          174,
+          [
+            0
+          ],
+          [
+            12
+          ],
+          [
+            175,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          176,
+          [],
           [],
           [
-            184,
+            177,
             5
           ]
         ]
@@ -1326,26 +1633,15 @@
     {
       "actions": [
         [
-          185,
+          178,
           [
             1
           ],
           [
-            186,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          187,
-          [
-            28
+            1
           ],
           [
-            188,
+            179,
             5
           ]
         ]
@@ -1354,26 +1650,15 @@
     {
       "actions": [
         [
-          189,
+          180,
           [
-            18
+            0
           ],
           [
-            190,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          191,
-          [
-            31
+            13
           ],
           [
-            192,
+            181,
             5
           ]
         ]
@@ -1382,26 +1667,15 @@
     {
       "actions": [
         [
-          193,
+          182,
           [
-            19
+            0
           ],
           [
-            194,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          195,
-          [
-            34
+            17
           ],
           [
-            196,
+            183,
             5
           ]
         ]
@@ -1410,26 +1684,66 @@
     {
       "actions": [
         [
-          197,
+          184,
+          [
+            0
+          ],
+          [
+            14
+          ],
+          [
+            185,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          186,
+          [
+            0
+          ],
+          [
+            16
+          ],
+          [
+            187,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          188,
+          [
+            0
+          ],
+          [
+            15
+          ],
+          [
+            189,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          190,
           [
             1
           ],
           [
-            198,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          199,
-          [
-            18
+            1
           ],
           [
-            200,
+            191,
             5
           ]
         ]
@@ -1438,13 +1752,34 @@
     {
       "actions": [
         [
-          201,
+          192,
+          [
+            0
+          ],
+          [
+            17
+          ],
+          [
+            193,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          194,
           [
             1,
             2
           ],
           [
-            202,
+            1,
+            1
+          ],
+          [
+            195,
             5
           ]
         ]
@@ -1453,13 +1788,17 @@
     {
       "actions": [
         [
-          203,
+          196,
           [
             1,
             2
           ],
           [
-            204,
+            1,
+            1
+          ],
+          [
+            197,
             5
           ]
         ]
@@ -1468,7 +1807,7 @@
     {
       "actions": [
         [
-          205,
+          198,
           [
             1,
             2,
@@ -1476,10 +1815,19 @@
             4,
             5,
             6,
-            47
+            0
           ],
           [
-            206,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            5
+          ],
+          [
+            199,
             5
           ]
         ]
@@ -1488,10 +1836,11 @@
     {
       "actions": [
         [
-          207,
+          200,
+          [],
           [],
           [
-            208,
+            201,
             5
           ]
         ]
@@ -1500,7 +1849,7 @@
     {
       "actions": [
         [
-          209,
+          202,
           [
             1,
             2,
@@ -1508,7 +1857,13 @@
             4
           ],
           [
-            210,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            203,
             5
           ]
         ]
@@ -1517,13 +1872,17 @@
     {
       "actions": [
         [
-          211,
+          204,
           [
             1,
             1
           ],
           [
-            212,
+            1,
+            2
+          ],
+          [
+            205,
             5
           ]
         ]
@@ -1532,7 +1891,7 @@
     {
       "actions": [
         [
-          213,
+          206,
           [
             1,
             2,
@@ -1540,22 +1899,13 @@
             4
           ],
           [
-            214,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          215,
-          [
-            19,
-            22
+            1,
+            1,
+            1,
+            1
           ],
           [
-            216,
+            207,
             5
           ]
         ]
@@ -1564,14 +1914,38 @@
     {
       "actions": [
         [
-          217,
+          208,
+          [
+            0,
+            20
+          ],
+          [
+            16,
+            3
+          ],
+          [
+            209,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          210,
           [
             1,
             2,
             3
           ],
           [
-            218,
+            1,
+            1,
+            1
+          ],
+          [
+            211,
             5
           ]
         ]
@@ -1580,7 +1954,7 @@
     {
       "actions": [
         [
-          219,
+          212,
           [
             1,
             2,
@@ -1588,7 +1962,13 @@
             4
           ],
           [
-            220,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            213,
             5
           ]
         ]
@@ -1597,12 +1977,15 @@
     {
       "actions": [
         [
-          221,
+          214,
           [
             1
           ],
           [
-            222,
+            1
+          ],
+          [
+            215,
             5
           ]
         ]
@@ -1611,70 +1994,93 @@
     {
       "actions": [
         [
-          223,
+          216,
           [
             1,
             2
           ],
           [
+            1,
+            1
+          ],
+          [
+            217,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          218,
+          [
+            1,
+            2,
+            3
+          ],
+          [
+            1,
+            1,
+            1
+          ],
+          [
+            219,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          220,
+          [
+            1,
+            2,
+            3,
+            4
+          ],
+          [
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            221,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          222,
+          [
+            1,
+            2,
+            3,
+            4,
+            5,
+            223
+          ],
+          [
+            1,
+            1,
+            1,
+            1,
+            1,
+            6
+          ],
+          [
             224,
             5
           ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          225,
-          [
-            1,
-            2,
-            3
-          ],
-          [
-            226,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          227,
-          [
-            1,
-            2,
-            3,
-            4
-          ],
-          [
-            228,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          229,
-          [
-            1,
-            2,
-            3,
-            4,
-            5,
-            230
-          ],
-          [
-            231,
-            5
-          ]
         ],
         [
-          229,
+          222,
           [
             6,
             7,
@@ -1684,7 +2090,118 @@
             11,
             12,
             13,
-            47
+            0
+          ],
+          [
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            5
+          ],
+          [
+            225,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          226,
+          [
+            1,
+            2,
+            3
+          ],
+          [
+            1,
+            1,
+            1
+          ],
+          [
+            227,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          228,
+          [
+            1,
+            2,
+            3
+          ],
+          [
+            1,
+            1,
+            1
+          ],
+          [
+            229,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          230,
+          [
+            1,
+            2,
+            3,
+            4,
+            5,
+            6,
+            223
+          ],
+          [
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            6
+          ],
+          [
+            231,
+            5
+          ]
+        ],
+        [
+          230,
+          [
+            7,
+            8,
+            9,
+            10,
+            11,
+            12,
+            13,
+            14,
+            0
+          ],
+          [
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            1,
+            5
           ],
           [
             232,
@@ -1698,9 +2215,10 @@
         [
           233,
           [
-            1,
-            2,
-            3
+            1
+          ],
+          [
+            1
           ],
           [
             234,
@@ -1714,9 +2232,10 @@
         [
           235,
           [
-            1,
-            2,
-            3
+            0
+          ],
+          [
+            5
           ],
           [
             236,
@@ -1730,34 +2249,30 @@
         [
           237,
           [
-            1,
-            2,
-            3,
-            4,
-            5,
-            6,
-            230
+            1
+          ],
+          [
+            1
           ],
           [
             238,
             5
           ]
-        ],
+        ]
+      ]
+    },
+    {
+      "actions": [
         [
-          237,
+          239,
           [
-            7,
-            8,
-            9,
-            10,
-            11,
-            12,
-            13,
-            14,
-            47
+            0
           ],
           [
-            239,
+            5
+          ],
+          [
+            240,
             5
           ]
         ]
@@ -1766,12 +2281,17 @@
     {
       "actions": [
         [
-          240,
+          241,
           [
+            1,
+            2
+          ],
+          [
+            1,
             1
           ],
           [
-            241,
+            242,
             5
           ]
         ]
@@ -1780,9 +2300,12 @@
     {
       "actions": [
         [
-          242,
+          243,
           [
-            243
+            0
+          ],
+          [
+            5
           ],
           [
             244,
@@ -1796,6 +2319,11 @@
         [
           245,
           [
+            1,
+            2
+          ],
+          [
+            1,
             1
           ],
           [
@@ -1810,10 +2338,13 @@
         [
           247,
           [
-            248
+            0
           ],
           [
-            249,
+            5
+          ],
+          [
+            248,
             5
           ]
         ]
@@ -1822,86 +2353,19 @@
     {
       "actions": [
         [
-          250,
-          [
-            1,
-            2
-          ],
-          [
-            251,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          252,
-          [
-            243
-          ],
-          [
-            253,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          254,
-          [
-            1,
-            2
-          ],
-          [
-            255,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          256,
-          [
-            248
-          ],
-          [
-            257,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          258,
+          249,
           [
             1,
             2,
             3
           ],
           [
-            259,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          260,
-          [
-            243
+            1,
+            1,
+            1
           ],
           [
-            261,
+            250,
             5
           ]
         ]
@@ -1910,28 +2374,36 @@
     {
       "actions": [
         [
-          262,
+          251,
+          [
+            0
+          ],
+          [
+            5
+          ],
+          [
+            252,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          253,
           [
             1,
             2,
             3
           ],
           [
-            263,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          264,
-          [
-            248
+            1,
+            1,
+            1
           ],
           [
-            265,
+            254,
             5
           ]
         ]
@@ -1940,7 +2412,24 @@
     {
       "actions": [
         [
-          266,
+          255,
+          [
+            0
+          ],
+          [
+            5
+          ],
+          [
+            256,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          257,
           [
             1,
             2,
@@ -1948,21 +2437,13 @@
             4
           ],
           [
-            267,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          268,
-          [
-            243
+            1,
+            1,
+            1,
+            1
           ],
           [
-            269,
+            258,
             5
           ]
         ]
@@ -1971,7 +2452,24 @@
     {
       "actions": [
         [
-          270,
+          259,
+          [
+            0
+          ],
+          [
+            5
+          ],
+          [
+            260,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          261,
           [
             1,
             2,
@@ -1979,21 +2477,13 @@
             4
           ],
           [
-            271,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          272,
-          [
-            248
+            1,
+            1,
+            1,
+            1
           ],
           [
-            273,
+            262,
             5
           ]
         ]
@@ -2002,13 +2492,34 @@
     {
       "actions": [
         [
-          274,
+          263,
+          [
+            0
+          ],
+          [
+            5
+          ],
+          [
+            264,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          265,
           [
             1,
-            243
+            0
           ],
           [
-            275,
+            2,
+            5
+          ],
+          [
+            266,
             5
           ]
         ]
@@ -2017,13 +2528,17 @@
     {
       "actions": [
         [
-          276,
+          267,
           [
             1,
-            243
+            0
           ],
           [
-            277,
+            2,
+            5
+          ],
+          [
+            268,
             5
           ]
         ]
@@ -2032,13 +2547,17 @@
     {
       "actions": [
         [
-          278,
+          269,
           [
             1,
-            243
+            0
           ],
           [
-            279,
+            2,
+            5
+          ],
+          [
+            270,
             5
           ]
         ]
@@ -2047,12 +2566,15 @@
     {
       "actions": [
         [
-          280,
+          271,
           [
-            18
+            0
           ],
           [
-            281,
+            17
+          ],
+          [
+            272,
             5
           ]
         ]
@@ -2061,12 +2583,15 @@
     {
       "actions": [
         [
-          282,
+          273,
           [
-            18
+            0
           ],
           [
-            283,
+            17
+          ],
+          [
+            274,
             5
           ]
         ]
@@ -2075,28 +2600,17 @@
     {
       "actions": [
         [
-          284,
+          275,
           [
             1,
             2
           ],
           [
-            285,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          286,
-          [
             1,
-            243
+            1
           ],
           [
-            287,
+            276,
             5
           ]
         ]
@@ -2105,29 +2619,38 @@
     {
       "actions": [
         [
-          288,
+          277,
+          [
+            1,
+            0
+          ],
+          [
+            1,
+            5
+          ],
+          [
+            278,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          279,
           [
             1,
             2,
             3
           ],
           [
-            289,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          290,
-          [
             1,
-            243
+            1,
+            1
           ],
           [
-            291,
+            280,
             5
           ]
         ]
@@ -2136,7 +2659,26 @@
     {
       "actions": [
         [
-          292,
+          281,
+          [
+            1,
+            0
+          ],
+          [
+            1,
+            5
+          ],
+          [
+            282,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          283,
           [
             1,
             2,
@@ -2144,22 +2686,13 @@
             4
           ],
           [
-            293,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          294,
-          [
             1,
-            243
+            1,
+            1,
+            1
           ],
           [
-            295,
+            284,
             5
           ]
         ]
@@ -2168,7 +2701,26 @@
     {
       "actions": [
         [
-          296,
+          285,
+          [
+            1,
+            0
+          ],
+          [
+            1,
+            5
+          ],
+          [
+            286,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          287,
           [
             1,
             2,
@@ -2177,22 +2729,14 @@
             5
           ],
           [
-            297,
-            5
-          ]
-        ]
-      ]
-    },
-    {
-      "actions": [
-        [
-          298,
-          [
             1,
-            243
+            1,
+            1,
+            1,
+            1
           ],
           [
-            299,
+            288,
             5
           ]
         ]
@@ -2201,7 +2745,26 @@
     {
       "actions": [
         [
-          300,
+          289,
+          [
+            1,
+            0
+          ],
+          [
+            1,
+            5
+          ],
+          [
+            290,
+            5
+          ]
+        ]
+      ]
+    },
+    {
+      "actions": [
+        [
+          291,
           [
             1,
             2,
@@ -2211,7 +2774,15 @@
             6
           ],
           [
-            301,
+            1,
+            1,
+            1,
+            2,
+            1,
+            1
+          ],
+          [
+            292,
             5
           ]
         ]
@@ -2220,7 +2791,7 @@
     {
       "actions": [
         [
-          302,
+          293,
           [
             1,
             2,
@@ -2228,7 +2799,13 @@
             4
           ],
           [
-            303,
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            294,
             5
           ]
         ]
@@ -2289,8 +2866,6 @@
       108
     ],
     "attachShader",
-    "WebGLProgram",
-    "WebGLShader",
     [
       1,
       2,
@@ -2306,7 +2881,6 @@
       39
     ],
     "bindBuffer",
-    "WebGLBuffer",
     [
       1,
       2,
@@ -2314,7 +2888,6 @@
       31
     ],
     "bindFramebuffer",
-    "WebGLFramebuffer",
     [
       1,
       2,
@@ -2322,7 +2895,6 @@
       36
     ],
     "bindRenderbuffer",
-    "WebGLRenderbuffer",
     [
       1,
       2,
@@ -2330,7 +2902,6 @@
       37
     ],
     "bindTexture",
-    "WebGLTexture",
     [
       1,
       2,
@@ -2373,7 +2944,6 @@
       38
     ],
     "bufferData",
-    "BufferDataSource",
     [
       1,
       2,
@@ -3059,7 +3629,6 @@
       30
     ],
     "uniform1fv",
-    "Float32List",
     [
       1,
       2,
@@ -3074,7 +3643,6 @@
       30
     ],
     "uniform1iv",
-    "Int32List",
     [
       1,
       2,
@@ -3304,6 +3872,9 @@
             1
           ],
           [
+            1
+          ],
+          [
             3,
             5,
             7,
diff --git a/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt
index 58671b7..c6cf656 100644
--- a/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt
+++ b/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt
@@ -30,18 +30,21 @@
         [
           0,
           [
-            1
+            0
           ],
           [
-            4,
-            7,
-            10,
-            12,
-            14
+            17
+          ],
+          [
+            3,
+            6,
+            9,
+            11,
+            13
           ]
         ],
         [
-          15,
+          14,
           [
             0,
             0,
@@ -49,64 +52,83 @@
             1
           ],
           [
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            16,
             17,
-            18,
-            7,
-            10,
-            12,
-            14
+            6,
+            9,
+            11,
+            13
           ]
         ],
         [
-          19,
+          18,
           [
             16384
           ],
           [
-            20,
-            18,
-            7,
-            10,
-            12,
-            14
+            1
           ],
-          21
+          [
+            19,
+            17,
+            6,
+            9,
+            11,
+            13
+          ],
+          20
         ],
         [
-          22,
+          21,
           [
             34962,
-            23,
+            0,
             35044
           ],
           [
-            25,
-            26,
-            7,
-            10,
-            12,
-            14
+            1,
+            5,
+            1
+          ],
+          [
+            23,
+            24,
+            6,
+            9,
+            11,
+            13
           ]
         ],
         [
-          24,
+          22,
           [
             4,
             0,
             3
           ],
           [
-            27,
-            26,
-            7,
-            10,
-            12,
-            14
+            1,
+            1,
+            1
           ],
-          28
+          [
+            25,
+            24,
+            6,
+            9,
+            11,
+            13
+          ],
+          26
         ],
         [
-          15,
+          14,
           [
             0,
             0,
@@ -114,63 +136,82 @@
             1
           ],
           [
-            17,
-            29,
-            7,
-            10,
-            12,
-            14
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            16,
+            27,
+            6,
+            9,
+            11,
+            13
           ]
         ],
         [
-          19,
+          18,
           [
             16384
           ],
           [
-            20,
-            29,
-            7,
-            10,
-            12,
-            14
+            1
           ],
-          21
+          [
+            19,
+            27,
+            6,
+            9,
+            11,
+            13
+          ],
+          20
         ],
         [
-          22,
+          21,
           [
             34962,
-            23,
+            0,
             35044
           ],
           [
+            1,
+            5,
+            1
+          ],
+          [
+            29,
+            30,
+            6,
+            9,
+            11,
+            13
+          ]
+        ],
+        [
+          21,
+          [
+            34963,
+            0,
+            35044
+          ],
+          [
+            1,
+            5,
+            1
+          ],
+          [
             31,
-            32,
-            7,
-            10,
-            12,
-            14
+            30,
+            6,
+            9,
+            11,
+            13
           ]
         ],
         [
-          22,
-          [
-            34963,
-            23,
-            35044
-          ],
-          [
-            33,
-            32,
-            7,
-            10,
-            12,
-            14
-          ]
-        ],
-        [
-          30,
+          28,
           [
             4,
             3,
@@ -178,17 +219,23 @@
             0
           ],
           [
-            34,
-            32,
-            7,
-            10,
-            12,
-            14
+            1,
+            1,
+            1,
+            1
           ],
-          35
+          [
+            32,
+            30,
+            6,
+            9,
+            11,
+            13
+          ],
+          33
         ],
         [
-          15,
+          14,
           [
             0,
             0,
@@ -196,152 +243,159 @@
             1
           ],
           [
-            17,
-            36,
-            7,
-            10,
-            12,
-            14
+            1,
+            1,
+            1,
+            1
+          ],
+          [
+            16,
+            34,
+            6,
+            9,
+            11,
+            13
           ]
         ],
         [
-          19,
+          18,
           [
             16384
           ],
           [
-            20,
-            36,
-            7,
-            10,
-            12,
-            14
+            1
           ],
-          21
+          [
+            19,
+            34,
+            6,
+            9,
+            11,
+            13
+          ],
+          20
         ]
       ]
     }
   ],
   "data": [
     "useProgram",
-    "WebGLProgram",
     "performActions",
     "inspector/canvas/recording-webgl-snapshots.html",
     [
+      1,
       2,
-      3,
       48,
       23
     ],
     "global code",
     "",
     [
+      4,
       5,
-      6,
       1,
       15
     ],
     "evaluateWithScopeExtension",
     "[native code]",
     [
+      7,
       8,
-      9,
       0,
       0
     ],
     "_evaluateOn",
     [
-      11,
-      6,
+      10,
+      5,
       128,
       29
     ],
     "_evaluateAndWrap",
     [
-      13,
-      6,
+      12,
+      5,
       122,
       108
     ],
     "clearColor",
     "clearContext",
     [
-      16,
-      3,
+      15,
+      2,
       51,
       27
     ],
     [
+      1,
       2,
-      3,
       80,
       17
     ],
     "clear",
     [
-      16,
-      3,
+      15,
+      2,
       52,
       22
     ],
     "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=",
     "bufferData",
-    "BufferDataSource",
     "drawArrays",
     [
-      24,
-      3,
+      22,
+      2,
       61,
       27
     ],
     [
+      1,
       2,
-      3,
       81,
       15
     ],
     [
-      24,
-      3,
+      22,
+      2,
       63,
       27
     ],
     "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABnpJREFUeAHt2otNHEEQRdHBkRAKoREKmRAKZILB5iPQAjs7/auqY8kyLDPd9e4rXdmSr7Zte3r+7RcCCCCwPIE/y09oQAQQQOCVAGFZBQQQCEOAsMJUZVAEECAsO4AAAmEIEFaYqgyKAAKEZQcQQCAMAcIKU5VBEUCAsOwAAgiEIUBYYaoyKAIIEJYdQACBMAQIK0xVBkUAAcKyAwggEIYAYYWpyqAIIEBYdgABBMIQIKwwVRkUAQQIyw4ggEAYAoQVpiqDIoAAYdkBBBAIQ4CwwlRlUAQQICw7gAACYQgQVpiqDIoAAoRlBxBAIAwBwgpTlUERQICw7AACCIQhQFhhqjIoAggQlh1AAIEwBAgrTFUGRQABwrIDCCAQhgBhhanKoAggQFh2AAEEwhAgrDBVGRQBBAjLDiCAQBgChBWmKoMigABh2QEEEAhDgLDCVGVQBBAgLDuAAAJhCBDWjqpubm52PO1RBBBoTYCwdhC9v7/fHh4eNuLaAc2jCDQkQFg7YV5fX2/EtROaxxFoRICwLgRJXBeC8xoCBwgQ1gF4L68S10GAXkdgBwHC2gHrp0eJ6yc6foZAGwKE1Ybj+ynE9Y7CFwg0J0BYzZH+P5C4OoF1bGkChNW5fuLqDNjxpQgQ1qC6iWsQaNekJkBYg+slrsHAXZeKAGFNqpO4JoF3bWgChDW5PuKaXIDrQxEgrEXqIq5FijDG0gQIa7F6iGuxQoyzFAHCWqqOj2GI64OFrxB4I0BYbyQW/ZO4Fi3GWFMIENYU7PsvJa79zLyRjwBhBeuUuIIVZtymBAirKc5xhxHXONZuWocAYa3TxUWTENdF2LwUlABhBS3u69jE9ZWI7zMSIKxkrRJXskLF+USAsD7hyPMNceXpUpIPAoT1wSLlV8SVstayoQirSPXEVaTo5DEJK3nBX+MR11civo9EgLAitdVwVuJqCNNRwwgQ1jDUa15EXGv2YqrTBAjrNJdynxJXucpDBiaskLX1G5q4+rF18nEChHWcYcoTiCtlreFDEVb4CvsGIK6+fJ2+jwBh7eNV9mniKlv9UsEJa6k61h+GuNbvKPOEhJW53Y7ZiKsjXEd/S4CwvkXjB+cQIK5zKHmmFQHCakWy+DnEVXwBBsUnrEGgq1xDXFWanpOTsOZwT38rcaWveEpAwpqCvc6lxFWn6xFJCWsEZXdsxGUJWhAgrBYUnXE2AeI6G5UHTxAgrBNQfNSfAHH1Z5zxBsLK2GqgTMQVqKwFRiWsBUowwrYRly04hwBhnUPJM8MIENcw1CEvIqyQteUfmrjyd3xJQsK6hJp3hhEgrmGoQ1xEWCFqMiRx2YEXAoRlD0IRIK5QdTUflrCaI3XgCALENYLyencQ1nqdmGgHAeLaASvBo4SVoEQR/D+uKjtAWFWaLpLT37hyF01Yufstm464clZPWDl7leqVAHHlWgXCytWnNN8QIK5vwAT7mLCCFWbcYwSI6xi/2W8T1uwG3D+FAHFNwX74UsI6jNABkQkQV6z2CCtWX6btRIC4OoFtfCxhNQbquNgEiGvt/ghr7X5MN4kAcU0C/8u1hPULID+uTYC41uqfsNbqwzSLEiCuNYohrDV6MEUQAsQ1tyjCmsvf7UEJENec4ghrDne3JiFAXGOLJKyxvN2WlABxjSmWsMZwdksRAsTVt2jC6svX6UUJEFef4gmrD1enIvCPAHG1XQTCasvTaQicJEBcJ7Hs/pCwdiPzAgKXEyCuy9m9vHn1/Pvp2BF13r69va0TVtIhBB4fH7e7u7shd2W4hLAytCgDAkUI+CdhkaLFRCADAcLK0KIMCBQhQFhFihYTgQwECCtDizIgUIQAYRUpWkwEMhAgrAwtyoBAEQKEVaRoMRHIQICwMrQoAwJFCBBWkaLFRCADAcLK0KIMCBQhQFhFihYTgQwECCtDizIgUIQAYRUpWkwEMhAgrAwtyoBAEQKEVaRoMRHIQICwMrQoAwJFCBBWkaLFRCADAcLK0KIMCBQhQFhFihYTgQwECCtDizIgUIQAYRUpWkwEMhAgrAwtyoBAEQKEVaRoMRHIQICwMrQoAwJFCBBWkaLFRCADAcLK0KIMCBQhQFhFihYTgQwECCtDizIgUIQAYRUpWkwEMhAgrAwtyoBAEQKEVaRoMRHIQICwMrQoAwJFCBBWkaLFRCADAcLK0KIMCBQhQFhFihYTgQwECCtDizIgUITAXwCSxNpDApB5AAAAAElFTkSuQmCC",
     [
+      1,
       2,
-      3,
       82,
       17
     ],
     "drawElements",
     [
-      30,
-      3,
+      28,
+      2,
       72,
       27
     ],
     [
+      1,
       2,
-      3,
       83,
       17
     ],
     [
-      30,
-      3,
+      28,
+      2,
       75,
       27
     ],
     [
-      30,
-      3,
+      28,
+      2,
       77,
       29
     ],
     "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABp5JREFUeAHt1AFuE0kQhlGD9iA5im+ao0Q5SY7CkmUREDvEzlRN99/zVkILid1d82r0fTmdTt++//EfAQIEphf4Ov2EBiRAgMD/AoLlVSBAIEZAsGJWZVACBATLO0CAQIyAYMWsyqAECAiWd4AAgRgBwYpZlUEJEBAs7wABAjECghWzKoMSICBY3gECBGIEBCtmVQYlQECwvAMECMQICFbMqgxKgIBgeQcIEIgREKyYVRmUAAHB8g4QIBAjIFgxqzIoAQKC5R0gQCBGQLBiVmVQAgQEyztAgECMgGDFrMqgBAgIlneAAIEYAcGKWZVBCRAQLO8AAQIxAoIVsyqDEiAgWN4BAgRiBAQrZlUGJUBAsLwDBAjECAhWzKoMSoCAYHkHCBCIERCsmFUZlAABwfIOECAQIyBYMasyKAECguUdIEAgRkCwYlZlUAIEBMs7QIBAjIBgxazKoCsKPDw8rPhYbc8kWG20DibwvsBrqJ6enk4vLy/vf8hvLgT+ufiJHxAg0CbwGqrHx8fT+Xxuu2PlgwVr5e16tmkEhKpmFYJV4+gUAlcFhOoqy6d/KFifpvNFAu8LCNX7Nlt+I1hb9HyXwBsBoXoDUvxPwSoGddwxBYRqn70L1j7ObllUQKj2Xaxg7evttkUEhGrMIgVrjLtbQwWEauziBGusv9tDBIRqjkUJ1hx7MMWkAkI112IEa659mGYSAaGaZBFvxhCsNyD+eWwBoZp7/4I1935Mt5OAUO0EvfEawdoI6OvZAkKVtT/BytqXaYsEhKoIcudjBGtncNeNFRCqsf5bbxesrYK+HyEgVBFr+nBIwfqQyAeSBYQqeXuXswvWpYmfLCAgVAss8cojCNYVFD/KFRCq3N3dMrlg3aLkM9MLCNX0KyoZULBKGB0ySkCoRsmPuVewxri7daOAUG0EDP26YIUu7qhjC9VRN//juQXr2PuPeXqhillV66CC1crr8K0CQrVVcK3vC9Za+1zmaYRqmVWWPohglXI6bKuAUG0VXPv7grX2fmOeTqhiVjV0UMEayu9yofIO3CMgWPdo+WyZgFCVUR7qIME61LrHP6xQjd9B8gSClby9oNmFKmhZE48qWBMvZ4XRhGqFLc7zDII1zy6WmkSollrnNA8jWNOsYo1BhGqNPc76FII162bC5hKqsIWFjitYoYubZWyhmmUTx5hDsI6x5/KnFKpyUgfeICBYNyD5yC8Bofpl4W/7CwjW/uaRNwpV5NqWG1qwlltp7QMJVa2n07YJCNY2v2W/LVTLrjb6wQQren31wwtVvakT6wQEq84y+iShil7fYYYXrMOs+vqDCtV1Fz+dU0Cw5txL+1RC1U7sggYBwWpAnflIoZp5O2b7SECwPhJa5PdCtcgiD/4YgrX4CyBUiy/4YI8nWIsuXKgWXezBH0uwFnsBhGqxhXqcPwQE6w+O3H8IVe7uTH67gGDdbjXlJ4VqyrUYqklAsJpgu48Vqm5h588oIFgzbuUvMwnVX3D8ankBwQpZsVCFLMqYrQKC1cq7/XCh2m7ohHUEBGvSXQrVpIsx1lABwRrKf3m5UF2a+AmBnwKC9VNi8P+FavACXB8hIFiD1yRUgxfg+igBwRq0LqEaBO/aaAHB2nl9QrUzuOuWEhCsndYpVDtBu2ZpAcFqXq9QNQM7/lACgtW0bqFqgnXsoQUEq3j9QlUM6jgCvwkI1m8YW/4qVFv0fJfAbQKCdZvTu58Sqndp/IJAuYBgfZJUqD4J52sENggI1p14QnUnmI8TKBQQrDswz+fz6fXP8/Pzf3/u+KqPEiBQIPDl+xnfCs5xBAECBNoFvrbf4AICBAgUCQhWEaRjCBDoFxCsfmM3ECBQJCBYRZCOIUCgX0Cw+o3dQIBAkYBgFUE6hgCBfgHB6jd2AwECRQKCVQTpGAIE+gUEq9/YDQQIFAkIVhGkYwgQ6BcQrH5jNxAgUCQgWEWQjiFAoF9AsPqN3UCAQJGAYBVBOoYAgX4Bweo3dgMBAkUCglUE6RgCBPoFBKvf2A0ECBQJCFYRpGMIEOgXEKx+YzcQIFAkIFhFkI4hQKBfQLD6jd1AgECRgGAVQTqGAIF+AcHqN3YDAQJFAoJVBOkYAgT6BQSr39gNBAgUCQhWEaRjCBDoFxCsfmM3ECBQJCBYRZCOIUCgX0Cw+o3dQIBAkYBgFUE6hgCBfgHB6jd2AwECRQKCVQTpGAIE+gUEq9/YDQQIFAkIVhGkYwgQ6BcQrH5jNxAgUCQgWEWQjiFAoF/gX05P6YKBjR21AAAAAElFTkSuQmCC",
     [
+      1,
       2,
-      3,
       84,
       17
     ]
diff --git a/LayoutTests/inspector/model/recording-expected.txt b/LayoutTests/inspector/model/recording-expected.txt
index 49f0fad..53154d0 100644
--- a/LayoutTests/inspector/model/recording-expected.txt
+++ b/LayoutTests/inspector/model/recording-expected.txt
@@ -71,6 +71,7 @@
         [
           -1,
           [],
+          [],
           []
         ]
       ],
@@ -101,6 +102,7 @@
         [
           null,
           [],
+          [],
           []
         ]
       ],
@@ -135,6 +137,9 @@
           ],
           [
             0
+          ],
+          [
+            0
           ]
         ]
       ],
diff --git a/LayoutTests/inspector/model/recording.html b/LayoutTests/inspector/model/recording.html
index 6e553b1..f56331f 100644
--- a/LayoutTests/inspector/model/recording.html
+++ b/LayoutTests/inspector/model/recording.html
@@ -116,6 +116,7 @@
                                 null,
                                 null,
                                 null,
+                                null,
                             ],
                         ],
                         incomplete: true,
@@ -143,6 +144,7 @@
                                 0,
                                 [0],
                                 [0],
+                                [0],
                             ],
                         ],
                         incomplete: true,
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 5da5699..31cff43 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2017-09-06  Devin Rousso  <webkit@devinrousso.com>
+
+        Web Inspector: Support overloaded CanvasRenderingContext2D actions with identical parameter counts
+        https://bugs.webkit.org/show_bug.cgi?id=176178
+        <rdar://problem/34192229>
+
+        Reviewed by Matt Baker.
+
+        Update existing tests.
+
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * inspector/InspectorCanvas.cpp:
+        (WebCore::buildArrayForVector):
+        (WebCore::InspectorCanvas::buildAction):
+        Add another array to each action that contains a swizzle type for each parameter. This is
+        used by the frontend to determine how to regenerate the value from what is given in the JSON.
+
+        * inspector/RecordingSwizzleTypes.h: Added.
+        Contains a value-specified enum of types that translate into int values, which are mirrored
+        by an object in the frontend, that indicate the type of each parameter. This enum matches
+        the values in WI.Recording.Swizzle.
+
 2017-09-06  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] WebCore failed to build, InbandTextTrackPrivateAVF: base class undefined.
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 982f2b2..b422223 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -3750,6 +3750,7 @@
 		9001774112E0347800648462 /* OESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001773E12E0347800648462 /* OESStandardDerivatives.h */; };
 		9001788012E0370700648462 /* JSOESStandardDerivatives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */; };
 		9001788112E0370700648462 /* JSOESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001787F12E0370700648462 /* JSOESStandardDerivatives.h */; };
+		91B952241F58A58F00931DC2 /* RecordingSwizzleTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */; };
 		91C9F2F91AE3BEB00095B61C /* AXTextStateChangeIntent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9302B0BD0D79F82900C7EE83 /* PageGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */; };
 		9302B0BF0D79F82C00C7EE83 /* PageGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -12061,6 +12062,7 @@
 		9001773F12E0347800648462 /* OESStandardDerivatives.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESStandardDerivatives.idl; sourceTree = "<group>"; };
 		9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESStandardDerivatives.cpp; sourceTree = "<group>"; };
 		9001787F12E0370700648462 /* JSOESStandardDerivatives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESStandardDerivatives.h; sourceTree = "<group>"; };
+		91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecordingSwizzleTypes.h; sourceTree = "<group>"; };
 		91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AXTextStateChangeIntent.h; sourceTree = "<group>"; };
 		9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroup.cpp; sourceTree = "<group>"; };
 		9302B0BE0D79F82C00C7EE83 /* PageGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroup.h; sourceTree = "<group>"; };
@@ -17530,6 +17532,7 @@
 				F382088D147D35F90010BC06 /* PageRuntimeAgent.h */,
 				A5F36D3818F758720054C024 /* PageScriptDebugServer.cpp */,
 				A5F36D3918F758720054C024 /* PageScriptDebugServer.h */,
+				91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */,
 				7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
 				7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
 				A56C5B98189F34570082D13C /* WebConsoleAgent.cpp */,
@@ -29542,6 +29545,7 @@
 				4A4F65741AA997F100E38CDD /* RealtimeMediaSourceSettings.h in Headers */,
 				07C1C0E51BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h in Headers */,
 				41103AAC1E39791000769F03 /* RealtimeOutgoingAudioSource.h in Headers */,
+				91B952241F58A58F00931DC2 /* RecordingSwizzleTypes.h in Headers */,
 				BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
 				FD45A958175D414C00C21EC8 /* RectangleShape.h in Headers */,
 				9831AE4A154225C900FE2644 /* ReferrerPolicy.h in Headers */,
diff --git a/Source/WebCore/bindings/js/CallTracerTypes.h b/Source/WebCore/bindings/js/CallTracerTypes.h
index 69cea6f..dc667c5 100644
--- a/Source/WebCore/bindings/js/CallTracerTypes.h
+++ b/Source/WebCore/bindings/js/CallTracerTypes.h
@@ -57,7 +57,6 @@
 namespace WebCore {
 
 typedef Variant<
-    ImageSmoothingQuality,
     CanvasDirection,
     CanvasFillRule,
     CanvasLineCap,
@@ -65,10 +64,11 @@
     CanvasTextAlign,
     CanvasTextBaseline,
     DOMMatrix2DInit,
-    Path2D*,
     Element*,
     HTMLImageElement*,
     ImageData*,
+    ImageSmoothingQuality,
+    Path2D*,
 #if ENABLE(WEBGL)
     WebGLBuffer*,
     WebGLFramebuffer*,
diff --git a/Source/WebCore/inspector/InspectorCanvas.cpp b/Source/WebCore/inspector/InspectorCanvas.cpp
index 738be4e..2b62611 100644
--- a/Source/WebCore/inspector/InspectorCanvas.cpp
+++ b/Source/WebCore/inspector/InspectorCanvas.cpp
@@ -54,6 +54,7 @@
 #include "JSMainThreadExecState.h"
 #include "Path2D.h"
 #include "Pattern.h"
+#include "RecordingSwizzleTypes.h"
 #include "SVGPathUtilities.h"
 #include "StringAdaptors.h"
 #if ENABLE(WEBGL)
@@ -376,10 +377,11 @@
     return array;
 }
 
-static RefPtr<Inspector::Protocol::Array<double>> buildArrayForVector(const Vector<float>& vector)
+template <typename T>
+static RefPtr<Inspector::Protocol::Array<InspectorValue>> buildArrayForVector(const Vector<T>& vector)
 {
-    RefPtr<Inspector::Protocol::Array<double>> array = Inspector::Protocol::Array<double>::create();
-    for (double item : vector)
+    RefPtr<Inspector::Protocol::Array<InspectorValue>> array = Inspector::Protocol::Array<InspectorValue>::create();
+    for (auto& item : vector)
         array->addItem(item);
     return array;
 }
@@ -482,29 +484,21 @@
     action->addItem(indexForData(name));
 
     RefPtr<Inspector::Protocol::Array<InspectorValue>> parametersData = Inspector::Protocol::Array<Inspector::InspectorValue>::create();
+    RefPtr<Inspector::Protocol::Array<int>> swizzleTypes = Inspector::Protocol::Array<int>::create();
+
+    auto addParameter = [&parametersData, &swizzleTypes] (auto value, RecordingSwizzleTypes swizzleType) {
+        parametersData->addItem(value);
+        swizzleTypes->addItem(static_cast<int>(swizzleType));
+    };
+
     for (RecordCanvasActionVariant& item : parameters) {
         WTF::switchOn(item,
-            [&] (CanvasFillRule value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
-            [&] (ImageSmoothingQuality value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
-            [&] (CanvasDirection value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
-            [&] (CanvasLineCap value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
-            [&] (CanvasLineJoin value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
-            [&] (CanvasTextAlign value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
-            [&] (CanvasTextBaseline value) {
-                parametersData->addItem(indexForData(convertEnumerationToString(value)));
-            },
+            [&] (CanvasDirection value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
+            [&] (CanvasFillRule value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
+            [&] (CanvasLineCap value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
+            [&] (CanvasLineJoin value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
+            [&] (CanvasTextAlign value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
+            [&] (CanvasTextBaseline value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
             [&] (const DOMMatrix2DInit& value) {
                 RefPtr<Inspector::Protocol::Array<double>> array = Inspector::Protocol::Array<double>::create();
                 array->addItem(value.a.value_or(1));
@@ -513,53 +507,54 @@
                 array->addItem(value.d.value_or(1));
                 array->addItem(value.e.value_or(0));
                 array->addItem(value.f.value_or(0));
-                parametersData->addItem(WTFMove(array));
-            },
-            [&] (const Path2D* value) {
-                parametersData->addItem(indexForData(buildStringFromPath(value->path())));
+                addParameter(WTFMove(array), RecordingSwizzleTypes::DOMMatrix);
             },
             [&] (const Element*) {
                 // Elements are not serializable, so add a string as a placeholder since the actual
                 // element cannot be reconstructed in the frontend.
-                parametersData->addItem(indexForData(String("element")));
+                addParameter(0, RecordingSwizzleTypes::None);
             },
-            [&] (HTMLImageElement* value) { parametersData->addItem(indexForData(value)); },
-            [&] (ImageData* value) { parametersData->addItem(indexForData(value)); },
+            [&] (HTMLImageElement* value) { addParameter(indexForData(value), RecordingSwizzleTypes::Image); },
+            [&] (ImageData* value) { addParameter(indexForData(value), RecordingSwizzleTypes::ImageData); },
+            [&] (ImageSmoothingQuality value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); },
+            [&] (const Path2D* value) { addParameter(indexForData(buildStringFromPath(value->path())), RecordingSwizzleTypes::Path2D); },
 #if ENABLE(WEBGL)
             // FIXME: <https://webkit.org/b/176009> Web Inspector: send data for WebGL objects during a recording instead of a placeholder string
-            [&] (const WebGLBuffer*) { parametersData->addItem(indexForData(String("WebGLBuffer"))); },
-            [&] (const WebGLFramebuffer*) { parametersData->addItem(indexForData(String("WebGLFramebuffer"))); },
-            [&] (const WebGLProgram*) { parametersData->addItem(indexForData(String("WebGLProgram"))); },
-            [&] (const WebGLRenderbuffer*) { parametersData->addItem(indexForData(String("WebGLRenderbuffer"))); },
-            [&] (const WebGLShader*) { parametersData->addItem(indexForData(String("WebGLShader"))); },
-            [&] (const WebGLTexture*) { parametersData->addItem(indexForData(String("WebGLTexture"))); },
-            [&] (const WebGLUniformLocation*) { parametersData->addItem(indexForData(String("WebGLUniformLocation"))); },
+            [&] (const WebGLBuffer*) { addParameter(0, RecordingSwizzleTypes::WebGLBuffer); },
+            [&] (const WebGLFramebuffer*) { addParameter(0, RecordingSwizzleTypes::WebGLFramebuffer); },
+            [&] (const WebGLProgram*) { addParameter(0, RecordingSwizzleTypes::WebGLProgram); },
+            [&] (const WebGLRenderbuffer*) { addParameter(0, RecordingSwizzleTypes::WebGLRenderbuffer); },
+            [&] (const WebGLShader*) { addParameter(0, RecordingSwizzleTypes::WebGLShader); },
+            [&] (const WebGLTexture*) { addParameter(0, RecordingSwizzleTypes::WebGLTexture); },
+            [&] (const WebGLUniformLocation*) { addParameter(0, RecordingSwizzleTypes::WebGLUniformLocation); },
 #endif
-            [&] (const RefPtr<ArrayBuffer>&) { parametersData->addItem(indexForData("BufferDataSource")); },
-            [&] (const RefPtr<ArrayBufferView>&) { parametersData->addItem(indexForData("BufferDataSource")); },
-            [&] (const RefPtr<CanvasGradient>& value) { parametersData->addItem(indexForData(value.get())); },
-            [&] (const RefPtr<CanvasPattern>& value) { parametersData->addItem(indexForData(value.get())); },
-            [&] (const RefPtr<Float32Array>&) { parametersData->addItem(indexForData("Float32List")); },
-            [&] (RefPtr<HTMLCanvasElement>& value) { parametersData->addItem(indexForData(value.get())); },
-            [&] (const RefPtr<HTMLImageElement>& value) { parametersData->addItem(indexForData(value.get())); },
+            [&] (const RefPtr<ArrayBuffer>&) { addParameter(0, RecordingSwizzleTypes::TypedArray); },
+            [&] (const RefPtr<ArrayBufferView>&) { addParameter(0, RecordingSwizzleTypes::TypedArray); },
+            [&] (const RefPtr<CanvasGradient>& value) { addParameter(indexForData(value.get()), RecordingSwizzleTypes::CanvasGradient); },
+            [&] (const RefPtr<CanvasPattern>& value) { addParameter(indexForData(value.get()), RecordingSwizzleTypes::CanvasPattern); },
+            [&] (const RefPtr<Float32Array>&) { addParameter(0, RecordingSwizzleTypes::TypedArray); },
+            [&] (RefPtr<HTMLCanvasElement>& value) { addParameter(indexForData(value.get()), RecordingSwizzleTypes::Image); },
+            [&] (const RefPtr<HTMLImageElement>& value) { addParameter(indexForData(value.get()), RecordingSwizzleTypes::Image); },
 #if ENABLE(VIDEO)
-            [&] (RefPtr<HTMLVideoElement>& value) { parametersData->addItem(indexForData(value.get())); },
+            [&] (RefPtr<HTMLVideoElement>& value) { addParameter(indexForData(value.get()), RecordingSwizzleTypes::Image); },
 #endif
-            [&] (const RefPtr<ImageData>& value) { parametersData->addItem(indexForData(value.get())); },
-            [&] (const RefPtr<Int32Array>&) { parametersData->addItem(indexForData("Int32List")); },
-            [&] (const Vector<float>& value) { parametersData->addItem(buildArrayForVector(value)); },
-            [&] (const Vector<int>&) { parametersData->addItem(indexForData("Int32List")); },
-            [&] (const String& value) { parametersData->addItem(indexForData(value)); },
-            [&] (double value) { parametersData->addItem(value); },
-            [&] (float value) { parametersData->addItem(value); },
-            [&] (int64_t value) { parametersData->addItem(static_cast<double>(value)); },
-            [&] (uint32_t value) { parametersData->addItem(static_cast<double>(value)); },
-            [&] (int32_t value) { parametersData->addItem(value); },
-            [&] (uint8_t value) { parametersData->addItem(static_cast<int>(value)); },
-            [&] (bool value) { parametersData->addItem(value); }
+            [&] (const RefPtr<ImageData>& value) { addParameter(indexForData(value.get()), RecordingSwizzleTypes::ImageData); },
+            [&] (const RefPtr<Int32Array>&) { addParameter(0, RecordingSwizzleTypes::TypedArray); },
+            [&] (const Vector<float>& value) { addParameter(buildArrayForVector(value), RecordingSwizzleTypes::Array); },
+            [&] (const Vector<int>& value) { addParameter(buildArrayForVector(value), RecordingSwizzleTypes::Array); },
+            [&] (const String& value) { addParameter(indexForData(value), RecordingSwizzleTypes::String); },
+            [&] (double value) { addParameter(value, RecordingSwizzleTypes::Number); },
+            [&] (float value) { addParameter(value, RecordingSwizzleTypes::Number); },
+            [&] (int64_t value) { addParameter(static_cast<double>(value), RecordingSwizzleTypes::Number); },
+            [&] (uint32_t value) { addParameter(static_cast<double>(value), RecordingSwizzleTypes::Number); },
+            [&] (int32_t value) { addParameter(value, RecordingSwizzleTypes::Number); },
+            [&] (uint8_t value) { addParameter(static_cast<int>(value), RecordingSwizzleTypes::Number); },
+            [&] (bool value) { addParameter(value, RecordingSwizzleTypes::Boolean); }
         );
     }
+
     action->addItem(WTFMove(parametersData));
+    action->addItem(WTFMove(swizzleTypes));
 
     RefPtr<Inspector::Protocol::Array<double>> trace = Inspector::Protocol::Array<double>::create();
     if (JSC::CallFrame* callFrame = JSMainThreadExecState::currentState()->vm().topCallFrame) {
diff --git a/Source/WebCore/inspector/RecordingSwizzleTypes.h b/Source/WebCore/inspector/RecordingSwizzleTypes.h
new file mode 100644
index 0000000..10ffc86
--- /dev/null
+++ b/Source/WebCore/inspector/RecordingSwizzleTypes.h
@@ -0,0 +1,53 @@
+/*
+ * 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. ``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
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+// Keep this in sync with WI.Recording.Swizzle.
+enum class RecordingSwizzleTypes : int {
+    None = 0,
+    Number = 1,
+    Boolean = 2,
+    String = 3,
+    Array = 4,
+    TypedArray = 5,
+    Image = 6,
+    ImageData = 7,
+    DOMMatrix = 8,
+    Path2D = 9,
+    CanvasGradient = 10,
+    CanvasPattern = 11,
+    WebGLBuffer = 12,
+    WebGLFramebuffer = 13,
+    WebGLRenderbuffer = 14,
+    WebGLTexture = 15,
+    WebGLShader = 16,
+    WebGLProgram = 17,
+    WebGLUniformLocation = 18,
+};
+
+} // namespace WebCore
diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog
index a35a05c..188d717 100644
--- a/Source/WebInspectorUI/ChangeLog
+++ b/Source/WebInspectorUI/ChangeLog
@@ -1,3 +1,39 @@
+2017-09-06  Devin Rousso  <webkit@devinrousso.com>
+
+        Web Inspector: Support overloaded CanvasRenderingContext2D actions with identical parameter counts
+        https://bugs.webkit.org/show_bug.cgi?id=176178
+        <rdar://problem/34192229>
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Models/Recording.js:
+        (WI.Recording.displayNameForSwizzleType):
+        (WI.Recording.prototype.swizzle):
+        Replace WI.Recording.Swizzle with an object of swizzle type keys to int values. This object
+        matches the values in WebCore::RecordingSwizzleTypes.h.
+
+        * UserInterface/Models/RecordingAction.js:
+        (WI.RecordingAction):
+        (WI.RecordingAction.fromPayload):
+        (WI.RecordingAction.prototype.get swizzleTypes):
+        (WI.RecordingAction.prototype.swizzle):
+        (WI.RecordingAction.prototype.toJSON):
+        (WI.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex): Deleted.
+        Replace WI.RecordingAction._parameterSwizzleTypeForTypeAtIndex with an array of parameter
+        types sent in the payload. This gives more control over the swizzling to the JSON, but also
+        simplifies the way we regenerate the data in the frontend.
+
+        * UserInterface/Views/RecordingActionTreeElement.js:
+        (WI.RecordingActionTreeElement._generateDOM):
+
+        * UserInterface/Views/RecordingContentView.js:
+        (WI.RecordingContentView.prototype._generateContentCanvas2D):
+        (WI.RecordingContentView.prototype._applyAction):
+
+        * UserInterface/Views/RecordingNavigationSidebarPanel.css:
+        (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid)):
+        (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,): Deleted.
+
 2017-09-06  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: ⌘E and ⌘G do not work in main content area when quick console drawer is open
diff --git a/Source/WebInspectorUI/UserInterface/Models/Recording.js b/Source/WebInspectorUI/UserInterface/Models/Recording.js
index 61397ae..52b1ed7 100644
--- a/Source/WebInspectorUI/UserInterface/Models/Recording.js
+++ b/Source/WebInspectorUI/UserInterface/Models/Recording.js
@@ -102,6 +102,53 @@
         return new WI.Recording(payload.version, type, payload.initialState, frames, payload.data);
     }
 
+    static displayNameForSwizzleType(swizzleType)
+    {
+        switch (swizzleType) {
+        case WI.Recording.Swizzle.None:
+            return WI.unlocalizedString("None");
+        case WI.Recording.Swizzle.Number:
+            return WI.unlocalizedString("Number");
+        case WI.Recording.Swizzle.Boolean:
+            return WI.unlocalizedString("Boolean");
+        case WI.Recording.Swizzle.String:
+            return WI.unlocalizedString("String");
+        case WI.Recording.Swizzle.Array:
+            return WI.unlocalizedString("Array");
+        case WI.Recording.Swizzle.TypedArray:
+            return WI.unlocalizedString("TypedArray");
+        case WI.Recording.Swizzle.Image:
+            return WI.unlocalizedString("Image");
+        case WI.Recording.Swizzle.ImageData:
+            return WI.unlocalizedString("ImageData");
+        case WI.Recording.Swizzle.DOMMatrix:
+            return WI.unlocalizedString("DOMMatrix");
+        case WI.Recording.Swizzle.Path2D:
+            return WI.unlocalizedString("Path2D");
+        case WI.Recording.Swizzle.CanvasGradient:
+            return WI.unlocalizedString("CanvasGradient");
+        case WI.Recording.Swizzle.CanvasPattern:
+            return WI.unlocalizedString("CanvasPattern");
+        case WI.Recording.Swizzle.WebGLBuffer:
+            return WI.unlocalizedString("WebGLBuffer");
+        case WI.Recording.Swizzle.WebGLFramebuffer:
+            return WI.unlocalizedString("WebGLFramebuffer");
+        case WI.Recording.Swizzle.WebGLRenderbuffer:
+            return WI.unlocalizedString("WebGLRenderbuffer");
+        case WI.Recording.Swizzle.WebGLTexture:
+            return WI.unlocalizedString("WebGLTexture");
+        case WI.Recording.Swizzle.WebGLShader:
+            return WI.unlocalizedString("WebGLShader");
+        case WI.Recording.Swizzle.WebGLProgram:
+            return WI.unlocalizedString("WebGLProgram");
+        case WI.Recording.Swizzle.WebGLUniformLocation:
+            return WI.unlocalizedString("WebGLUniformLocation");
+        default:
+            console.error("Unknown swizzle type", swizzleType);
+            return null;
+        }
+    }
+
     static synthesizeError(message)
     {
         const target = WI.mainTarget;
@@ -130,76 +177,73 @@
         if (typeof this._swizzle[index] !== "object")
             this._swizzle[index] = {};
 
+        if (type === WI.Recording.Swizzle.Number)
+            return parseFloat(index);
+
+        if (type === WI.Recording.Swizzle.Boolean)
+            return !!index;
+
+        if (type === WI.Recording.Swizzle.Array)
+            return Array.isArray(index) ? index : [];
+
+        if (type === WI.Recording.Swizzle.DOMMatrix)
+            return new DOMMatrix(index);
+
         if (!(type in this._swizzle[index])) {
             try {
                 let data = this._data[index];
                 switch (type) {
-                case WI.Recording.Swizzle.Array:
-                    if (Array.isArray(data))
-                        this._swizzle[index][type] = data;
+                case WI.Recording.Swizzle.None:
+                    this._swizzle[index][type] = data;
                     break;
-                case WI.Recording.Swizzle.CanvasStyle:
-                    if (Array.isArray(data)) {
-                        let context = document.createElement("canvas").getContext("2d");
 
-                        let canvasStyle = this.swizzle(data[0], WI.Recording.Swizzle.String);
-                        if (canvasStyle === "linear-gradient" || canvasStyle === "radial-gradient") {
-                            this._swizzle[index][type] = canvasStyle === "radial-gradient" ? context.createRadialGradient(...data[1]) : context.createLinearGradient(...data[1]);
-                            for (let stop of data[2]) {
-                                let color = this.swizzle(stop[1], WI.Recording.Swizzle.String);
-                                this._swizzle[index][type].addColorStop(stop[0], color);
-                            }
-                        } else if (canvasStyle === "pattern") {
-                            let image = this.swizzle(data[1], WI.Recording.Swizzle.Image);
-                            let repeat = this.swizzle(data[2], WI.Recording.Swizzle.String);
-                            this._swizzle[index][type] = context.createPattern(image, repeat);
-                        }
-                    } else if (typeof data === "string")
-                        this._swizzle[index][type] = data;
+                case WI.Recording.Swizzle.String:
+                    this._swizzle[index][type] = String(data);
                     break;
-                case WI.Recording.Swizzle.Element:
-                    this._swizzle[index][type] = WI.Recording.Swizzle.Invalid;
-                    break;
+
                 case WI.Recording.Swizzle.Image:
                     this._swizzle[index][type] = new Image;
                     this._swizzle[index][type].src = data;
                     break;
+
                 case WI.Recording.Swizzle.ImageData:
                     this._swizzle[index][type] = new ImageData(new Uint8ClampedArray(data[0]), parseInt(data[1]), parseInt(data[2]));
                     break;
+
                 case WI.Recording.Swizzle.Path2D:
                     this._swizzle[index][type] = new Path2D(data);
                     break;
+
+                case WI.Recording.Swizzle.CanvasGradient:
+                    var context = document.createElement("canvas").getContext("2d");
+                    var gradientType = this.swizzle(data[0], WI.Recording.Swizzle.String);
+                    this._swizzle[index][type] = gradientType === "radial-gradient" ? context.createRadialGradient(...data[1]) : context.createLinearGradient(...data[1]);
+                    for (let stop of data[2]) {
+                        let color = this.swizzle(stop[1], WI.Recording.Swizzle.String);
+                        this._swizzle[index][type].addColorStop(stop[0], color);
+                    }
+                    break;
+
+                case WI.Recording.Swizzle.CanvasPattern:
+                    var context = document.createElement("canvas").getContext("2d");
+                    var image = this.swizzle(data[1], WI.Recording.Swizzle.Image);
+                    var repeat = this.swizzle(data[2], WI.Recording.Swizzle.String);
+                    this._swizzle[index][type] = context.createPattern(image, repeat);
+                    break;
+
                 // FIXME: <https://webkit.org/b/176009> Web Inspector: send data for WebGL objects during a recording instead of a placeholder string
-                case WI.Recording.Swizzle.ArrayBufferView:
-                case WI.Recording.Swizzle.BufferDataSource:
-                case WI.Recording.Swizzle.Float32List:
-                case WI.Recording.Swizzle.Int32List:
+                case WI.Recording.Swizzle.TypedArray:
                 case WI.Recording.Swizzle.WebGLBuffer:
                 case WI.Recording.Swizzle.WebGLFramebuffer:
-                case WI.Recording.Swizzle.WebGLProgram:
                 case WI.Recording.Swizzle.WebGLRenderbuffer:
-                case WI.Recording.Swizzle.WebGLShader:
                 case WI.Recording.Swizzle.WebGLTexture:
+                case WI.Recording.Swizzle.WebGLShader:
+                case WI.Recording.Swizzle.WebGLProgram:
                 case WI.Recording.Swizzle.WebGLUniformLocation:
-                case WI.Recording.Swizzle.String:
-                    if (typeof data === "string")
-                        this._swizzle[index][type] = data;
-                    break;
-                case WI.Recording.Swizzle.TexImageSource:
-                    if (typeof data === "string") {
-                        this._swizzle[index][type] = new Image;
-                        this._swizzle[index][type].src = data;
-                    } else if (Array.isArray(data))
-                        this._swizzle[index][type] = new ImageData(new Uint8ClampedArray(data[0]), parseInt(data[1]), parseInt(data[2]));
+                    this._swizzle[index][type] = String(data);
                     break;
                 }
-            } catch (e) {
-                this._swizzle[index][type] = WI.Recording.Swizzle.Invalid;
-            }
-
-            if (!(type in this._swizzle[index]))
-                this._swizzle[index][type] = WI.Recording.Swizzle.Invalid;
+            } catch { }
         }
 
         return this._swizzle[index][type];
@@ -230,25 +274,25 @@
     CanvasWebGL: "canvas-webgl",
 };
 
+// Keep this in sync with WebCore::RecordingSwizzleTypes.
 WI.Recording.Swizzle = {
-    Array: "Array",
-    ArrayBufferView: "ArrayBufferView",
-    BufferDataSource: "BufferDataSource",
-    CanvasStyle: "CanvasStyle",
-    Element: "Element",
-    Float32List: "Float32List",
-    Image: "Image",
-    ImageData: "ImageData",
-    Int32List: "Int32List",
-    Path2D: "Path2D",
-    String: "String",
-    TexImageSource: "TexImageSource",
-    WebGLBuffer: "WebGLBuffer",
-    WebGLFramebuffer: "WebGLFramebuffer",
-    WebGLProgram: "WebGLProgram",
-    WebGLRenderbuffer: "WebGLRenderbuffer",
-    WebGLShader: "WebGLShader",
-    WebGLTexture: "WebGLTexture",
-    WebGLUniformLocation: "WebGLUniformLocation",
-    Invalid: Symbol("invalid"),
+    None: 0,
+    Number: 1,
+    Boolean: 2,
+    String: 3,
+    Array: 4,
+    TypedArray: 5,
+    Image: 6,
+    ImageData: 7,
+    DOMMatrix: 8,
+    Path2D: 9,
+    CanvasGradient: 10,
+    CanvasPattern: 11,
+    WebGLBuffer: 12,
+    WebGLFramebuffer: 13,
+    WebGLRenderbuffer: 14,
+    WebGLTexture: 15,
+    WebGLShader: 16,
+    WebGLProgram: 17,
+    WebGLUniformLocation: 18,
 };
diff --git a/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js b/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js
index 41dce92..170f578 100644
--- a/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js
+++ b/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js
@@ -25,10 +25,11 @@
 
 WI.RecordingAction = class RecordingAction
 {
-    constructor(name, parameters, trace, snapshot)
+    constructor(name, parameters, swizzleTypes, trace, snapshot)
     {
         this._payloadName = name;
         this._payloadParameters = parameters;
+        this._payloadSwizzleTypes = swizzleTypes;
         this._payloadTrace = trace;
         this._payloadSnapshot = snapshot || -1;
 
@@ -47,7 +48,7 @@
 
     // Static
 
-    // Payload format: [name, parameters, trace, [snapshot]]
+    // Payload format: [name, parameters, swizzleTypes, trace, [snapshot]]
     static fromPayload(payload)
     {
         if (!Array.isArray(payload))
@@ -62,8 +63,11 @@
         if (!Array.isArray(payload[2]))
             payload[2] = [];
 
-        if (payload.length >= 4 && isNaN(payload[3]))
-            payload[3] = -1;
+        if (!Array.isArray(payload[3]))
+            payload[3] = [];
+
+        if (payload.length >= 5 && isNaN(payload[4]))
+            payload[4] = -1;
 
         return new WI.RecordingAction(...payload);
     }
@@ -81,6 +85,7 @@
 
     get name() { return this._name; }
     get parameters() { return this._parameters; }
+    get swizzleTypes() { return this._payloadSwizzleTypes; }
     get trace() { return this._trace; }
     get snapshot() { return this._snapshot; }
 
@@ -97,20 +102,16 @@
         this._name = recording.swizzle(this._payloadName, WI.Recording.Swizzle.String);
 
         this._parameters = this._payloadParameters.map((item, i) => {
-            let type = this.parameterSwizzleTypeForTypeAtIndex(recording.type, i);
-            if (!type)
-                return item;
-
-            let swizzled = recording.swizzle(item, type);
-            if (swizzled === WI.Recording.Swizzle.Invalid)
+            let swizzledItem = recording.swizzle(item, this._payloadSwizzleTypes[i]);
+            if (this._payloadSwizzleTypes[i] === WI.Recording.Swizzle.None || swizzledItem === undefined)
                 this._valid = false;
 
-            return swizzled;
+            return swizzledItem;
         });
 
         for (let item of this._payloadTrace) {
             try {
-                let array = recording.swizzle(item, WI.Recording.Swizzle.Array);
+                let array = recording.swizzle(item, WI.Recording.Swizzle.None);
                 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),
@@ -139,394 +140,15 @@
         }
     }
 
-    parameterSwizzleTypeForTypeAtIndex(type, index)
-    {
-        let functionNames = WI.RecordingAction._parameterSwizzleTypeForTypeAtIndex[type];
-        if (!functionNames)
-            return null;
-
-        let parameterLengths = functionNames[this._name];
-        if (!parameterLengths)
-            return null;
-
-        let argumentSwizzleTypes = parameterLengths[this._payloadParameters.length];
-        if (!argumentSwizzleTypes)
-            return null;
-
-        return argumentSwizzleTypes[index] || null;
-    }
-
     toJSON()
     {
-        let json = [this._payloadName, this._payloadParameters, this._payloadTrace];
+        let json = [this._payloadName, this._payloadParameters, this._payloadSwizzleTypes, this._payloadTrace];
         if (this._payloadSnapshot >= 0)
             json.push(this._payloadSnapshot);
         return json;
     }
 };
 
-// This object instructs the frontend as to how to reconstruct deduplicated objects found in the
-// "data" section of a recording payload. It will only swizzle values if they are of the expected
-// type in the right index of the version of the action (determined by the number of parameters) for
-// the recording type. Since a recording can be created by importing a JSON file, this is used to
-// make sure that inputs are only considered valid if they conform to the structure defined below.
-// 
-// For Example:
-//
-// IDL:
-//
-//     void foo(optional DOMString s = "bar");
-//     void foo(DOMPath path, optional DOMString s = "bar");
-//     void foo(float a, float b, float c, float d);
-//
-// Swizzle Entries:
-//
-//     - For the 1 parameter version, the parameter at index 0 needs to be swizzled as a string
-//     - For the 2 parameter version, the parameters need to be swizzled as a Path and String
-//     - For the 4 parameter version, numbers don't need to be swizzled, so it is not included
-//
-//     "foo": {
-//         1: {0: String}
-//         2: {0: Path2D, 1: String}
-//     }
-
-{
-    let {
-        ArrayBufferView,
-        BufferDataSource,
-        CanvasStyle,
-        Element,
-        Float32List,
-        Image,
-        ImageData,
-        Int32List,
-        Path2D,
-        String,
-        TexImageSource,
-        WebGLBuffer,
-        WebGLFramebuffer,
-        WebGLProgram,
-        WebGLRenderbuffer,
-        WebGLShader,
-        WebGLTexture,
-        WebGLUniformLocation,
-    } = WI.Recording.Swizzle;
-
-    WI.RecordingAction._parameterSwizzleTypeForTypeAtIndex = {
-        [WI.Recording.Type.Canvas2D]: {
-            "clip": {
-                1: {0: String},
-                2: {0: Path2D, 1: String},
-            },
-            "createImageData": {
-                1: {0: ImageData},
-            },
-            "createPattern": {
-                2: {0: Image, 1: String},
-            },
-            "direction": {
-                1: {0: String},
-            },
-            "drawImage": {
-                3: {0: Image},
-                5: {0: Image},
-                9: {0: Image},
-            },
-            "drawImageFromRect": {
-                10: {0: Image, 9: String},
-            },
-            "drawFocusIfNeeded": {
-                1: {0: Element},
-                2: {0: Path2D, 1: Element},
-            },
-            "fill": {
-                1: {0: String},
-                2: {0: Path2D, 1: String},
-            },
-            "fillStyle": {
-                1: {0: CanvasStyle},
-            },
-            "fillText": {
-                3: {0: String},
-                4: {0: String},
-            },
-            "font": {
-                1: {0: String},
-            },
-            "globalCompositeOperation": {
-                1: {0: String},
-            },
-            "imageSmoothingQuality": {
-                1: {0: String},
-            },
-            "isPointInPath": {
-                4: {0: Path2D, 3: String},
-            },
-            "isPointInStroke": {
-                3: {0: Path2D, 3: String},
-            },
-            "lineCap": {
-                1: {0: String},
-            },
-            "lineJoin": {
-                1: {0: String},
-            },
-            "measureText": {
-                1: {0: String},
-            },
-            "putImageData": {
-                3: {0: ImageData},
-                7: {0: ImageData},
-            },
-            "setCompositeOperation": {
-                1: {0: String},
-            },
-            "setFillColor": {
-                1: {0: String},
-                2: {0: String},
-            },
-            "setLineCap": {
-                1: {0: String},
-            },
-            "setLineJoin": {
-                1: {0: String},
-            },
-            "setShadow": {
-                4: {3: String},
-                5: {3: String},
-            },
-            "setStrokeColor": {
-                1: {0: String},
-                2: {0: String},
-            },
-            "shadowColor": {
-                1: {0: String},
-            },
-            "stroke": {
-                1: {0: Path2D},
-            },
-            "strokeStyle": {
-                1: {0: CanvasStyle},
-            },
-            "strokeText": {
-                3: {0: String},
-                4: {0: String},
-            },
-            "textAlign": {
-                1: {0: String},
-            },
-            "textBaseline": {
-                1: {0: String},
-            },
-            "webkitPutImageData": {
-                3: {0: ImageData},
-                7: {0: ImageData},
-            },
-        },
-        [WI.Recording.Type.CanvasWebGL]: {
-            "attachShader": {
-                1: {0: WebGLProgram},
-                2: {0: WebGLProgram, 1: WebGLShader},
-            },
-            "bindAttribLocation": {
-                1: {0: WebGLProgram},
-                2: {0: WebGLProgram},
-                3: {0: WebGLProgram, 2: String},
-            },
-            "bindBuffer": {
-                2: {1: WebGLBuffer},
-            },
-            "bindFramebuffer": {
-                2: {1: WebGLFramebuffer},
-            },
-            "bindRenderbuffer": {
-                2: {1: WebGLRenderbuffer},
-            },
-            "bindTexture": {
-                2: {1: WebGLTexture},
-            },
-            "bufferData": {
-                3: {1: BufferDataSource},
-            },
-            "bufferSubData": {
-                3: {2: BufferDataSource},
-            },
-            "compileShader": {
-                1: {0: WebGLShader},
-            },
-            "compressedTexImage2D": {
-                7: {6: ArrayBufferView},
-            },
-            "compressedTexSubImage2D": {
-                8: {7: ArrayBufferView},
-            },
-            "deleteBuffer": {
-                1: {0: WebGLBuffer},
-            },
-            "deleteFramebuffer": {
-                1: {0: WebGLFramebuffer},
-            },
-            "deleteProgram": {
-                1: {0: WebGLProgram},
-            },
-            "deleteRenderbuffer": {
-                1: {0: WebGLRenderbuffer},
-            },
-            "deleteShader": {
-                1: {0: WebGLShader},
-            },
-            "deleteTexture": {
-                1: {0: WebGLTexture},
-            },
-            "detachShader": {
-                1: {0: WebGLProgram},
-                2: {0: WebGLProgram, 1: WebGLShader},
-            },
-            "framebufferRenderbuffer": {
-                4: {3: WebGLRenderbuffer},
-            },
-            "framebufferTexture2D": {
-                5: {4: WebGLTexture},
-            },
-            "getActiveAttrib": {
-                2: {0: WebGLProgram},
-            },
-            "getActiveUniform": {
-                2: {0: WebGLProgram},
-            },
-            "getAttachedShaders": {
-                1: {0: WebGLProgram},
-            },
-            "getAttribLocation": {
-                2: {0: WebGLProgram, 1: String},
-            },
-            "getExtension": {
-                1: {0: String},
-            },
-            "getProgramInfoLog": {
-                1: {0: WebGLProgram},
-            },
-            "getProgramParameter": {
-                2: {0: WebGLProgram},
-            },
-            "getShaderInfoLog": {
-                1: {0: WebGLShader},
-            },
-            "getShaderParameter": {
-                2: {0: WebGLShader},
-            },
-            "getShaderSource": {
-                1: {0: WebGLShader},
-            },
-            "getUniform": {
-                1: {0: WebGLProgram},
-                2: {0: WebGLProgram, 1: WebGLUniformLocation},
-            },
-            "getUniformLocation": {
-                2: {0: WebGLProgram, 1: String},
-            },
-            "isBuffer": {
-                1: {0: WebGLBuffer},
-            },
-            "isFramebuffer": {
-                1: {0: WebGLFramebuffer},
-            },
-            "isProgram": {
-                1: {0: WebGLProgram},
-            },
-            "isRenderbuffer": {
-                1: {0: WebGLRenderbuffer},
-            },
-            "isShader": {
-                1: {0: WebGLShader},
-            },
-            "isTexture": {
-                1: {0: WebGLTexture},
-            },
-            "linkProgram": {
-                1: {0: WebGLProgram},
-            },
-            "readPixels": {
-                7: {6: ArrayBufferView},
-            },
-            "shaderSource": {
-                2: {0: WebGLShader, 1: String},
-            },
-            "texImage2D": {
-                6: {5: TexImageSource},
-                9: {8: ArrayBufferView},
-            },
-            "texSubImage2D": {
-                7: {6: TexImageSource},
-                9: {8: ArrayBufferView},
-            },
-            "uniform1f": {
-                2: {0: WebGLUniformLocation},
-            },
-            "uniform1fv": {
-                2: {0: WebGLUniformLocation, 1: Float32List},
-            },
-            "uniform1i": {
-                2: {0: WebGLUniformLocation},
-            },
-            "uniform1iv": {
-                2: {0: WebGLUniformLocation, 1: Int32List},
-            },
-            "uniform2f": {
-                3: {0: WebGLUniformLocation},
-            },
-            "uniform2fv": {
-                2: {0: WebGLUniformLocation, 1: Float32List},
-            },
-            "uniform2i": {
-                3: {0: WebGLUniformLocation},
-            },
-            "uniform2iv": {
-                2: {0: WebGLUniformLocation, 1: Int32List},
-            },
-            "uniform3f": {
-                4: {0: WebGLUniformLocation},
-            },
-            "uniform3fv": {
-                2: {0: WebGLUniformLocation, 1: Float32List},
-            },
-            "uniform3i": {
-                4: {0: WebGLUniformLocation},
-            },
-            "uniform3iv": {
-                2: {0: WebGLUniformLocation, 1: Int32List},
-            },
-            "uniform4f": {
-                5: {0: WebGLUniformLocation},
-            },
-            "uniform4fv": {
-                2: {0: WebGLUniformLocation, 1: Float32List},
-            },
-            "uniform4i": {
-                5: {0: WebGLUniformLocation},
-            },
-            "uniform4iv": {
-                2: {0: WebGLUniformLocation, 1: Int32List},
-            },
-            "uniformMatrix2fv": {
-                3: {0: WebGLUniformLocation, 2: Float32List},
-            },
-            "uniformMatrix3fv": {
-                3: {0: WebGLUniformLocation, 2: Float32List},
-            },
-            "uniformMatrix4fv": {
-                3: {0: WebGLUniformLocation, 2: Float32List},
-            },
-            "useProgram": {
-                1: {0: WebGLProgram},
-            },
-            "validateProgram": {
-                1: {0: WebGLProgram},
-            },
-        },
-    };
-}
-
 WI.RecordingAction._functionNames = {
     [WI.Recording.Type.Canvas2D]: new Set([
         "arc",
diff --git a/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js b/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js
index 3ffae50..5873818 100644
--- a/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js
+++ b/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js
@@ -69,8 +69,6 @@
         nameContainer.textContent = recordingAction.name;
 
         if (!recordingAction.isGetter && !isInitialState) {
-            let hasMissingParameter = false;
-
             if (recordingAction.isFunction) {
                 titleFragment.append("(");
                 copyText += "(";
@@ -81,6 +79,7 @@
 
             for (let i = 0; i < recordingAction.parameters.length; ++i) {
                 let parameter = recordingAction.parameters[i];
+                let swizzleType = recordingAction.swizzleTypes[i];
 
                 if (i) {
                     titleFragment.append(", ");
@@ -90,31 +89,50 @@
                 let parameterElement = titleFragment.appendChild(document.createElement("span"));
                 parameterElement.classList.add("parameter");
 
-                let swizzleType = recordingAction.parameterSwizzleTypeForTypeAtIndex(recordingType, i);
-                if (swizzleType && swizzleType !== WI.Recording.Swizzle.String) {
-                    parameterElement.classList.add("swizzled");
-                    if (parameter === WI.Recording.Swizzle.Invalid) {
-                        parameterElement.classList.add("missing");
-
-                        hasMissingParameter = true;
-                    }
-
-                    if (parameter instanceof CanvasGradient)
-                        parameterElement.textContent = WI.unlocalizedString("Gradient");
-                    else if (parameter instanceof CanvasPattern)
-                        parameterElement.textContent = WI.unlocalizedString("Pattern");
-                    else
-                        parameterElement.textContent = swizzleType;
-
-                    copyText += parameterElement.textContent;
-                } else if (!isNaN(parameter) && parameter !== null) {
+                switch (swizzleType) {
+                case WI.Recording.Swizzle.Number:
                     parameterElement.textContent = parameter.maxDecimals(2);
-                    copyText += parameter;
-                } else {
+                    break;
+
+                case WI.Recording.Swizzle.Boolean:
+                    parameterElement.textContent = parameter;
+                    break;
+
+                case WI.Recording.Swizzle.String:
                     parameterElement.textContent = JSON.stringify(parameter);
-                    copyText += parameterElement.textContent;
+                    break;
+
+                case WI.Recording.Swizzle.Array:
+                    parameterElement.classList.add("swizzled");
+                    parameterElement.textContent = JSON.stringify(parameter);
+                    break;
+
+                case WI.Recording.Swizzle.TypedArray:
+                case WI.Recording.Swizzle.Image:
+                case WI.Recording.Swizzle.ImageData:
+                case WI.Recording.Swizzle.DOMMatrix:
+                case WI.Recording.Swizzle.Path2D:
+                case WI.Recording.Swizzle.CanvasGradient:
+                case WI.Recording.Swizzle.CanvasPattern:
+                case WI.Recording.Swizzle.WebGLBuffer:
+                case WI.Recording.Swizzle.WebGLFramebuffer:
+                case WI.Recording.Swizzle.WebGLRenderbuffer:
+                case WI.Recording.Swizzle.WebGLTexture:
+                case WI.Recording.Swizzle.WebGLShader:
+                case WI.Recording.Swizzle.WebGLProgram:
+                case WI.Recording.Swizzle.WebGLUniformLocation:
+                    parameterElement.classList.add("swizzled");
+                    parameterElement.textContent = WI.Recording.displayNameForSwizzleType(swizzleType);
+                    break;
                 }
 
+                if (!parameterElement.textContent) {
+                    parameterElement.classList.add("invalid");
+                    parameterElement.textContent = swizzleType === WI.Recording.Swizzle.None ? parameter : WI.Recording.displayNameForSwizzleType(swizzleType);
+                }
+
+                copyText += parameterElement.textContent;
+
                 if (!recordingAction.isFunction)
                     break;
             }
@@ -123,9 +141,6 @@
                 titleFragment.append(")");
                 copyText += ")";
             }
-
-            if (hasMissingParameter)
-                classNames.push("missing");
         } else if (isInitialState)
             classNames.push("initial-state");
 
diff --git a/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js b/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
index 919aa53..fab3fd2 100644
--- a/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
+++ b/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
@@ -287,9 +287,20 @@
                     let value = initialState.attributes[key];
 
                     switch (key) {
+                    case "setTransform":
+                        value = [this.representedObject.swizzle(value, WI.Recording.Swizzle.DOMMatrix)];
+                        break;
+
                     case "fillStyle":
                     case "strokeStyle":
-                        value = this.representedObject.swizzle(value, WI.Recording.Swizzle.CanvasStyle);
+                        if (Array.isArray(value)) {
+                            let canvasStyle = this.swizzle(value[0], WI.Recording.Swizzle.String);
+                            if (canvasStyle.includes("gradient"))
+                                value = this.representedObject.swizzle(value, WI.Recording.Swizzle.CanvasGradient);
+                            else if (canvasStyle === "pattern")
+                                value = this.representedObject.swizzle(value, WI.Recording.Swizzle.CanvasPattern);
+                        } else
+                            value = this.representedObject.swizzle(value, WI.Recording.Swizzle.String);
                         break;
 
                     case "direction":
@@ -310,7 +321,7 @@
                         break;
                     }
 
-                    if (value === WI.Recording.Swizzle.Invalid || (Array.isArray(value) && value.includes(WI.Recording.Swizzle.Invalid)))
+                    if (value === undefined || (Array.isArray(value) && value.includes(undefined)))
                         continue;
 
                     snapshot.state[key] = value;
@@ -429,9 +440,6 @@
         if (!action.valid)
             return;
 
-        if (action.parameters.includes(WI.Recording.Swizzle.Invalid))
-            return;
-
         try {
             let name = options.nameOverride || action.name;
             if (action.isFunction)
diff --git a/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.css b/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.css
index 16c84e0..7d2140d 100644
--- a/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.css
+++ b/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.css
@@ -139,7 +139,6 @@
     color: grey;
 }
 
-.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,
-.sidebar > .panel.navigation.recording > .content .action.missing:not(.selected, .initial-state) > .titles .parameter.swizzled.missing {
+.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid) {
     color: red;
 }