Bug 215940

Summary: Web Inspector: Graphics: remove unnecessary main page check when iterating existing animations
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED WONTFIX    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, joepeck, pangle, timothy
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 208493    
Bug Blocks:    
Attachments:
Description Flags
Patch bburg: review-, bburg: commit-queue-

Description Devin Rousso 2020-08-28 11:32:38 PDT
.
Comment 1 Devin Rousso 2020-08-28 11:38:46 PDT
Created attachment 407491 [details]
Patch
Comment 2 BJ Burg 2020-08-28 12:12:02 PDT
Comment on attachment 407491 [details]
Patch

LGTM, but it doesn't build.

Is there a behavior change? Does this mean iframe animations will show in the main page? or that WebAnimation::instances() only returns such animations?
Comment 3 Devin Rousso 2020-08-28 13:19:43 PDT
(In reply to Brian Burg from comment #2)
> Comment on attachment 407491 [details]
> Patch
> 
> LGTM, but it doesn't build.
grumble mumble `-Wunused-private-field` grumble grumble

> Is there a behavior change? Does this mean iframe animations will show in the main page? or that WebAnimation::instances() only returns such animations?
AFAIU this is not a behavior change as subframes share the same `Page` as the main frame.  It's already possible to see `WebAnimation` inside `<iframe>`.  I'll adjust the ChangeLog comment to further clarify that this code indeed basically did nothing.

In fact, it's possible to see `WebSocket` and `<canvas>` too, so I think we can remove those checks as well :)
Comment 4 Devin Rousso 2020-08-28 13:28:42 PDT
I totally forgot that there can be more than one `Page` per WebProcess, so we actually still do need this code.