Bug 251906

Summary: Use InvalidStateError if user gesture is missing for getDisplayMedia
Product: WebKit Reporter: beaufort.francois
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: steve.mieskoski+webkit, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   

Description beaufort.francois 2023-02-08 00:58:42 PST
WebKit should raise InvalidStateError, not InvalidAccessError if user gesture is missing for getDisplayMedia according to the spec.


```
If the relevant global object of this does not have transient activation, return a promise rejected with a DOMException object whose name attribute has the value InvalidStateError.
```
From https://www.w3.org/TR/screen-capture/#mediadevices-additions
Comment 1 beaufort.francois 2023-02-08 01:01:10 PST
I believe this should fix it: https://github.com/WebKit/WebKit/compare/main...beaufortfrancois:WebKit:patch-1
Comment 2 youenn fablet 2023-02-08 01:08:12 PST
Thanks Francois,
Do you want to make a PR, or should we take over?
Comment 3 Radar WebKit Bug Importer 2023-02-08 01:08:34 PST
<rdar://problem/105167105>
Comment 4 beaufort.francois 2023-02-08 01:09:52 PST
Please take over ;)
Comment 5 youenn fablet 2024-03-04 10:04:45 PST
Pull request: https://github.com/WebKit/WebKit/pull/25431
Comment 6 EWS 2024-03-05 02:43:35 PST
Committed 275685@main (ab0993157de8): <https://commits.webkit.org/275685@main>

Reviewed commits have been landed. Closing PR #25431 and removing active labels.