Bug 223985

Summary: [Cocoa] REGRESSION(r272999): User-installed fonts no longer work in Mail
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, jonlee, pvollan, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Needs a test
none
Patch
none
Patch none

Description Myles C. Maxfield 2021-03-31 00:06:06 PDT
[Cocoa] REGRESSION(r272999): User-installed fonts no longer work in Mail
Comment 1 Myles C. Maxfield 2021-03-31 00:07:20 PDT
Created attachment 424738 [details]
Needs a test
Comment 2 Myles C. Maxfield 2021-03-31 00:08:05 PDT
<rdar://problem/75975210>
Comment 3 Myles C. Maxfield 2021-03-31 01:11:09 PDT
Created attachment 424743 [details]
Patch
Comment 4 Myles C. Maxfield 2021-03-31 23:08:35 PDT
Created attachment 424873 [details]
Patch
Comment 5 Per Arne Vollan 2021-04-01 10:03:36 PDT
Comment on attachment 424873 [details]
Patch

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

Thanks! R=me.

> Source/WebKit/WebProcess/WebPage/WebPage.h:-2275
> -
> -#if HAVE(STATIC_FONT_REGISTRY)
> -    RefPtr<SandboxExtension> m_fontExtension;
> -#endif

You may also be able to remove the font extension member in WebProcess, since you can consume the extension permanently.
Comment 6 Myles C. Maxfield 2021-04-01 11:14:35 PDT
(In reply to Per Arne Vollan from comment #5)
> Comment on attachment 424873 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424873&action=review
> 
> Thanks! R=me.
> 
> > Source/WebKit/WebProcess/WebPage/WebPage.h:-2275
> > -
> > -#if HAVE(STATIC_FONT_REGISTRY)
> > -    RefPtr<SandboxExtension> m_fontExtension;
> > -#endif
> 
> You may also be able to remove the font extension member in WebProcess,
> since you can consume the extension permanently.

SandboxExtension's destructor actually explicitly makes sure that this doesn't happen.
Comment 7 EWS 2021-04-01 11:50:29 PDT
Committed r275371: <https://commits.webkit.org/r275371>

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