* feat: add menu item role `palette` and `header`
Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>
* adds comments
Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>
* refactors new role items to new item types
Co-authored-by: Gellert Hegyi <gellert@poolside.ai>
* docs: custom type
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* docs: note types only available on mac 14+
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>
Co-authored-by: Gellert Hegyi <gellert@poolside.ai>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47482)
Revert "refactor: move `IsClosed()` and `IsClosable()` tests into `NativeWindow::Close()` (#46888)"
This reverts commit 3faddd5ae2.
refactor: move gin::Converter<PreloadScript> impl to a .cc file
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: add back fallback wasm-trap handling
Refs 5372409
This change sets up wasm-trap handling for the case where content_shell
has not enabled crash reporting but moves the responsibility to
ElectronRendererClient. The default ContentRendererClient assumes
that crash reporting is enabled (crashpad enabled by default) and does
not set up its own handler.
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: fix build
Co-authored-by: deepak1556 <hop2deep@gmail.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
document the default value of priority option
Update the priority test to not use the httpbin.org as server
Fixed the lint errors
Fixed the build error
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zeeker <13848632+zeeker999@users.noreply.github.com>
* chore: bump chromium in DEPS to 138.0.7166.1
* chore: bump chromium in DEPS to 138.0.7166.2
* chore: bump chromium in DEPS to 138.0.7168.1
* chore: bump chromium in DEPS to 138.0.7169.2
* chore: bump chromium in DEPS to 138.0.7170.1
* chore: bump chromium in DEPS to 138.0.7172.1
* chore: bump chromium in DEPS to 138.0.7173.0
* chore: bump chromium in DEPS to 138.0.7175.0
* chore: bump chromium in DEPS to 138.0.7177.1
* chore: bump chromium in DEPS to 138.0.7178.2
* chore: bump chromium in DEPS to 138.0.7180.1
* chore: bump chromium in DEPS to 138.0.7181.0
* chore: bump chromium in DEPS to 138.0.7182.2
* chore: bump chromium in DEPS to 138.0.7184.0
* chore: bump chromium in DEPS to 138.0.7186.0
* chore: bump chromium in DEPS to 138.0.7188.0
* chore: bump chromium in DEPS to 138.0.7190.1
* chore: bump chromium in DEPS to 138.0.7192.0
* chore: bump chromium in DEPS to 138.0.7194.1
* chore: bump chromium in DEPS to 138.0.7196.1
* chore: bump chromium in DEPS to 138.0.7198.1
* chore: bump chromium in DEPS to 138.0.7200.0
* chore: bump chromium in DEPS to 138.0.7202.0
* chore: bump chromium in DEPS to 138.0.7204.0
* chore: bump chromium in DEPS to 138.0.7204.5
* chore: bump chromium in DEPS to 138.0.7204.4
* 6543986: Mac: decouple deserializing and applying sandbox policy
Refs 6543986
(cherry picked from commit d386063e9d2414a35c91c4fa017665d950de5882)
* 6566111: Change UtilityProcessHost to manage its instance internally
Refs 6566111
(cherry picked from commit 93a0a91d447c118de33efec079365f5d0e8363db)
* chore: update patches
* 6577970: Remove superfluous includes for base/strings/stringprintf.h in headers
Refs 6577970
(cherry picked from commit 9ba045f3715d85792e4aa12139e7e05e0b772634)
* 6568811: Add FunctionCall structured metrics event for DevTools
Refs 6568811
(cherry picked from commit 79ae6f2c8b53568b6277998cfe9a91e3a1ee595b)
* [PDF Ink Signatures] Support PdfAnnotationsEnabled policy
6558970
* Mac: Switch to Xcode 16.3 (16E140) and SDK 15.4 (24E241)
6431799
* chore: bump chromium in DEPS to 138.0.7204.15
* chore: update patches
* fixup Mac: decouple deserializing and applying sandbox policy
6543986
* chore: update patches
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* chore: bump chromium in DEPS to 138.0.7180.0
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
* 6546797: Add a metric for the overall success of the "safe storage" item retrieval.
Refs 6546797
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* 6548078: extensions: Fix TODO in ScriptInjectionTracker for desktop Android
Refs 6548078
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* 6544950: Revert "FSA: Only normalize the hardcoded rules once during initialization"
Refs 6544950
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* chore: bump chromium in DEPS to 138.0.7181.0
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
* chore: update patches
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: correctly clamp HSL shift values between 0 and 1
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* chore: bump DEPS to 138.0.7183.0
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* 6553142: Remove SelectFileDialogLinuxKde | 6553142
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* chore: update patches
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* chore: bump chromium in DEPS to 138.0.7184.0
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
* chore: bump chromium in DEPS to 138.0.7186.0
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
* chore: bump chromium in DEPS to 138.0.7190.0
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
* chore: update patches
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* 6547778: Remove some superfluous //ui/gfx includes from //chrome headers | 6547778
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | 6556022
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* fix: remove pdf_extension_util::AddAdditionalData 4099130
This was removed 2 years ago in Chrome.
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* fix: provide BrowserContext to pdf_extension_util::AddAdditionalData 6558173
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* fixup! 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | 6556022
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* fix: pass in navigation throttle registry 6536175
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* fixup! 6556022: Reland "FSA: Only normalize the hardcoded rules once during initialization" | 6556022
This partially reverts commit 20d709dd15ba0ff332e24ee314149d642dc5d47c.
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
* 6545984: corner-shape: render dashed & dotted borders Refs 6545984
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
* Update corner smoothing expected images
Co-authored-by: clavin <clavin@electronjs.org>
* Apply "future" revert commit to fix windows build
> Reason for revert: Multiple eng reporting that this is causing build failures due to too-long pathnames, with no immediate feasible workaround
This issue also affects our CI builds.
Problematic CL in current roll: 6494836: [webgl] Add stub WebGL[2]RenderingContextWebGPU | 6494836
"Future" revert CL: 6565622: Revert "[webgl] Add stub WebGL[2]RenderingContextWebGPU" | 6565622
This patch should automatically disappear when we roll the revert.
Co-authored-by: clavin <clavin@electronjs.org>
* 6533919: win: don't add WS_CAPTION style to popup windows 6533919
This mirrors the change made earlier to the code ours is based on: 6374074: [headless] Provide headless aware window metrics on Windows | 6374074
Co-authored-by: clavin <clavin@electronjs.org>
* chore: update patches
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop()
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use base::circular_deque in ResolveProxyHelper
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use base::circular_deque in GetExtraCrashKeys()
refactor: reduce visibility of kMaxCrashKeyValueSize
This change is to match Chromium's usage advice from
base/containers/README.md: `base:circular_deque` is preferred over
`std::deque` to provide consistent performance across platforms.
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use in-class member initialization for NativeWindow::widget_
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make NativeWindow::transparent_ const
refactor: make NativeWindow::enable_larger_than_screen_ const
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: make linter happy after rebase
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make NativeWindow::has_client_frame_ const
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make NativeWindow::has_client_frame_ const but not constexpr
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: make NativeWindow::pending_transitions a base::queue
Follow the base/containers/README.md advice that "Chromium code should
always use `base::circular_deque` or `base::queue` in preference to
`std::deque` or `std::queue` due to memory usage and platform variation."
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
GTK >= 3.90.0 removed support for menuitem icons. When Electron is
built with GTK >= 3.90.0, our code builds these icons and then throws
them away unused. Instead, let's just not build them.
Our gtk_util::GdkPixbufFromSkBitmap utility uses BGRAToRGBA and is
expensive to call.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
The GlobalMenuBar used to hold a raw_ptr reference to its NativeWindow;
but since it doesn't use it & only wants the gfx::AcceleratedWidget info,
let's remove the NativeWindowViews reference.
AFAICT, GlobalMenuBarX11::window_ has never been used
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make TrackableObject::weak_map_id() constexpr
refactor: make BaseWindow::GetID() inline and constexpr
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make NativeWindow::window_id() constexpr too
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
feat: enable innerWidth and innerHeight for window open (#46749)
* feat: enable innerWidth and innerHeight for window open
* update comment for added special innerWidth and innerHeight
* update 100 min spec requirement handling
* update testing to include getContentSize
* update macOS min requirement handling
* adjust refactored consts
* update const values from nativewindowviews
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
We probably didn't use this before because IsAltModifier() was written
two years before the KeyModifiers mask was added upstream in 98ec378a.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Fixes https://github.com/electron/electron/issues/45990
We previously made a change in https://github.com/electron/electron/pull/45868
to fix content protection being lost on hide and re-show. However, this
cause a breaking change where protected windows were made opaque black
instead of being hidden as before. This overrides relevant methods in
ElectronDesktopWindowTreeHostWin to restore the previous behavior.
without regressing the original issue.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
refactor: use `gin_helper::Dictionary::ValueOrDefault()` (#46982)
* refactor: use ValueOrDefault() in electron_api_web_contents.cc
* refactor: use ValueOrDefault() in electron_api_url_loader.cc
* refactor: use ValueOrDefault() in electron_download_manager_delegate.cc
* refactor: use ValueOrDefault() in electron_touch_bar.mm
* refactor: use ValueOrDefault() in electron_url_loader_factory.cc
* refactor: use ValueOrDefault() in electron_browser_context.cc
* refactor: use ValueOrDefault() in electron_touch_bar.mm
* refactor: use ValueOrDefault() in blink_converter.cc
* feat: add ValueOrDefault() to PersistentDictionary
* empty commit
* refactor: use ValueOrDefault() in blink_converter.cc
* refactor: inline the rectangle base::Value::Dict
* refactor: remove has_scroll temporary
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>