Commit graph

2962 commits

Author SHA1 Message Date
Charles Kerr
9d8da7839e
fix: dangling pointer warning when updating menus (#38643) 2023-06-08 09:29:32 -05:00
wgsheng
c8bdd014c8
fix: menu bar visibility when exiting full screen (#38599) 2023-06-08 12:19:34 +02:00
Shelley Vohr
5ee890fb6f
fix: reparenting UAF crash on macOS (#38603) 2023-06-08 12:18:37 +02:00
Shelley Vohr
9a9d8ae5ea
refactor: add ARC scaffolding for macOS (#38621) 2023-06-08 10:26:33 +02:00
Milan Burda
0294debc31
build: remove enable_picture_in_picture build flag (#38620)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-07 23:56:31 -07:00
Shelley Vohr
933544d449
chore: clean up ElectronPermissionManager (#38636)
chore: clean up ElectronPermissionManager
2023-06-07 23:55:36 -07:00
Charles Kerr
69790f4b2a
refactor: remove unused OffScreenRenderWidgetHostView fields (#38623) 2023-06-07 16:28:35 -05:00
Charles Kerr
5931f69f18
fix: sync api::Screen wrapper method sigs to upstream (#38597)
refactor: sync api::Screen getter sigs to upstream

ui::Display GetAllDisplays(), GetPrimaryDisplay(), GetDisplayMatching(),
and GetDisplayNearestPoint() methods are all const, so make our wrappers
const too.

ui::Display GetAllDisplays() returns a const reference, so make our
wrapper return a const reference too. This avoids creating a new
std::vector<display::Display> each time it's called.
2023-06-07 09:28:50 +02:00
zeeker999
28332c94bf
feat: Allow customizing the default math font (#38514) 2023-06-06 17:26:32 -04:00
Charles Kerr
5c1321b20a
refactor: remove redundant resizing strategy equality check (#38596)
* refactor: remove redundant resizing strategy equality check

Upstream already checks this.
2023-06-06 14:03:39 -05:00
Shelley Vohr
b2059f288a
fix: account for BrowserView bounds in setting autofill popup bounds (#38489) 2023-06-06 10:21:42 +02:00
Milan Burda
bb2ba35b51
refactor: use process_util.h helpers (#38574)
refactor: use process_util.h helpers
2023-06-06 17:19:13 +09:00
Shelley Vohr
8d689c565a
fix: file selection when disallowed on macOS (#38557) 2023-06-05 14:08:10 +02:00
Charles Kerr
83d023747c
refactor: use direct aggregation in NativeWindowViews (#38559)
* refactor: in NativeWindowViews, aggregate root_view_ directly

* refactor: in NativeWindowViews, aggregate keyboard_event_handler_ directly

* refactor: make NativeWindowClientView::window_ a raw_ref

Xref: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md\#non_owning-pointers-in-class-fields

Prefer const raw_ref<T> whenever the held pointer will never be null

* chore: make lint happy
2023-06-05 14:37:46 +09:00
Charles Kerr
05db963f87
chore: remove unused electron::api::View code (#38561)
chore: remove unused electron::api::View methods

Remove code that was added in 2c8dc9e but never used.
2023-06-03 10:40:44 -05:00
Charles Kerr
f247ca3f62
perf: avoid unnecessary base value clone (#38537) 2023-06-02 08:38:29 -05:00
Charles Kerr
c14f7b7d0b
refactor: remove unused switches (#38497)
* refactor: remove unused declaration of electron::kSHA1Certificate

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kSHA1MajorDescription

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kSHA1MinorDescription

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kCertificateError

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kValidCertificate

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kValidCertificateDescription

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kSecureProtocol, kSecureProtocolDescription

usage removed in 497f5a1

* refactor: remove electron::options::kPreloadScripts

removed in bad8d5e0

* refactor: remove electron::options::kImageAnimationPolicy

removed in 385d0f5
2023-05-31 15:55:21 -04:00
Shelley Vohr
57147d1b8d
fix: navigator.connection not working as intended (#38491)
* fix: navigator.connection not working as intended

* chore: make network quality methods private
2023-05-31 11:06:25 -04:00
Shelley Vohr
663497dc6b
chore: make contentTracing.stopRecording() failure clearer (#38488)
chore: make contentTracing.stopRecording() failure clearer
2023-05-31 09:54:41 -04:00
Shelley Vohr
40e724e5dd
fix: DCHECK minimizing parent window with non-modal child (#38460) 2023-05-31 11:57:44 +02:00
John Kleinschmidt
b4ec363b3d
feat: add USB protected classes handler (#38263)
* feat: add USB protected classes handler

* chore: apply review suggestions

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: update docs

* chore: apply review suggestions

* update doc per suggestion

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-05-30 12:35:25 -04:00
Charles Kerr
0203bd3305
refactor: prefer base::Contains() over find() + end() (#38443)
* refactor: use base::Contains() in KeyWeakMap::Has()

* refactor: use base::Contains() in WebRequest::RequestFilter::MatchesType()

* refactor: use base::Contains() in BaseWindow::AddBrowserView()

* refactor: use base::Contains() in DeepFreeze()

* refactor: use base::Contains() in Clipboard::Read()

* Revert "refactor: use base::Contains() in BaseWindow::AddBrowserView()"
This reverts commit 60152359d3978451ebdd7c8eed602c2fb8a9cafa.

* refactor: use base::Contains() in BaseWindow::AddBrowserView()

* refactor: use base::Contains() in IsDevToolsFileSystemAdded()

* refactor: use base::Contains() in MessagePort::DisentanglePorts()

* refactor: use base::Contains() in PowerSaveBlocker::IsStarted()

* refactor: use base::Contains() in SpellCheckClient::OnSpellCheckDone()

* refactor: use base::Contains() in ShowTaskDialogWstr()

* refactor: use base::Contains() in PrintViewManagerElectron::ScriptedPrint()

* refactor: use base::Contains() in PrintViewManagerElectron::DidGetPrintedPagesCount()

* refactor: use base::Contains() in NativeWindow::AddDraggableRegionProvider()

* refactor: use base::Contains() in ElectronBindings::ActivateUVLoop()

* refactor: use base::Contains() in NativeWindowViews::IsVisibleOnAllWorkspaces()

* refactor: use base::Contains() in HidChooserController::OnDeviceAdded()

* refactor: use base::Contains() in ElectronSandboxedRendererClient::WillReleaseScriptContext()

* refactor: use base::Contains() in ElectronRendererClient::WillDestroyWorkerContextOnWorkerThread()

* refactor: use base::Contains() in GlobalShortcut::OnKeyPressed()
2023-05-30 10:28:43 +02:00
Shelley Vohr
56138d879e
fix: Windows FrameView always appearing inactive (#38468) 2023-05-28 18:39:13 -04:00
Charles Kerr
a20896f519
refactor: remove InspectableWebContents::GetAll() (#38442)
It is unused and also keeps a persistent std::list<>, so remove it.
2023-05-25 17:23:19 +09:00
Milan Burda
06cc9caeaa
build: remove enable_desktop_capturer flag (#38412)
feat: remove enable_desktop_capturer flag

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 15:32:31 -04:00
Milan Burda
2f8e68f8b3
chore: remove ViewsDelegate::IsWindowInMetro() override (#38409)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 20:00:52 +02:00
Shelley Vohr
16cd486356
fix: MediaDevices missing DisplayMediaInformation (#38390)
fix: MediaDevices missing DisplayMediaInformation
2023-05-24 11:17:08 -04:00
Milan Burda
b6ef4a3929
build: remove unused enable_tts build flag (#38420)
chore: remove unused enable_tts build flag

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 10:18:43 +02:00
Cheng Zhao
dec9a1d9db
chore: remove dead draggable region code (#38404) 2023-05-24 10:03:07 +02:00
Charles Kerr
b6c80ba646
fix: dangling_raw_ptr warning in electron_api_web_contents (#38403)
fix: dangling_raw_ptr warning in electron_api_web_contents
2023-05-23 21:52:07 -04:00
Charles Kerr
30e992dec4
chore: bump chromium to 115.0.5786.0 (main) (#38301)
* chore: bump chromium in DEPS to 115.0.5772.0

* chore: update disable_color_correct_rendering.patch

no manual changes; patch succeeded with fuzz 2.

* chore: update chromium/build_libc_as_static_library.patch

no manual changes; patch succeeded with fuzz 2 (offset 1 line).

* chore: update chromium/feat_configure_launch_options_for_service_process.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4518747

patch manually reapplied due to upstream code shear

* chore: update chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch

https://chromium-review.googlesource.com/c/chromium/src/+/4502965

patch manually reapplied due to upstream code shear

* chore: update bundle_locations #include location

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4525355

* chore: Remove `extension_name` from DesktopStreamsRegistry

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4514081

* chore: bump chromium in DEPS to 115.0.5778.0

* chore: add chromium/chore_patch_out_profile_methods_in_chrome_browser_pdf.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4482679

Another instance of patching out upstream references to Profile code

* refactor: add WebViewGuestDelegate::GetGuestDelegateWeakPtr()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4515455

This approach copied from GuestViewBase::GetGuestDelegateWeakPtr() approach in that same commit.

* fixup! chore: update bundle_locations #include location

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4525355

Sync namespace use to upstream base::mac -> base::apple changes

* fixup! chore: update bundle_locations #include location

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4525355

Sync namespace use to upstream base::mac -> base::apple changes

* chore: update chromium/mas_disable_remote_accessibility.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4530546

patch manually reapplied due to upstream code shear

* chore: update chromium/printing.patch

no manual changes; patch succeeded with fuzz

* chore: update chromium/build_add_electron_tracing_category.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4517872

no manual changes; patch succeeded with fuzz

* chore: update chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4529098

patch manually reapplied due to upstream code shear

* chromium/build_only_use_the_mas_build_config_in_the_required_components.patch

https://chromium-review.googlesource.com/c/chromium/src/+/4529098

patch manually reapplied due to upstream code shear

* chore: update chromium/mas-cgdisplayusesforcetogray.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4529475

no manual changes; patch succeeded with fuzz

* chore: update chromium/build_only_use_the_mas_build_config_in_the_required_components.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4429011

no manual changes; patch succeeded with fuzz

* chore: remove chromium/cherry-pick-48a136e77e6d.patch

already present upstream

* chore: remove chromium/cherry-pick-e6e23ba00379.patch

already present upstream

* [Code Health] Remove value based RegisterPref for Dict and List

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4533537

* Remove `cxx17_backports.h` and adjust unittest file

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4534916

Notes: mostly just removing #include and s/base::clamp/std::clamp/

* refactor: add FakeBrowserProcess helper class

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4424072

Used in ElectronBrowserMainParts' fake_browser_process_ field. Previously
this was an BrowserProcessImpl instance, but upstream 4424072 makes that
an abstract base class. `FakeBrowserProcess` is a thin subclass with the
minimum code needed to make it concrete.

`ElectronBrowserMainParts::fake_browser_process_` is now a `shared_ptr`
instead of a `unique_ptr` so we can avoid exposing `FakeBrowserProcess`
in the header.

* fixup! refactor: add FakeBrowserProcess helper class

remove unnecessary unique_ptr

* fix: Browser::SetDockIcon() when !Browser.is_ready()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4410741

An alternative fix for https://github.com/electron/electron/pull/36279 .
The previous fix was to call `SetSupportedScales()` ourselves (1b1609a),
but upstream has removed this API.

CC @codebytere

* fixup! chore: remove chromium/cherry-pick-e6e23ba00379.patch

* chore: update chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4517404

patch manually reapplied due to upstream code shear

* chore: update patches

* chore: add dep: resource_coordinator:mojo_bindings

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4521464

* fixup! chore: add dep: resource_coordinator:mojo_bindings

chore: make lint happy

* chore: patch out Profile methods in titlebar_config

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4508143 (primary)

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4534461 (followup)

* chore: bump chromium in DEPS to 115.0.5780.0

* chore: update chromium/disable_hidden.patch

no manual changes; patch succeeded with fuzz

* chore: update chromium/sysroot.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4535715

no manual changes; patch succeeded with fuzz

* chore: update chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4403623

patch manually reapplied due to upstream code shear

* chore: update chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4547380

patch manually reapplied due to upstream code shear

* chore: update patches

* fixup! fix: Browser::SetDockIcon() when !Browser.is_ready()

chore: iwyu image.h

* chore: bump chromium in DEPS to 115.0.5782.0

* chore: bump chromium in DEPS to 115.0.5784.0

* 4514181: CR2023: Update filled cr-input styles.

https://chromium-review.googlesource.com/c/chromium/src/+/4514181

* 4521894: Remove SiteInstanceDeleting usage outside of tests.

https://chromium-review.googlesource.com/c/chromium/src/+/4521894

* 4525355: Move backup_util and bundle_locations to base/apple

https://chromium-review.googlesource.com/c/chromium/src/+/4525355

* 4484743: webauthn: add underlying support for calling iCloud Keychain on macOS.

https://chromium-review.googlesource.com/c/chromium/src/+/4484743

* chore: fixup patch indices

* 4546398: Convert /chrome/browser to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4546398

* chore: bump chromium in DEPS to 115.0.5786.0

* chore: update patches

* 4540682: Initialize PDF SDK with policy in chrome_pdf::RenderPDFPageToDC()

https://chromium-review.googlesource.com/c/chromium/src/+/4540682

* Don't import ObjC++ fn headers into electron_api_app

* 4535715: Refactor sysroot-creator.sh

https://chromium-review.googlesource.com/c/chromium/src/+/4535715

* fixup! refactor: add FakeBrowserProcess helper class

* 4531903: [string][test] Create/Copy strings to old space before externalization

https://chromium-review.googlesource.com/c/v8/v8/+/4531903

* 59645: Add APIs to support RSA keys with large e.

https://boringssl-review.googlesource.com/c/boringssl/+/59645

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2023-05-23 21:58:58 +02:00
Milan Burda
2acb97aa85
chore: eliminate a few uses of base::AdaptCallbackForRepeating() (#38293) 2023-05-18 17:01:44 -04:00
Shelley Vohr
32d8f84cad
fix: getNormalBounds() for transparent windows on Windows (#38218) 2023-05-17 13:11:43 +02:00
Shelley Vohr
ad07712561
fix: win.isMaximized() for transparent windows on Windows (#38234) 2023-05-17 10:17:08 +02:00
Shelley Vohr
e83197669c
fix: unify BrowserWindow.isVisible() logic cross-platform (#38242) 2023-05-16 11:46:45 +02:00
Shelley Vohr
042663e190
fix: isMaximized after minimize/fullscreen on macOS (#38291)
fix: isMaximized after isMinimized on macOS
2023-05-16 09:26:41 +02:00
Shelley Vohr
e19500fa03
feat: support Mica/Acrylic on Windows (#38163)
* feat: support Mica/Acrylic on Windows

* chore: feedback from review
2023-05-15 16:31:57 -04:00
Shelley Vohr
c2d7164021
chore: remove unnecessary spellchecker revert patch (#38248) 2023-05-15 16:17:00 -04:00
Shelley Vohr
e7fc1a422d
feat: add missing 'cursor-changed' type values (#38210) 2023-05-15 10:27:09 +02:00
Milan Burda
0149ae72e6
refactor: use standard naming for enum class values (#38232) 2023-05-12 15:24:01 +02:00
Milan Burda
88a9962e22
refactor: convert HashAlgorithm to enum class (#38233) 2023-05-12 15:23:42 +02:00
John Kleinschmidt
3dbc0a365f
chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron-roller[bot]
894e056e6b
chore: bump chromium to 115.0.5760.0 (main) (#38033)
* chore: bump chromium in DEPS to 114.0.5721.0

* chore: update patches

* chore: bump chromium in DEPS to 114.0.5723.0

* chore: update patches

* chore: bump chromium in DEPS to 114.0.5725.0

* chore: update patches

* chore: bump chromium in DEPS to 114.0.5727.0

* chore: bump chromium in DEPS to 114.0.5729.0

* chore: bump chromium in DEPS to 114.0.5731.0

* chore: update patches

* 4450570: Clean up content shell
https://chromium-review.googlesource.com/c/chromium/src/+/4450570

* 4262527: geolocation: Introduce mojom::GeopositionResult
https://chromium-review.googlesource.com/c/chromium/src/+/4262527

* 4450327: Android/Nav: Stop taking content timeout timer from old host.
https://chromium-review.googlesource.com/c/chromium/src/+/4450327

Also, see:
4451366: Reland "Prerender: Fix prerender new content timeout start timing"
https://chromium-review.googlesource.com/c/chromium/src/+/4451366

* chore: bump chromium in DEPS to 114.0.5733.2

* chore: update patches

* chore: bump CircleCI xcode version
this will hopefully get us the necessary macOS sdk 13.3 on CI.

* chore: bump chromium in DEPS to 114.0.5735.0

* chore: update patches

* test: fix geolocation test

* chore: bump chromium in DEPS to 115.0.5736.0

* chore: update patches

* chore: bump chromium in DEPS to 115.0.5738.0

* chore: update patches

* fix: remove profiles from spellcheck service

* chore: update libc++ filenames

* chore: bump chromium in DEPS to 115.0.5740.0

* chore: update patches

* chore: bump chromium in DEPS to 115.0.5742.0

* chore: update patches

* chore: bump chromium in DEPS to 115.0.5744.0

* chore: update patches

* chore: bump chromium in DEPS to 115.0.5746.0

* chore: update patches

* chore: update filenames.libcxx.gni

* chore: bump chromium in DEPS to 115.0.5748.0

* chore: update patches

* build: update libcxx filenames

* chore: bump chromium in DEPS to 115.0.5750.0

* chore: bump chromium in DEPS to 115.0.5752.2

* chore: bump chromium in DEPS to 115.0.5754.0

* chore: bump chromium in DEPS to 115.0.5756.0

* chore: bump chromium in DEPS to 115.0.5758.0

* chore: update patches

* chore: update patch after rebase

* 4500969: Delete content/dev_ui_content_resources.grd file.

https://chromium-review.googlesource.com/c/chromium/src/+/4500969

* Use base.Value.Dict in OmahaAttributesHandler related code

https://chromium-review.googlesource.com/c/chromium/src/+/4506402

* chore: bump chromium in DEPS to 115.0.5760.0

* chore: update patches

* chore: fixup line endings

* 4336172: Include client-drawn window decorations in aspect ratio. |
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4336172

(cherry picked from commit 27c2f6c43e8e4a792b33fdf8cf3af880376406be)

* spec: fix race condition in alwaysOnTop test

(cherry picked from commit 2ec5213fa0998d9cf21248257e7b5a5581044ea3)

* build: use xcode 14.2 not 14.3

(cherry picked from commit b7c62351a77102e854a801c363f391b177ebf672)

* build: use macOS 12 to run tests

The new macOS 13 VMs appear to have different screen / display behavior

(cherry picked from commit 14dc1dbc24cec85111a7482b49049f6acbfbc5f1)

* Remove always-true flag --harmony-sharedarraybuffer

https://chromium-review.googlesource.com/c/v8/v8/+/4429630

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2023-05-10 10:47:48 -04:00
Shelley Vohr
13e309e1fb
fix: only exit fullscreen conditionally with setKiosk (#38219)
fix: only exit fullscreen conditionally with setKiosk
2023-05-09 12:28:37 -04:00
Shelley Vohr
f432245456
fix: handle AXManualAccessibility attribute cross-protocol (#38142)
* fix: handle AXManualAccessibility attribute cross-protocol

* Update shell/browser/mac/electron_application.mm

Co-authored-by: Robo <hop2deep@gmail.com>

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2023-05-09 11:13:14 +02:00
Shelley Vohr
a6c9aefb4a
chore: fix TrustedTypes policy in chrome://accessibility (#38179)
chore: fix TrustedTypes policy in chrome://accessibility
2023-05-08 10:39:04 +02:00
Shelley Vohr
35a03a6bc1
refactor: remove IPC from mouse_util (#38183) 2023-05-08 09:50:30 +02:00
Shelley Vohr
f8d534f33e
chore: stop using a RenderWidgetHost observer in FileSelectHelper (#38168)
chore: stop using a RenderWidgetHost observer in FileSelectHelper
2023-05-04 21:43:29 +02:00
Shelley Vohr
ee1e6aab3e
chore: implement WebContentsDelegate::GetFullscreenState (#38141)
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4255184
2023-05-03 15:55:47 +02:00
Shelley Vohr
a8c0ed890f
feat: surface more webContents text selection commands (#37978)
* feat: surface more text selection commands

* refactor: use options argument

* docs: correct for review
2023-05-02 21:14:29 -04:00