Bug 213661

Summary: Web Inspector: Canvas: show an error message if unable to fetch shader source
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, sirisopa6315, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Devin Rousso 2020-06-26 14:52:48 PDT
.
Comment 1 Devin Rousso 2020-06-26 14:53:28 PDT
Created attachment 402908 [details]
Patch
Comment 2 BJ Burg 2020-06-29 10:06:22 PDT
Comment on attachment 402908 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=402908&action=review

> Source/WebInspectorUI/UserInterface/Views/ShaderProgramContentView.js:253
> +        if (!this.didInitialLayout) {

Will this code path ever be taken on subsequent refreshes? If not, how does spinnerContainer get recreated?
Comment 3 Devin Rousso 2020-06-29 10:58:01 PDT
Comment on attachment 402908 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=402908&action=review

>> Source/WebInspectorUI/UserInterface/Views/ShaderProgramContentView.js:253
>> +        if (!this.didInitialLayout) {
> 
> Will this code path ever be taken on subsequent refreshes? If not, how does spinnerContainer get recreated?

No, and that's intentional.  I think it's a somewhat reasonable claim that "if a shader successfully loads once, it'll likely to successfully load again" (and the same is true for the error case).  Yes, it's totally possible for a shader to be destroyed in between two fetches, but I don't think it's gonna be that common.  Because of this, we don't want to recreate the spinner each time we fetch as we'd likely see a brief flash from "old content"->"spinner"->"new content" (which is likely the exact same as "old content").  So we only show the spinner for the first fetch as there was no "old content".
Comment 4 BJ Burg 2020-07-07 14:52:20 PDT
Comment on attachment 402908 [details]
Patch

r=me
Comment 5 EWS 2020-07-07 15:34:44 PDT
Committed r264045: <https://trac.webkit.org/changeset/264045>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402908 [details].
Comment 6 Radar WebKit Bug Importer 2020-07-07 15:35:40 PDT
<rdar://problem/65196517>