- Support OnPaint uploads and copy shared textures into owned storage
before OnAcceleratedPaint returns.
- Redraw the last frame on resize/expose.
- Remove the legacy OpenGL renderer and Windows GL handler.
- Preserve cached images on allocation failure and validate bounds.
- Add OsrRendererD3D11Test unit tests, ported from the Metal/EGL tests.
Tested on Windows 11 x64:
- cefclient resize and select popups work in all eight combinations
of software/shared textures, internal/external begin frames, and
single/multi-threaded message loops.
- ceftests: 37 renderer tests pass on hardware/WARP; one allocation
failure test skips after the driver accepts its oversized descriptor
- Add OsrRendererGl, a shared OpenGL 3.3 renderer with DMA-BUF import,
and load EGL/GL at runtime with no new build dependencies.
- Render via GtkGLArea on Wayland and an EGL window surface on X11.
- Redraw the last frame on resize/expose, matching the Metal renderer.
- Exit at startup if OSR is enabled and EGL is unavailable.
- Add OsrRendererGlTest unit tests, ported from the Metal tests.
Tested on a Linux VM (VMware SVGA3D, Mesa 23.2, GNOME Wayland/Xwayland):
- cefclient OSR software and shared-texture (DMA-BUF) rendering on
Wayland (GtkGLArea) and X11 (EGL window surface), including resize,
select popups, cursors, --multi-threaded-message-loop and
--transparent-painting-enabled. Shared texture runs use
--ignore-gpu-blocklist (VMware is blocklisted).
- ceftests: new OsrRendererGlTest (12 tests, using GBM DMA-BUFs) and
all existing OSRTest tests pass.
- Missing libEGL: cefclient exits at startup with an error and
OsrRendererGlTest skips.
- Fail at startup when --use-native is used with Wayland
(unsupported, see #2804).
- Remove X11 runtime dependencies from the OSR path.
- Match the GDK backend to the Ozone platform.
- Keep GDK OpenGL enabled with OSR by presetting GDK_GL (see
https://crrev.com/7c29ce9003d87).
- Share IsRunningOnWayland() between cefclient and ceftests and
match Chromium detection logic.
Close widgets owned by ChromeBrowserWidget from
OnNativeWidgetDestroying while the native ownership graph is still
available. This prevents popup widgets from outliving Browser state during
native-window-driven shutdown.
Add Chrome-style ceftests for JavaScript, password-save, and synthetic owned
widgets. Confirm that each widget exists before closing the main window and
verify deterministic destruction ordering for the synthetic case. Reset the
password dismissal statistics before loading the password form so repeated
test runs continue to exercise the save-password widget.
Add a shared CEF installer that downloads, verifies, and manages CEF
binary distributions on Windows. The installer is embedded in
application bootstrap binaries and resolves the correct CEF version
from a CDN manifest based on each application's version and ABI
compatibility requirements.
Key components:
- CDN manifest parsing and version resolution
- WinHTTP-based download with SHA-1/SHA-256 integrity verification
- Authenticode catalog (.cat) signature verification
- Parallel XZ decompression for fast archive extraction
- Per-version metadata (cef_version.json) with full version tracking
- Shared installation database for multi-app version management
- Version pruning to reclaim disk space from unused versions
- Revocation list support (compiled-in baseline + CDN delta)
- Progress UI with WM_COPYDATA-based cancellation
- Bundled CEF fallback for offline/CDN-failure scenarios
Fixes two teardown-ordering hazards for Chrome style browsers created with
a native parent window (CefWindowInfo::SetAsChild):
- ChromeBrowserHostImpl::DestroyBrowser() may destroy the platform delegate
before Widget teardown destroys the ChildWindowDelegate, leaving its
raw_ptr dangling (SIGTRAP with PartitionAllocDanglingPtr). The pointer
was only cleared in OnWindowDestroyed on Windows, and only if that ran
first. Store a base::WeakPtr from the existing
CefBrowserPlatformDelegateNativeAura factory instead, which
auto-invalidates on delegate destruction on all Aura platforms.
- In the reverse order on Windows, the client may destroy the parent window
(and thereby the browser's Widget) while the browser is still alive,
leaving the Widget pointer cached by set_widget() dangling. SetFocus,
NotifyMoveOrResizeStarted and root window bounds queries could then
dereference the deleted Widget. Reuse the existing WidgetDeleted
mechanism (already wired up for the non-Views-hosted code path in
CreateHostWindow) by executing the delete callback from
ChildWindowDelegate::OnWindowDestroyed. The callback is bound with a
WeakPtr, so it no-ops safely when the delegate is destroyed first.
Adds ceftests coverage for both teardown orders (Windows and Linux X11).
Dangling pointer regressions are detected when running with
--enable-features=PartitionAllocBackupRefPtr,PartitionAllocDanglingPtr or
in an ASAN build. Chrome style is not supported with a native parent on
MacOS (see issue #3294).
Adds role-aware collapsing of off-screen nodes to CDP accessibility tree
serialization (Accessibility.getFullAXTree). When enabled, off-screen
landmarks and headings are serialized as summaries (role + name only)
and other off-screen nodes are pruned. Position:fixed/sticky descendants
of off-screen parents are still discovered and fully serialized.
Reduces snapshot size for AI agents using Playwright ariaSnapshot().
Platform screen readers are unaffected — they use a separate code path.
CDP nodesUpdated events are suppressed when active.
The setting is a per-browser CefBrowserSettings field threaded through
WebPreferences, with a runtime override via SetAxViewportCollapse().
Both APIs are guarded with CEF_API_ADDED(CEF_EXPERIMENTAL).
This is a more-or-less direct translation of the cefsimple (C++)
project to use C API based on the updated UsingTheCAPI.md docs.
Translation was performed using Claude Code.
Move code signing verification code to libcef_dll_wrapper
and add example checks in cefclient.
Load libcef.dll with code signing checks.
Add a CefScopedLibraryLoader variant for Windows.
Adds new CefDisplayHandler::OnContentsBoundsChange and
CefDisplayHandler::GetRootWindowScreenRect callbacks.
cefclient: Implement the above callbacks and call
CefBrowserHost::NotifyScreenInfoChanged when the root window
bounds change.
cefclient: osr: Use real screen bounds by default. Pass
`--fake-screen-bounds` for the old default behavior.
Load https://tests/window in cefclient for additional
implementation details and usage examples.
- Generated files are now created when running cef_create_projects or
the new version_manager.py tool. These files are still created in the
cef/ source tree (same location as before) but Git ignores them due to
the generated .gitignore file.
- API hashes are committed to Git as a new cef_api_versions.json file.
This file is used for both code generation and CEF version calculation
(replacing the previous usage of cef_api_hash.h for this purpose).
It will be updated by the CEF admin before merging breaking API
changes upstream.
- As an added benefit to the above, contributor PRs will no longer
contain generated code that is susceptible to frequent merge conflicts.
- From a code generation perspective, the main difference is that we now
use versioned structs (e.g. cef_browser_0_t instead of cef_browser_t)
on the libcef (dll/framework) side. Most of the make_*.py tool changes
are related to supporting this.
- From the client perspective, you can now define CEF_API_VERSION in the
project configuration (or get CEF_EXPERIMENTAL by default). This
define will change the API exposed in CEF’s include/ and include/capi
header files. All client-side targets including libcef_dll_wrapper
will need be recompiled when changing this define.
- Examples of the new API-related define usage are provided in
cef_api_version_test.h, api_version_test_impl.cc and
api_version_unittest.cc.
To test:
- Run `ceftests --gtest_filter=ApiVersionTest.*`
- Add `cef_api_version=13300` to GN_DEFINES. Re-run configure, build and
ceftests steps.
- Repeat with 13301, 13302, 13303 (all supported test versions).
Adds new `--show-overlay-browser` command-line flag that creates an
overlay containing an Alloy-style BrowserView. The main BrowserView
may be Chrome- (default) or Alloy-style (add `--use-alloy-style`).
This overlay will only be added to standalone (non-popup) windows.
Popups triggered via the overlay will receive standard Alloy-style
handling in cefclient (e.g. Views-hosted window). Add
`--use-default-popup` for default popup handling.
Add support for building the CEF binary distribution using Bazel
and the default platform toolchain. Tested to work for Windows
x64, MacOS ARM64 and x64 (cross-compile from ARM64), and
Linux x64. Windows x86 (cross-compile from x64) is known to
be broken, see https://github.com/bazelbuild/bazel/issues/22164.
Includes minor changes to tests directory structure to meet
Bazel build requirements.
Adds support for the OnAcceleratedPaint callback. Verified to work
on macOS and Windows. Linux support is present but not implemented
for cefclient, so it is not verified to work.
To test:
Run `cefclient --off-screen-rendering-enabled --shared-texture-enabled`
Split the Alloy runtime into bootstrap and style components. Support
creation of Alloy style browsers and windows with the Chrome runtime.
Chrome runtime (`--enable-chrome-runtime`) + Alloy style
(`--use-alloy-style`) supports Views (`--use-views`), native parent
(`--use-native`) and windowless rendering
(`--off-screen-rendering-enabled`).
Print preview is supported in all cases except with windowless rendering
on all platforms and native parent on MacOS. It is disabled by default
with Alloy style for legacy compatibility. Where supported it can be
enabled or disabled globally using `--[enable|disable]-print-preview` or
configured on a per-RequestContext basis using the
`printing.print_preview_disabled` preference. It also behaves as
expected when triggered via the PDF viewer print button.
Chrome runtime + Alloy style behavior differs from Alloy runtime in the
following significant ways:
- Supports Chrome error pages by default.
- DevTools popups are Chrome style only (cannot be windowless).
- The Alloy extension API will not supported.
Chrome runtime + Alloy style passes all expected Alloy ceftests except
the following:
- `DisplayTest.AutoResize` (Alloy extension API not supported)
- `DownloadTest.*` (Download API not yet supported)
- `ExtensionTest.*` (Alloy extension API not supported)
This change also adds Chrome runtime support for
CefContextMenuHandler::RunContextMenu (see #3293).
This change also explicitly blocks (and doesn't retry) FrameAttached
requests from PDF viewer and print preview excluded frames (see #3664).
Known issues specific to Chrome runtime + Alloy style:
- DevTools popup with windowless rendering doesn't load successfully.
Use windowed rendering or remote debugging as a workaround.
- Chrome style Window with Alloy style BrowserView (`--use-alloy-style
--use-chrome-style-window`) does not show Chrome theme changes.
To test:
- Run `ceftests --enable-chrome-runtime --use-alloy-style
[--use-chrome-style-window] [--use-views|--use-native]
--gtest_filter=...`
- Run `cefclient --enable-chrome-runtime --use-alloy-style
[--use-chrome-style-window]
[--use-views|--use-native|--off-screen-rendering-enabled]`
- Run `cefsimple --enable-chrome-runtime --use-alloy-style [--use-views]`
The client can optionally wait or terminate the render process.
Expose process exit codes via OnRenderProcessTerminated and
CefGetExitCode (fixes#2126).
cefclient: Add a new https://tests/hang page for testing hang behavior.
cefclient: Move message and resource handling to a new BaseClientHandler
class to support loading of test pages in default Chrome UI windows.
This file is no longer required after cherry-picking C++17 migration
changes from https://crbug.com/1320019.
This also fixes compile errors with Xcode 15:
__has_trivial_destructor is deprecated; use __is_trivially_destructible instead
This is intended for usage with frameless windows that show the standard window
buttons, where resizing the title bar height changes the button offset. Returning a
different value from CefWindowDelegate::GetTitlebarHeight and forcing a resize of
the NSWindow's theme frame (see ViewsWindow::NudgeWindow) will update the
title bar height.
To test:
1. Run `cefclient --use-views --hide-frame --show-window-buttons --url=http://tests/window`
2. Enter a new value for title bar height and click the "Set Titlebar Height" button
The cefclient sample app will persist window state across application restart
if run with views, cache_path and persist_user_references enabled.
To test:
1. Run `cefclient --use-views --cache-path=/path/to/cache --persist-user-preferences`
2. Move or resize the window, maximize, minimize, etc.
3. Exit cefclient.
4. Run cefclient again with the same arguments. The previous window state will
be restored.
Change the default stack size to 8 MiB for 64-bit and 0.5 MiB for 32-bit.
CEF's main thread needs at least a 1.5 MiB stack size in order to avoid
stack overflow crashes. However, if this is set in the PE file then other
threads get this size as well, leading to address-space exhaustion in 32-bit
CEF. A new CefRunWinMainWithPreferredStackSize function uses fibers to switch
the main thread to a 4 MiB stack (roughly the same effective size as the
64-bit build's 8 MiB stack) before running any other code.
This change additionally moves the existing Windows-only functions
CefSetOSModalLoop and CefEnableHighDPISupport from cef_app.h to cef_win.h.