Repository navigation
fix: disable remote layer APIs in MAS build - #20965
Conversation
|
The original issue should be kept open since this PR does not patch (I hope it is not needed since these two are really difficult to get rid of.) |
There was a problem hiding this comment.
Thanks @zcbenz !
The RemoteMacViews are gonna stay for a long time https://bugs.chromium.org/p/chromium/issues/detail?id=859152
https://bugs.chromium.org/p/chromium/issues/detail?id=958255
We should look into the possibility of pushing the remote implementation behind a buildflag in upstream to reduce our patch in future. Thoughts ?
| ] | ||
|
|
||
| + if (is_mas_build) { | ||
| + sources -= [ |
There was a problem hiding this comment.
why are we excluding them here ?
There was a problem hiding this comment.
remote_accessibility_api.mm implements ui::RemoteAccessibility which uses private APIs, excluding it is simpler than commenting out the whole file.
There was a problem hiding this comment.
But we also seem to be patching them below is that needed ?
There was a problem hiding this comment.
In theory it is fine leaving remote_accessibility_api.h untouched, but by commenting out the declarations defined in remote_accessibility_api.h, any other file that uses the private APIs would trigger compilation error early, so we won't miss things when updating/backporting the patch.
|
|
It is definitely good idea, it would also keep Chromium maintaining the code path we use. |
7a9c641 to
77fc428
Compare
77fc428 to
a160a4d
Compare
a160a4d to
a088dac
Compare
|
Release Notes Persisted
|
|
I have automatically backported this PR to "9-x-y", please check out #22354 |
Description of Change
Close #20027.
This PR disables following private macOS APIs used in Chromium:
CAContextCALayerHostChromium has 2 ways of rendering on macOS: one is using official
IOSurfaceway, and one isCARemoteLayerAPI. TheIOSurfaceway is used when software compositing is enabled, and when the remote layer API is not available.This PR forces using
IOSurfaceeven when remote layer API is available, it essentially behaves the same with passing the--disable-remote-core-animationcommand line flag.More information can be found at https://bugs.chromium.org/p/chromium/issues/detail?id=312462.
NSAccessibilityRemoteUIElementAll related code using this class are disabled. It would affect accessibility when remote layer API is used, but we should be fine since remote layer API is disabled too.
NSNextStepFrameNSThemeFrameChromium overrides these private classes to implement custom frame. All related code are disabled so custom frame would not work.
Since in Electron we only support standard frame and simple frameless window, we are not affected.
NSURLFileTypeMappingsChromium uses it to guess mime type from extension names, the iOS version of Chromium does not use it. The fallback detection should be enough for us.
Checklist
npm testpassesRelease Notes
Notes: Fix Electron apps getting rejected to Mac App Store.