refactor: replace --offscreen flag with ApplyWebPreferences (#28938)

This commit is contained in:
Jeremy Rose 2021-05-03 06:28:14 -07:00 committed by GitHub
parent e0fa327daf
commit 9601dc59fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 22 deletions

View file

@ -148,17 +148,6 @@ void RendererClientBase::BindProcess(v8::Isolate* isolate,
void RendererClientBase::RenderThreadStarted() {
auto* command_line = base::CommandLine::ForCurrentProcess();
#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
// On macOS, popup menus are rendered by the main process by default.
// This causes problems in OSR, since when the popup is rendered separately,
// it won't be captured in the rendered image.
// TODO(loc): This will be wrong for in-process child windows, as this
// function won't run again for them.
if (command_line->HasSwitch(options::kOffscreen)) {
blink::WebView::SetUseExternalPopupMenus(false);
}
#endif
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
auto* thread = content::RenderThread::Get();