Update Feat/cef with upstream#11
Conversation
Co-authored-by: Fabian-Lars <30730186+FabianLars@users.noreply.github.com>
…velte to v7 (#15103) * chore(deps): update dependency @sveltejs/vite-plugin-svelte to v7 * Update vite to v8 * Update devalue --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tony <legendmastertony@gmail.com> Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* reduce cloning in `EmbeddedAssets::get` * Apply suggestion from @Legend-Master * Fix github suggestion --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> Co-authored-by: Tony <legendmastertony@gmail.com>
* chore(deps): Update cargo-mobile2 and toml crates * remove toml from tauri-build cargotoml * 0.22.3 * try a range * json5 and changefile * Revert "json5 and changefile" This reverts commit eda416b. * keep changefile
* refactor(tauri-build): make better use of OsString Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * refactor(tauri-build): dont wrap const value in function * refactor(tauri-build): None codepath is never used, replace Option<Vec> with Vec * refactor(tauri): use blocking apis where it makes sense * refactor(tauri): better use of std::fs API * refactor(tauri): rewind to start * refactor(tauri): fmt * add change file
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <30730186+FabianLars@users.noreply.github.com>
* Allow getting inner PathBuf from SafePathBuf SafePathBuf implements AsRef<Path> which is ergonomic and useful. However, some APIs take owned PathBufs. This leads to clunky code where the caller has to get a &Path from the SafePathBuf then take ownership of that path. Ideally, if a user has a SafePathBuf and needs a PathBuf, they won't need to allocate again just to get the inner PathBuf back. * Apply suggestion from @Legend-Master
* refactor(runtime-wry): remove RefCell hack * Remove `Sync` requirement on `on_new_window` * Merge branch 'dev' into remove-ref-cell-hack * Add change file
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* test: add more unit-tests for `html` module * refactor: remove html dependencies from `tauri-cli` * feat: introduce `html-manipulation-2` feature * Remove deprecation * Use new feature flag * Unroll `build` feature * Introduce `build-2` feature * Reduce diff * Use `build-2` in more places * Add docs * Refactor `inject_script_hashes` * Refactor `with_head` * Rename serialize and parse functions * Add changes file * Remove unused function * Update changelog * Remove test * Update wry * Add todo comments we don't have the git blame data in html2, better do it now or never find it again * refactor `with_head` to `ensure_head` * Remove unused casts * Avoid using format to construct html elements which has the potential to get injected * Feature gate `inline_isolation` * Keep old prepends appends * Fix `inline_isolation_replaces_src_with_content` test * End meta tag * Mirror test to old html module * Use back to `append_html` for csp and link issue * Try out dom query main branch * Use nodes instead to avoid an extra clone * Use wry 0.54.4 and dom_query 0.27 * Mark stability * Remove `PatternObject` --------- Co-authored-by: Tony <legendmastertony@gmail.com> Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* feat(wix): add minimum webview2 version option * Add change file * Format * Move comments inside `#if` block * add breaking change notes * Add deprecation to description schema * Merge remote-tracking branch 'upstream/dev' into wix-minimum-webview2-version * Merge branch 'dev' into wix-minimum-webview2-version
* feat(bundler): support Liquid Glass icons, closes #14207 the `icon` config now supports loading an Assets.car directly or a `.icon` (Icon Composer asset) that gets compiled into an Assets.car file * fmt * fix build * add version checks * fmt * fix icns fallback * fmt
* feat: add `eval_with_callback` to Webview and WebviewWindow * docs: fix eval_with_callback docs and add change file --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* chore(deps-dev): bump vite from 8.0.0 to 8.0.5 Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.0.0 to 8.0.5. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.0.5/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 8.0.5 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * Fix audit --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tony <legendmastertony@gmail.com>
* Add Bring All to Front predefined menu item type * Format and update changefile * Update .changes/add-bring-all-to-front-predefined-menu-item-type.md
* feat: NSIS uninstaller support. * chore: fix typo and update schema. * fix: comments and alias. * fix: add pages for uninst sidebar. * chore: fix typo in comments of fields. * fix: group HEADERIMAGE. * fix: remove welcome/finish of uninstaller. * fix: remove uninstaller_sidebar_image. * Update crates/tauri-utils/src/config.rs Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * chore: revert comments. * chore: update schema. * Update crates/tauri-utils/src/config.rs Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * Update crates/tauri-utils/src/config.rs Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * fix: typo of installer_icon. * chore: add change file. * fix: typo. * chore: update config.json. * Update .changes/feat-uninstaller-icon-image.md Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * fix: revert alias. * chore: update comments in settings.rs. * chore: update comments. * fix: installer.nsi * fix: installer.nsi --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Bumps [rand](https://github.com/rust-random/rand) from 0.9.1 to 0.9.3. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/0.9.3/CHANGELOG.md) - [Commits](rust-random/rand@rand_core-0.9.1...0.9.3) --- updated-dependencies: - dependency-name: rand dependency-version: 0.9.3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* check .localhost suffix on windows and android i didn't actually run this on windows, i'm relying on CI to tell me * Create tauri-sec-localhost-suffix.md --------- Co-authored-by: Fabian-Lars <30730186+FabianLars@users.noreply.github.com>
this is possible since f5223a1 (init script for remote url fix)
they are actually implemented by tao now noticed while testing tauri-apps/tao#1211
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/tauri/src/manager/webview.rs`:
- Around line 308-329: The current code replaces the
pending.on_web_content_process_terminate_handler with only the app-level hook,
removing the runtime fallback (Builder::on_web_content_process_terminate)
behavior; instead, compose a new handler that invokes both: capture the existing
runtime/built-in handler and the
app_manager_.webview.on_web_content_process_terminate hook and replace
pending.on_web_content_process_terminate_handler with a closure that, when
fired, looks up the webview via manager.manager_owned().get_webview(&label_) and
then calls the app hook (on_web_content_process_terminate) and also invokes the
existing runtime fallback handler so the default reload/recovery still
runs—preserve call order and ensure both handlers run safely if either is None.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 30c4e72f-ce6a-41aa-938d-e0f9c67bdb3e
📒 Files selected for processing (3)
crates/tauri-runtime-cef/src/cef_impl.rscrates/tauri/scripts/core.jscrates/tauri/src/manager/webview.rs
✅ Files skipped from review due to trivial changes (1)
- crates/tauri-runtime-cef/src/cef_impl.rs
| #[cfg(any(target_os = "macos", target_os = "ios"))] | ||
| if pending.on_web_content_process_terminate_handler.is_none() { | ||
| let app_manager_ = manager.manager_owned(); | ||
| if app_manager_ | ||
| .webview | ||
| .on_web_content_process_terminate | ||
| .is_some() | ||
| { | ||
| let label_ = pending.label.clone(); | ||
| pending | ||
| .on_web_content_process_terminate_handler | ||
| .replace(Box::new(move || { | ||
| if let Some(w) = app_manager_.get_webview(&label_) | ||
| && let Some(on_web_content_process_terminate) = | ||
| &app_manager_.webview.on_web_content_process_terminate | ||
| { | ||
| on_web_content_process_terminate(&w); | ||
| } | ||
| })); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Compose the app hook instead of replacing the runtime fallback.
Line 309 makes the app-level hook a fallback-only path, and once this closure is installed wry no longer uses its built-in reload-on-termination behavior. That means Builder::on_web_content_process_terminate is skipped for webviews that already set their own handler, and all other webviews lose the default recovery path after a renderer crash.
Suggested direction
#[cfg(any(target_os = "macos", target_os = "ios"))]
- if pending.on_web_content_process_terminate_handler.is_none() {
- let app_manager_ = manager.manager_owned();
- if app_manager_
- .webview
- .on_web_content_process_terminate
- .is_some()
- {
- let label_ = pending.label.clone();
- pending
- .on_web_content_process_terminate_handler
- .replace(Box::new(move || {
- if let Some(w) = app_manager_.get_webview(&label_)
- && let Some(on_web_content_process_terminate) =
- &app_manager_.webview.on_web_content_process_terminate
- {
- on_web_content_process_terminate(&w);
- }
- }));
- }
- }
+ if let Some(app_hook) = app_manager
+ .webview
+ .on_web_content_process_terminate
+ .clone()
+ {
+ let app_manager_ = manager.manager_owned();
+ let label_ = pending.label.clone();
+ let webview_hook = pending.on_web_content_process_terminate_handler.take();
+ pending
+ .on_web_content_process_terminate_handler
+ .replace(Box::new(move || {
+ if let Some(w) = app_manager_.get_webview(&label_) {
+ app_hook(&w);
+ if let Some(handler) = &webview_hook {
+ handler();
+ } else {
+ let _ = w.reload();
+ }
+ }
+ }));
+ }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/tauri/src/manager/webview.rs` around lines 308 - 329, The current code
replaces the pending.on_web_content_process_terminate_handler with only the
app-level hook, removing the runtime fallback
(Builder::on_web_content_process_terminate) behavior; instead, compose a new
handler that invokes both: capture the existing runtime/built-in handler and the
app_manager_.webview.on_web_content_process_terminate hook and replace
pending.on_web_content_process_terminate_handler with a closure that, when
fired, looks up the webview via manager.manager_owned().get_webview(&label_) and
then calls the app hook (on_web_content_process_terminate) and also invokes the
existing runtime fallback handler so the default reload/recovery still
runs—preserve call order and ensure both handlers run safely if either is None.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/tauri/src/webview/mod.rs`:
- Around line 84-90: The origin check in is_url_for_custom_protocol currently
compares only scheme and domain, causing mismatches when ports differ; update
is_url_for_custom_protocol to compare scheme, host_str() and
port_or_known_default() (use Url::host_str() and Url::port_or_known_default())
so origin includes port per RFC6454, and apply the same change to the tauri
branch of is_local_url; also add regression tests asserting that
https://tauri.localhost:8443/ and https://myproto.localhost:8443/ are treated as
distinct origins from the default-port variants.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f3589f53-ce67-4178-8a97-d5868ef10b86
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
.changes/driver-arg-eq-separator.md.changes/enforce-acl-remote-origins.md.changes/expose-mobile-monitor-apis.md.changes/fix-request-permission-android.md.changes/phf-0.13.md.changes/tauri-sec-localhost-suffix.mdcrates/tauri-cli/Cargo.tomlcrates/tauri-driver/Cargo.tomlcrates/tauri-runtime-cef/src/cef_impl.rscrates/tauri-utils/Cargo.tomlcrates/tauri/mobile/android-codegen/TauriActivity.ktcrates/tauri/src/test/mod.rscrates/tauri/src/webview/mod.rscrates/tauri/src/window/plugin.rsexamples/api/src-tauri/src/lib.rs
✅ Files skipped from review due to trivial changes (10)
- .changes/phf-0.13.md
- .changes/driver-arg-eq-separator.md
- crates/tauri-driver/Cargo.toml
- .changes/tauri-sec-localhost-suffix.md
- .changes/expose-mobile-monitor-apis.md
- .changes/enforce-acl-remote-origins.md
- crates/tauri/src/test/mod.rs
- .changes/fix-request-permission-android.md
- crates/tauri/mobile/android-codegen/TauriActivity.kt
- crates/tauri-runtime-cef/src/cef_impl.rs
🚧 Files skipped from review as they are similar to previous changes (3)
- crates/tauri-cli/Cargo.toml
- crates/tauri-utils/Cargo.toml
- crates/tauri/src/window/plugin.rs
* feat: prepare publishing for packages/cli (@tauri-apps/cli-cef) * fix: install 1.88 * install target * install x86_64-apple-darwin for helper build * add --tag * use skip-optional-publish (doesnt support prerelease) * fmt [skip ci]
e.g. "enable-devtools-experiment" is added to the arg list when it is passed to .command_line_args
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Summary by CodeRabbit
New Features
Bug Fixes
Enhancements