WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191340
Web Inspector: Fix "Javascript" => "JavaScript" enum in protocol generated objects
https://bugs.webkit.org/show_bug.cgi?id=191340
Summary
Web Inspector: Fix "Javascript" => "JavaScript" enum in protocol generated ob...
Joseph Pecoraro
Reported
2018-11-06 16:55:03 PST
Fix "Javascript" => "JavaScript" enum in protocol generated objects
Attachments
[PATCH] Proposed Fix
(25.21 KB, patch)
2018-11-06 16:57 PST
,
Joseph Pecoraro
mattbaker
: review-
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(25.94 KB, patch)
2018-11-06 19:01 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2018-11-06 16:57:46 PST
Created
attachment 354033
[details]
[PATCH] Proposed Fix
EWS Watchlist
Comment 2
2018-11-06 16:59:29 PST
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)
Matt Baker
Comment 3
2018-11-06 17:46:41 PST
Comment on
attachment 354033
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=354033&action=review
Looks good, except for the issue mentioned.
> Source/WebInspectorUI/UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:70 > +InspectorBackend.registerEnum("Canvas.ContextType", {Canvas2D: "canvas-2d", BitmapRenderer: "bitmaprenderer", WebGL: "webgl", WebGL2: "webgl2", Webgpu: "webgpu"});
The frontend uses CanvasAgent.ContextType.WebGPU. This change causes calls to InspectorCanvasAgent::requestContent to fail with "unsupported canvas context type".
Joseph Pecoraro
Comment 4
2018-11-06 19:01:25 PST
Created
attachment 354049
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 5
2018-11-06 19:01:44 PST
Comment on
attachment 354033
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=354033&action=review
>> Source/WebInspectorUI/UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:70 >> +InspectorBackend.registerEnum("Canvas.ContextType", {Canvas2D: "canvas-2d", BitmapRenderer: "bitmaprenderer", WebGL: "webgl", WebGL2: "webgl2", Webgpu: "webgpu"}); > > The frontend uses CanvasAgent.ContextType.WebGPU. This change causes calls to InspectorCanvasAgent::requestContent to fail with "unsupported canvas context type".
Hmm, a couple things. • This seems to be a pre-existing mistake. Nothing in the frontend used `CanvasAgent.ContextType.Webgpu` only `CanvasAgent.ContextType.WebGPU` so this would be fixing iOS 11 support. • However, WI.Canvas.fromPayload has a mistake (missing `break`) that needs to be fixed! Other than that, this is just changing the enum name, not the protocol string, so it's fine to make this change otherwise. I'll update.
Joseph Pecoraro
Comment 6
2018-11-06 19:02:02 PST
Updated patch.
Devin Rousso
Comment 7
2018-11-06 22:11:15 PST
Comment on
attachment 354049
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=354049&action=review
r=me
> Source/JavaScriptCore/inspector/scripts/codegen/generator.py:45 > +_ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS = set(['2D', 'API', 'CSS', 'DOM', 'HTML', 'JIT', 'XHR', 'XML', 'IOS', 'MacOS', 'JavaScript'])
While we're at it, shouldn't "IOS" be "iOS" and "MacOS" be "macOS"?
Joseph Pecoraro
Comment 8
2018-11-07 11:22:13 PST
(In reply to Devin Rousso from
comment #7
)
> Comment on
attachment 354049
[details]
> [PATCH] Proposed Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=354049&action=review
> > r=me > > > Source/JavaScriptCore/inspector/scripts/codegen/generator.py:45 > > +_ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS = set(['2D', 'API', 'CSS', 'DOM', 'HTML', 'JIT', 'XHR', 'XML', 'IOS', 'MacOS', 'JavaScript']) > > While we're at it, shouldn't "IOS" be "iOS" and "MacOS" be "macOS"?
These would be for enum values. I don't think we'd want those representations since we generally start them with a capital.
WebKit Commit Bot
Comment 9
2018-11-07 11:48:13 PST
Comment on
attachment 354049
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 354049 Committed
r237934
: <
https://trac.webkit.org/changeset/237934
>
WebKit Commit Bot
Comment 10
2018-11-07 11:48:15 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2018-11-07 11:49:22 PST
<
rdar://problem/45884080
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug