Summary: | Web Inspector: Canvas: replace constant numbers with their associated name on WebGL contexts | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 175485 | ||||||||||
Attachments: |
|
Description
Devin Rousso
2018-09-26 21:49:35 PDT
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. |