- 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).
- Use ResetWithReason to report intentional browser side disconnects of
existing Mojo connections. Don't retry for those disconnects.
- Add set_disconnect_with_reason_and_result_handler in Chromium/Mojo to
expose the MojoResult code for failed connections, allowing
identification of connections that are intentionally unbound on the
browser side.
- Optimize initial reconnect delay for known disconnect cases such as
navigation-related and bfcache changes.
- Remove connection timeout and increase total connection deadline by
100% to further reduce crash rates on slower machines.
- Only fail fatally for main frames (not sub-frames) in cases where the
connection fails or disconnects for unknown reasons.
- Improve connection debug logging when running with
`--enable-logging --vmodule=*frame*=1 --log-file=C:\temp\log.txt`
Pass a new |popup_id| parameter to OnBeforePopup and call a new
OnBeforePopupAborted callback if the popup is aborted before
OnAfterCreated is called for the popup browser. Add new
CefBrowserHost::GetBrowserByIdentifier and GetOpenerIdentifier
methods to assist with retrieval of associated browsers.
In cefclient, clean up state when a popup is aborted and close
any associated popup browsers when the opener browser is closed.
This also works when running with `--use-default-popup`.
These linker errors impact CEF builds but not Chromium builds due
to differences in application structure, and are becoming more
common with ongoing Chromium code refactoring.
When running via ASAN it may be necessary to set
`ASAN_OPTIONS=detect_odr_violation=0` to work around
https://github.com/google/sanitizers/issues/1017
Some downloaded file types [1] default to opening in a Browser. Open
requests for these file types originating from the Download bubble UI
should route to the source Browser (call OnOpenURLFromTab). If
OnOpenURLFromTab is unhandled proceed with the default Chrome behavior
of opening the URL in a new default Browser.
[1] PDF, html, etc. For the complete list of file types see
ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile.
Found using a CEF build with clang_use_chrome_plugins=true
and treat_warnings_as_errors=false.
This change rewrites remaining raw pointers reported by
chromium-rawptr checker and fixes a build error reported
by StackAllocatedChecker.
The menu may not be running in the following cases:
- If the menu is empty (e.g. cleared in OnBeforeContextMenu).
- If the menu is disabled (see e.g. RenderViewContextMenuViews::Show).
- When the run call blocks until the menu is dismissed (macOS behavior).
We explicitly clean up in these cases instead of waiting for OnMenuClosed
which will otherwise never be called for the first 2 cases.
Menu run status is exposed via new ContextMenuDelegate and
RenderViewContextMenuBase methods.
This avoids a bug in clang + MSVC STL when using the default three-way
comparison operator with base::TimeDelta. The compiler does not throw
away the function call to the `std::_Literal_zero_is_expected` symbol,
which is deliberately undefined.
See also https://github.com/microsoft/STL/issues/4359#issuecomment-2042911928
File dialogs that specify mime type (e.g. "image/*") accept filters will pass
those values unchanged to the OnFileDialog |accept_filters| parameter. The
default dialog implementation will show those filters in addition to a combined
"Custom Files" filter. This is a change from preexisting Google Chrome
behavior where only the combined "Custom Files" filter is displayed, and
restores CEF behavior that existed prior to 2ea7459a89.
Document the fact that OnFileDialog may be called twice, once before MIME type
expansion and once afterwards.
Add new OnFileDialog |accept_extensions| and |accept_descriptions| parameters
for MIME type extensions and descriptions.
Details: This change adds a SelectFileDialog::FileTypeInfo::extension_mimetypes
member and improves the logic in FileSelectHelper::GetFileTypesFromAcceptType
and file_dialog_manager.cc SelectFileToFileChooserParams to support recall of
the source mime type when populating the FileChooserParams structure.
To test:
- Run `ceftests --gtest_filter=DialogTest.*`
- Run `cefclient --url=https://tests/dialogs`
Also enables logging by default for Release builds (previously
required the `--enable-logging` flag). Logging can still be
disabled by passing the `--disable-logging` flag.
To test:
- Run `cefclient --enable-chrome-runtime --use-alloy-style
--use-chrome-style-window [--background-color=green]`
- OS and Chrome theme changes behave as expected.