diff options
Diffstat (limited to 'devel/electron23/files/patch-electron_shell_browser_api_electron__api__web__contents.cc')
-rw-r--r-- | devel/electron23/files/patch-electron_shell_browser_api_electron__api__web__contents.cc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/devel/electron23/files/patch-electron_shell_browser_api_electron__api__web__contents.cc b/devel/electron23/files/patch-electron_shell_browser_api_electron__api__web__contents.cc new file mode 100644 index 000000000000..21a6ab1042bf --- /dev/null +++ b/devel/electron23/files/patch-electron_shell_browser_api_electron__api__web__contents.cc @@ -0,0 +1,61 @@ +--- electron/shell/browser/api/electron_api_web_contents.cc.orig 2023-04-03 22:22:56 UTC ++++ electron/shell/browser/api/electron_api_web_contents.cc +@@ -154,11 +154,11 @@ + #include "ui/base/cocoa/defaults_utils.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/linux/linux_ui.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "ui/gfx/font_render_params.h" + #endif + +@@ -402,7 +402,7 @@ absl::optional<base::TimeDelta> GetCursorBlinkInterval + ui::TextInsertionCaretBlinkPeriodFromDefaults()); + if (system_value) + return *system_value; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (auto* linux_ui = ui::LinuxUi::instance()) + return linux_ui->GetCursorBlinkInterval(); + #elif BUILDFLAG(IS_WIN) +@@ -856,7 +856,7 @@ void WebContents::InitWithSessionAndOptions( + accept_languages.pop_back(); + prefs->accept_languages = accept_languages; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Update font settings. + static const gfx::FontRenderParams params( + gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr)); +@@ -2398,7 +2398,7 @@ void WebContents::ForcefullyCrashRenderer() { + + content::RenderProcessHost* rph = rwh->GetProcess(); + if (rph) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // A generic |CrashDumpHungChildProcess()| is not implemented for Linux. + // Instead we send an explicit IPC to crash on the renderer's IO thread. + rph->ForceCrash(); +@@ -3041,7 +3041,7 @@ void WebContents::CopyImageAt(int x, int y) { + void WebContents::Focus() { + // Focusing on WebContents does not automatically focus the window on macOS + // and Linux, do it manually to match the behavior on Windows. +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (owner_window()) + owner_window()->Focus(true); + #endif +@@ -3843,7 +3843,7 @@ ui::ImageModel WebContents::GetDevToolsWindowIcon() { + } + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void WebContents::GetDevToolsWindowWMClass(std::string* name, + std::string* class_name) { + *class_name = Browser::Get()->GetName(); |