Commit Graph

2352 Commits

Author SHA1 Message Date
Marshall Greenblatt
044c82849e chrome: Support configuration of accept language (see issue #2969)
This change adds support for CEF settings configuration of accept_language_list.
If specified, this value will take precedence over the "intl.accept_languages"
preference which is controlled by chrome://settings/languages.
2021-04-28 14:32:30 -04:00
Marshall Greenblatt
02ae4597d8 chrome: Support configuration of user agent and locale (see issue #2969)
This change adds support for CefSettings and command-line configuration of
user_agent, user_agent_product (formerly product_version) and locale.
2021-04-27 12:49:17 -04:00
Marshall Greenblatt
f2f0bfbdb5 Windows: Disable iterator debugging for cef_sandbox builds (fixes issue #3109)
Iterator debugging has been disabled by default (_HAS_ITERATOR_DEBUGGING=0)
for CEF/Chromium builds using clang/LLVM since 2018. Inversely, it is enabled
by default (_ITERATOR_DEBUG_LEVEL=2) for the MSVC Debug build configuration.
In order to minimize configuration-related headaches for MSVC-based clients
we have been building the Debug cef_sandbox.lib with iterator debugging
enabled. Recently, we have identified a number of crashes that may be due to
bugs in current clang/LLVM or MSVC versions but in any case can be resolved by
disabling iterator debugging:

- Crash when loading chrome://sandbox.
- Crash if an application lists libraries that utilize iterators after
  cef_sandbox.lib in the linker order.

To resolve these crashes we will now disable iterator debugging by default
for the cef_sandbox.lib builds. Client applications that link cef_sandbox.lib
will now also need to build with iterator debugging disabled by setting
_HAS_ITERATOR_DEBUGGING=0 or _ITERATOR_DEBUG_LEVEL=0 in their project
configuration (this will be done for you if you use cef_variables.cmake from
the binary distribution).

In addition to the crash fixes mentioned above, this change also:

- Reduces the size of the Debug cef_sandbox.lib by ~10MB.
- May result in faster Debug executables (see https://crbug.com/539996).
2021-04-26 18:21:19 -04:00
Marshall Greenblatt
d330790ec6 ceftests: Add missing newline at end of file 2021-04-23 21:02:12 -04:00
Marshall Greenblatt
af832bf118 Linux: cefclient: Don't use std::make_unique which requires C++14 2021-04-23 21:02:00 -04:00
Marshall Greenblatt
cd9342c39f Update to Chromium version 90.0.4430.85 2021-04-22 21:12:14 -04:00
Marshall Greenblatt
74c66a3a43 Fix extension loading test failure 2021-04-22 13:41:29 -04:00
Marshall Greenblatt
f718c8947c Fix crash closing DevTools window (fixes issue #3111) 2021-04-20 12:18:26 -04:00
Marshall Greenblatt
c6a4331904 chrome: Support configuration of renderer prefs (see issue #2969) 2021-04-17 21:25:34 -04:00
Marshall Greenblatt
af0e86206a Update to Chromium version 90.0.4430.72 2021-04-15 17:34:45 -04:00
Marshall Greenblatt
e37ceabdf8 chrome: Don't rely on CREATE_STATUS_CREATED for disk-based profiles (see issue #2969) 2021-04-15 13:34:22 -04:00
Marshall Greenblatt
7823df5a45 cefclient: Fix slow loading of the Views image cache (see issue #2969) 2021-04-14 22:30:43 -04:00
Marshall Greenblatt
691c9c2dcc Wait for CefBrowserContext initialization (see issue #2969)
With the Chrome runtime, Profile initialization may be asynchronous. Code that
waited on CefBrowserContext creation now needs to wait on CefBrowserContext
initialization instead.
2021-04-14 21:05:50 -04:00
Marshall Greenblatt
c48a79756c Fix crash when navigating to an unregistered scheme (fixes issue #3105)
The policy->CanAccessDataForOrigin CHECK in NavigationRequest::
GetOriginForURLLoaderFactory was failing because unregistered schemes
(which are already considered non-standard schemes) didn't trigger the
registered non-standard scheme allowance that we previously added in
ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin. This change
modifies GetOriginForURLLoaderFactory to always return an opaque/unique
origin for non-standard schemes resulting in unregistered and non-standard
schemes receiving the same treatment.

New test coverage has been added for this condition, and can be run with:
ceftests --gtest_filter=CorsTest.*CustomUnregistered*
2021-04-12 16:53:44 -04:00
Marshall Greenblatt
d4386da6c3 chrome: mac: Fix exception_port_.is_valid() failure (see issue #2969)
Fixes the following startup error:
FATAL:crashpad_client_mac.cc(499) Check failed: exception_port_.is_valid()
2021-04-11 21:46:35 -04:00
Marshall Greenblatt
8656f19907 mac: ceftests: Fix helper app linker errors (see issue #2969) 2021-04-11 21:45:34 -04:00
Marshall Greenblatt
df150f8ae0 chrome: Support usage of the Chrome toolbar from Views (see issue #2969) 2021-04-11 21:44:37 -04:00
Marshall Greenblatt
d98971fc9e chrome: Fix assertion when clicking the incognito profile button (see issue #2969)
Profile::IsIncognitoProfile() currently returns false for CEF incognito profiles
because they are not the primary OTR profile. At the same time, we don't
necessarily want IsIncognitoProfile() to return true for CEF profiles because,
among other things, that causes the BrowserView to apply the dark toolbar theme.
Instead, this change updates ProfileMenu expectations to support the CEF
incognito profiles without otherwise modifying the incognito behavior.

Note that the IsIncognitoProfile() implementation has recently changed in
https://crrev.com/7bf6eb2497 and the conclusions in this commit will likely need
to be revisited in an upcoming Chromium update.
2021-04-11 21:41:25 -04:00
Marshall Greenblatt
10b7a443cb chrome: Fix FrameTest and RequestHandlerTest failures (see issue #2969) 2021-04-09 22:26:09 -04:00
Marshall Greenblatt
fe5b0df2fa chrome: Fix PreferenceTest failures (see issue #2969) 2021-04-09 22:04:35 -04:00
Marshall Greenblatt
5bfcfaab73 Move cookieable scheme configuration to settings (see issue #2969)
The Chrome runtime requires that cookieable scheme information be available
at Profile initialization time because it also triggers NetworkContext creation
at the same time. To make this possible, and to avoid various race conditions
when setting state, the cookieable scheme configuration has been added as
|cookieable_schemes_list| and |cookieable_schemes_exclude_defaults| in
CefSettings and CefBrowserContextSettings. The CefCookieManager::
SetSupportedSchemes and CefBrowserProcessHandler::GetCookieableSchemes methods
are no longer required and have been removed.

This change also modifies chrome to delay OffTheRecordProfileImpl initialization
so that |ChromeBrowserContext::profile_| can be set before
ChromeContentBrowserClientCef::ConfigureNetworkContextParams calls
CefBrowserContext::FromBrowserContext to retrieve the ChromeBrowserContext
and associated cookieable scheme information. Otherwise, the
ChromeBrowserContext will not be matched and the NetworkContext will not be
configured correctly.

The CookieTest suite now passes with the Chrome runtime enabled.
2021-04-09 15:54:31 -04:00
Marshall Greenblatt
f048a5ddba Fix server thread assertion on CEF shutdown (see issue #2969)
The server thread was not guaranteed to be released in the correct scope on
CEF shutdown. This resulted in occasional thread_restrictions assertions on
ceftests shutdown after running the URLRequestTest suite with the Chrome
runtime enabled.
2021-04-09 15:53:45 -04:00
Marshall Greenblatt
9f05dc2447 chrome: Support customization of context menus (see issue #2969) 2021-04-08 19:43:21 -04:00
Marshall Greenblatt
4d20de09f3 Fix URL rewrite on browser creation (see issue #2969)
The WebUITest suite now passes with the Chrome runtime enabled.
2021-04-07 19:23:47 -04:00
Marshall Greenblatt
c04a578821 Avoid potential use-after-free of CefIOThreadState (see issue #2969)
The problem occured while executing multiple URLRequestTest with the Chrome
runtime.
2021-04-07 19:23:41 -04:00
Marshall Greenblatt
44829818b0 chrome: Support client-created request contexts (see issue #2969)
RequestContextTest and URLRequestTest suites now pass with the Chrome runtime
enabled.
2021-04-07 19:22:55 -04:00
Marshall Greenblatt
cd40496573 chrome: Fix CorsTest.RedirectPost307HttpSchemeToCustomNonStandardScheme failure (see issue #2969) 2021-04-05 15:57:07 -04:00
Marshall Greenblatt
210c1d6b4f chrome: Fix NavigationTest and ResourceRequestHandlerTest failures (see issue #2969) 2021-04-05 15:57:00 -04:00
Marshall Greenblatt
c04592e2a7 chrome: Add support for reparenting of popups with Views (see issue #2969) 2021-04-05 15:55:45 -04:00
Marshall Greenblatt
6ad29642e2 Update to Chromium version 90.0.4430.51 2021-04-01 19:48:06 -04:00
Marshall Greenblatt
1b36d3538c Customize the 'platform' crash key value for ARM builds (see issue #2981, see issue #2773) 2021-03-31 11:05:18 -04:00
Marshall Greenblatt
d399c7220a cefclient: Simplify ClientPrintHandlerGtk for single browser usage (see issue #2196) 2021-03-30 12:51:49 -04:00
Marshall Greenblatt
1cd3f8a3af Move GetPrintHandler to CefClient (see issue #2196)
This new location is preferred because we now know the associated CefBrowser
for all CefPrintHandler callbacks.
2021-03-30 12:30:04 -04:00
Marshall Greenblatt
35a360fe66 Remove CefBrowserSettings.web_security (fixes issue #3058) 2021-03-25 13:08:46 -04:00
Marshall Greenblatt
2ecefdf30b Fix crash in MediaRouterEnabled due to missing pref registration (see issue #2900) 2021-03-24 15:14:29 -04:00
Corentin Dumont
0ad85c19aa Windows: Fix out-of-sync timestamps in OSR mode (fixes issue #3102) 2021-03-23 16:14:01 -04:00
Marshall Greenblatt
1232df3646 Fix potential use-after-free of V8TrackArrayBuffer (fixes issue #3074) 2021-03-23 15:58:17 -04:00
Marshall Greenblatt
dc12a89f28 Revert "Fix potential use-after-free of V8TrackArrayBuffer (fixes issue #3074)"
This reverts commit 8d23e96edf.
2021-03-22 19:45:34 -04:00
Marshall Greenblatt
4011b1e2ab Mac: Fix "fatal error: 'include/cef_pack_resources.h' file not found"
This occurs on a clean build of the ceftests target.
2021-03-22 19:45:21 -04:00
Marshall Greenblatt
8d23e96edf Fix potential use-after-free of V8TrackArrayBuffer (fixes issue #3074) 2021-03-22 13:55:18 -04:00
Marshall Greenblatt
2e4c4750b6 Update to Chromium version 90.0.4430.30 2021-03-19 10:21:25 -04:00
Marshall Greenblatt
69a8839ce9 Fix underflow in EventRouterForwarder::HandleEvent (fixes issue #3066) 2021-03-18 14:11:59 -04:00
Yannick
47f15dd307 Remove maximum frame rate limit with OSR (fixes issue #3077) 2021-03-18 17:46:03 +00:00
Dmitry Azaraev
505bf24abb chrome: Add DevTools protocol support (see issue #2969)
Testable with the following:
$ ceftests --enable-chrome-runtime --gtest_filter=DevToolsMessageTest.*
2021-03-18 13:32:56 -04:00
Marshall Greenblatt
a17c59ce1d Fix renderer crash when printing a PDF file (fixes issue #3100) 2021-03-18 13:00:35 -04:00
Marshall Greenblatt
74db00fc89 Update to Chromium version 90.0.4430.0 (#857950)
- Linux ARM builds require use_vaapi=false (see https://crbug.com/1185348)
- Windows official builds require use_thin_lto=false (see https://crbug.com/1177001)
2021-03-18 11:23:00 -04:00
Marshall Greenblatt
1587d6da03 Update ArrayBuffer to use new BackingStore API (fixes issue #3074) 2021-03-12 12:36:47 -05:00
Marshall Greenblatt
c4baba880e Linux: Enable GTK3 by default (see issue #2969)
GTK3 is required by the Chrome runtime. Client applications using GTK2 will
now require a custom build of CEF with use_gtk=false set via GN_DEFINES.
2021-03-01 15:35:31 -05:00
Marshall Greenblatt
020ac1b509 Linux: cefclient: Port to GTK3 (see issue #2969)
GTK3 is required by the Chrome runtime. The cefclient off-screen rendering
example no longer works with Ubuntu 16.04. With end-of-life in April 2021
we are dropping support for 16.04 in the near future in any case.
2021-03-01 15:25:09 -05:00
Marshall Greenblatt
8424f166cc Use the same pak files for the Alloy and Chrome runtimes (see issue #2969)
Chrome currently uses chrome_100_percent.pak, chrome_200_percent.pak,
resources.pak and locales/<locale>.pak files. This change adds CEF
resources to those existing pak files and updates the Alloy runtime to
use them instead of the previous CEF-specific pak files (cef.pak,
cef_100_percent.pak, cef_200_percent.pak, cef_extensions.pak,
devtools_resources.pak) which are no longer generated.

The addition of Chrome resources results in an ~16% (~4.1MB) increase in total
combined pak file size vs. the previous CEF-specific pak files. While a size
increase is not ideal for the Alloy runtime, it seems preferable to the
alternative of distributing separate (and partially duplicated) pak files for
each runtime, which would have added ~9.8MB to the total binary distribution
size.
2021-02-28 16:51:37 -05:00