Any `GLenum` argument should come from a constant number defined on `WebGLRenderingContext.prototype`, meaning that we can (and should) show that text instead of the number value. Developers are more likely to know the constant's name rather than its actual numerical value.
Created attachment 350938 [details] Patch
Created attachment 350939 [details] [Image] After Patch is applied I'm not sure how to stylistically differentiate between constant values and swizzled values. Feedback welcome :)
Comment on attachment 350938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350938&action=review r=me > Source/WebInspectorUI/UserInterface/Models/RecordingAction.js:117 > + let prototype = WI.RecordingAction._prototypeForType(type); > + for (let key in prototype) { > + let descriptor = Object.getOwnPropertyDescriptor(prototype, key); > + if (descriptor.value === value) > + return key; > + } Nice! Should we avoid a few keys? For example if we're in a spot with the value zero, there would be multiple options and it seems the first one we come across would be the one returned: NONE: 0 NO_ERROR: 0 POINTS: 0 ZERO: 0 Or maybe we've just limited the constant indexes to a better set that will have useful non-ambugious constants.
Created attachment 351349 [details] Patch
Comment on attachment 351349 [details] Patch Clearing flags on attachment: 351349 Committed r236715: <https://trac.webkit.org/changeset/236715>
All reviewed patches have been landed. Closing bug.
<rdar://problem/44932756>