Update Feat/cef with upstream#11
Open
senamakel wants to merge 169 commits into
Open
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>
* chore(deps): update rust crate tray-icon to 0.24 * Enable gtk feature * Add change file --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tony <legendmastertony@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix(acl): preserve Number::Int on serde_json round-trip From<serde_json::Value> for Value was checking as_f64() first, which succeeds for any integer that fits in an f64, causing all integer values to be silently coerced to Number::Float on deserialization. Fix the check order to prefer as_i64() first, then as_u64() (falling back to Float for values above i64::MAX to avoid silent wrapping), and only using as_f64() for genuine floating-point numbers. Fixes #15480 * fix(acl): preserve Number::Int on serde_json round-trip From<serde_json::Value> for Value was checking as_f64() first, which succeeds for any integer that fits in an f64, causing all integer values to be silently coerced to Number::Float on deserialization. Fix the check order to prefer as_i64() first, then as_u64() (cast to i64, wrapping for values above i64::MAX), and only using as_f64() for genuine floating-point numbers. Fixes #15480
* Avoid mutex deadlocks by acquiring locks outside of `if let` * Add .changes * Rename change-pr-15491 to mobile-run-command-deadlock.md --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* feat(cef): implement more window/webview APIs * update set_theme * ClearAllBrowsingData, IsEnabled * fix setEnabled
* feat(cef): support `on_schedule_message_pump_work` * use `run_message_loop` * feat(cef): use `run_message_loop` w/ callback * cleanup * re-re-re-re-re-re-re-[bis]-clean ^#&*# * fmt
`on_already_running_app_relaunch` indexed the relaunched instance's first command line argument unconditionally, panicking when a second instance is started with no arguments. Use a checked lookup instead.
`Runtime::run_return` was a stub that returned 0 without running the event loop, so `App::run_return` did nothing on the CEF runtime. Run the event loop and report the exit code requested through `RequestExit` (e.g. `app.exit(code)`); exiting by closing the last window reports 0, matching the wry runtime's behavior.
Implements two TODOs in the `on_before_popup` handler:
- Extract the requested size and position from CEF's `PopupFeatures`
(the `window.open()` feature string) and pass them to the
`NewWindowHandler` as logical units, instead of always reporting
`None`.
- Handle `NewWindowResponse::Create { window_id }`: cancel the popup
and navigate the designated window's first webview to the popup URL —
the closest CEF equivalent of wry hosting the popup in that window's
webview, since CEF cannot transplant a popup's contents into an
existing browser. (`window.opener` is not linked to the new
document.) Previously the response silently denied the popup.
The `after_window_creation` callback passed to `create_window` was dropped on both creation paths, so window-setup hooks that tauri core relies on (e.g. applying window effects on Windows) never ran on the CEF runtime. Invoke it after the CEF window is created, constructing `RawWindow` from the native handle on Windows and the marker-only variant on macOS. On Linux `RawWindow` carries a `gtk::ApplicationWindow` reference, which CEF windows don't have, so the hook cannot be supported there (documented in code). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
After `run_message_loop` returns, the runtime pumps `do_message_loop_work` until every window has gone through `OnBeforeClose` before calling `cef::shutdown`. That drain spun a full CPU core while waiting on the browsers' cross-process tear-down; yield between iterations instead. Also updates a stale `wait_for_deferred_init` doc comment that still described the pre-`run_message_loop` external pump, and drops an unused import.
…5532) Maps the macOS `on_web_content_process_terminate_handler` webview hook to CEF's `RequestHandler::on_render_process_terminated`, so embedders are notified when a webview's renderer process crashes or is killed, matching the wry runtime's WKWebView behavior. Also documents that `web_resource_request_handler` is intentionally ignored by the runtime: tauri core consumes it itself (it is wrapped into the `tauri` URI scheme protocol before the pending webview reaches any runtime; tauri-runtime-wry ignores it identically).
…5534) Reworks how child (multiwebview) browsers are managed on X11, fixing several windowing bugs: - Perform every operation on a browser's X window through CEF's own display connection (`cef_get_xdisplay`, the pattern used by cefclient) instead of opening and closing a throwaway connection per call, which raced with Chromium's own X11 traffic. - Convert between DIP and physical pixels at the X11 boundary: CEF Views coordinates are DIP while raw X11 child windows use physical pixels, so webview bounds were wrong on HiDPI displays (both at creation via `WindowInfo::set_as_child` and on every `set_bounds`). - Drive `webview.close()` through `try_close_browser` instead of `XDestroyWindow`: CEF's `CefWindowX11` has no DestroyNotify handling, so destroying the window behind its back leaked the browser/renderer process and hung `cef::shutdown` on exit. - Toggle `_NET_WM_STATE_HIDDEN` in `webview.hide()/show()` (cefclient's `SetXWindowVisible` protocol) so Chromium releases rendering resources while a webview is hidden. - Stop raising the window on every `set_bounds`, which churned the z-order between sibling webviews during resizes. It also fixes webviews rendering blank until focused after the window manager hides and re-shows the window (e.g. i3 workspace switches): - Chromium recreates its GPU presentation surfaces when the window is shown again, but the child browsers' renderers never submit a new frame (that otherwise only happens on focus or input), leaving every webview blank. The repair resize-jiggles the browser window by one pixel and back: each size change allocates a new viz LocalSurfaceId, obligating the renderer to produce a fresh CompositorFrame. - CEF exposes no callback for WM-level visibility (`WasHidden` / `Invalidate` are windowless-only), so a small watcher thread with its own X connection listens for MapNotify, WM_STATE/_NET_WM_STATE changes (i3 marks hidden-workspace windows Withdrawn) and VisibilityNotify, and posts the repair as a CEF UI task so it is serialized with Chromium's processing of the show transition. The window-activation callback runs the same repair for focus-driven shows. - Child browsers are also re-raised above the Views window's full-size content surface on creation, bounds changes and activation; Chromium restacks that surface above them when the window is shown, occluding the webviews.
Build the resolved ACL on a background thread so it no longer blocks app startup, moving the dominant cost of `generate_context!` off the startup critical path
regression from #15479
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
New Features
Bug Fixes
Enhancements