Bug 214021

Summary: [macOS] Allow additional IOKit classes for Apple Silicon
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit2Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, pvollan, sam, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Brent Fulgham 2020-07-06 17:17:26 PDT
The WebKit sandbox needs some additional permissions for media playback on Apple Silicon.
Comment 1 Brent Fulgham 2020-07-06 17:17:51 PDT
<rdar://problem/63696732>
Comment 2 Brent Fulgham 2020-07-06 17:19:29 PDT
Created attachment 403642 [details]
Patch
Comment 3 Brent Fulgham 2020-07-06 17:19:48 PDT
Comment on attachment 403642 [details]
Patch

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

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:410
> +        (iokit-property "IOSurfaceAcceleratorCapabilitiesDictâ) ;; <rdar://problem/63696732>

Doh! Smart quote!
Comment 4 Brent Fulgham 2020-07-06 17:20:50 PDT
Created attachment 403643 [details]
Patch
Comment 5 Per Arne Vollan 2020-07-06 17:29:16 PDT
Comment on attachment 403643 [details]
Patch

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

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:670
> +        (iokit-user-client-class "IOSurfaceRootUserClient") ;; rdar://problem/63696732

I think it would be good to add a CPU check to these two classes.
Comment 6 Sam Weinig 2020-07-06 17:56:24 PDT
Comment on attachment 403643 [details]
Patch

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

> Source/WebKit/ChangeLog:3
> +        [macOS] Allow additional UIKit classes for Apple Silicon

These don't look like UIKit classes. Is this the right change?
Comment 7 Brent Fulgham 2020-07-07 09:25:47 PDT
Comment on attachment 403643 [details]
Patch

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

>> Source/WebKit/ChangeLog:3
>> +        [macOS] Allow additional UIKit classes for Apple Silicon
> 
> These don't look like UIKit classes. Is this the right change?

Yeah, I should have written "IOKit classes"

>> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:670
>> +        (iokit-user-client-class "IOSurfaceRootUserClient") ;; rdar://problem/63696732
> 
> I think it would be good to add a CPU check to these two classes.

The diff doesn't show that these are encased in a CPU check for arm64.
Comment 8 Brent Fulgham 2020-07-07 09:27:13 PDT
Created attachment 403698 [details]
Patch
Comment 9 Sam Weinig 2020-07-07 09:45:09 PDT
Comment on attachment 403698 [details]
Patch

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

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:670
> +        (iokit-user-client-class "IOSurfaceAcceleratorClient") ;; rdar://problem/63696732
> +        (iokit-user-client-class "IOSurfaceRootUserClient") ;; rdar://problem/63696732

Inconsistent style here. Above you use angle brackets around the radar. Probably want them to be the same.
Comment 10 Brent Fulgham 2020-07-07 13:33:05 PDT
Created attachment 403718 [details]
Patch for landing
Comment 11 EWS 2020-07-07 15:32:04 PDT
Committed r264042: <https://trac.webkit.org/changeset/264042>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 403718 [details].