Bug 213661 - Web Inspector: Canvas: show an error message if unable to fetch shader source
Summary: Web Inspector: Canvas: show an error message if unable to fetch shader source
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-26 14:52 PDT by Devin Rousso
Modified: 2020-07-07 15:35 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.15 KB, patch)
2020-06-26 14:53 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>