Commit Graph

2433 Commits

Author SHA1 Message Date
Marshall Greenblatt 41b64e428c Rename SendFocusEvent to SetFocus (fixes issue #866)
Also removes CefBrowserHost::SendFocusEvent. Use the existing SetFocus method
instead.
2021-09-27 10:50:12 +03:00
Marshall Greenblatt a74fa88812 Linux: Fix PrintToPDF crash (fixes issue #3178) 2021-09-23 06:01:24 -07:00
Marshall Greenblatt dc1f934865 views: Support configuration of initial window show state
Known issues:
- Exiting full-screen mode currently crashes with the Chrome runtime
  (see issue #3182).
2021-09-23 14:41:47 +03:00
Marshall Greenblatt 2b40cab3fe Update cef_api_hash.h 2021-09-22 14:23:48 +03:00
Martin Falk d4a2f72d10 Use absolute namespace in cef_logging.h (fixes issue #3185) 2021-09-22 14:09:54 +03:00
Aviv Duek 0cbc0a757e Add two missing resource types to cef_resource_type_t enum 2021-09-22 14:09:53 +03:00
Mathieu Lafon 6dad2c45ee osr: Implement InvalidateLocalSurfaceIdOnEviction (fixes issue #2483)
This fixes an empty-rendering issue when the view is shown after being
evicted.
2021-09-22 11:09:38 +00:00
Alex Maitland 28599ae1a5 alloy: win: Fix loading of some mouse cursors (fixes issue #3174) 2021-09-22 09:17:27 +00:00
Marshall Greenblatt 0cee138670 views: cefclient: Add missing <algorithm> include for std::max 2021-09-22 12:08:59 +03:00
Marshall Greenblatt 1eba937874 views: cefclient: Fix VS2019 compile error 2021-09-22 12:08:59 +03:00
Marshall Greenblatt 5782fdca16 Update to Chromium version 95.0.4638.0 (#920003)
Known issues:
- Windows ARM64 builds are currently failing due to
  https://crbug.com/1242884#c31
2021-09-22 12:08:24 +03:00
Josip Sokcevic 0a10fd4506 Update automate-git script to use main branch (fixes issue #3141)
chromium/src now has main as the default branch, and has
Cr-Commit-Position with main ref too.
2021-09-17 12:48:21 +03:00
Marshall Greenblatt 84117f2d1b Don't use NotificationStateLock for GetMainFrame (see issue #2421)
This causes a race related to |notification_state_lock_| assignment when
GetMainFrame is called from multiple threads. GetMainFrame doesn't
trigger any notifications so it shouldn't need that lock. Instead, only
use NotificationStateLock on the UI thread.
2021-09-16 18:25:44 +03:00
Marshall Greenblatt db807e804a alloy: Fix FrameHandlerTest failures with BackForwardCache enabled (see issue #2421)
To test:
Run `ceftests --gtest_filter=FrameHandlerTest.OrderSub*
              --enable-features=BackForwardCache`
2021-09-16 18:25:44 +03:00
Marshall Greenblatt 7a56371b84 Fix draggable region update with BackForwardCache enabled (see issue #2421)
When BackForwardCache is enabled and the user navigates the main frame
back/forward a new RFH may be created for an existing main frame GlobalId value
and CefFrameHostImpl (e.g. an object that was previously Detach()ed after main
frame navigation called SetMainFrame, but for which RenderFrameDeleted was not
subsequently called due to insertion in the BackForwardCache). In this case we
can re-attach the new RFH to the existing main frame CefFrameHostImpl in
RenderFrameHostStateChanged and resume processing of messages.

Swapping back/forward to an existing (already loaded) renderer does not trigger
new notifications for draggable regions (e.g. RenderFrameObserver::
DraggableRegionsChanged is not called by default). We therefore explicitly
request an update of draggable regions by sending the DidStopLoading message to
the renderer.

A new |reattached| parameter is added to CefFrameHandler::OnFrameAttached to
support identification of BackForwardCache usage by the client.

To test with unit tests:
Run `ceftests --gtest_filter=DraggableRegionsTest.DraggableRegionsCrossOrigin
              --enable-features=BackForwardCache`

To test manually:
1. Run `cefclient --enable-features=BackForwardCache --use-views
   --url=http://tests/draggable`, note that draggable regions work.
2. Load https://www.google.com via the address bar, note that draggable regions
   are removed.
3. Go back to http://tests/draggable, note that draggable regions work.
4. Go forward to https://www.google.com, note that draggable regions are
   removed.
2021-09-16 18:25:43 +03:00
Marshall Greenblatt b3f5d7dd59 alloy: Enable BackForwardCache support (see issue #2421)
BackForwardCache is currently being tested via field trials (see
https://crbug.com/1171298) and can be explicitly disabled using the
`--disable-back-forward-cache` or `--disable-features=BackForwardCache`
command-line flags. The default behavior now matches the Chrome runtime.
2021-09-16 18:25:43 +03:00
Marshall Greenblatt 4a44e16a09 views: Add support for absolute positioned overlay views.
To test:
Run `cefclient.exe --use-views --hide-frame --hide-controls`
Add `--enable-chrome-runtime` for the same behavior using the Chrome location
bar instead of a text field.
2021-09-16 18:25:43 +03:00
Shezan Baig 6f6072b857 Fix download via the PDF extension 2021-09-09 07:50:10 +00:00
Marshall Greenblatt 0fa40110e3 Linux: Fix ld.lld: error: relocation R_X86_64_TPOFF32 cannot be used with -shared 2021-08-24 17:43:02 -04:00
Marshall Greenblatt 92f67ee847 Check in fused GTest files
The fuse_gtest_files.py script was removed from GTest in
https://github.com/google/googletest/commit/47f819c3ca.
Consequently we can no longer generate these files at runtime.
2021-08-24 17:43:02 -04:00
Marshall Greenblatt cf4457bbb3 Linux: Pass log-file to zygote subprocesses
This fixes a DCHECK(!log_file.empty()) due to commit 2ecf6f1.
2021-08-24 17:43:02 -04:00
Marshall Greenblatt 25c1947f1d Update to Chromium version 94.0.4606.0 (#911515) 2021-08-24 17:43:02 -04:00
Marshall Greenblatt 955097ea77 Remove usage of FrameTreeNode IDs (see issue #2421)
With the introduction of prerendering in Chromium it is now possible for
RenderFrameHosts (RFH) to move between FrameTrees. As a consequence we can no
longer rely on FrameTreeNode IDs to uniquely identify a RFH over its lifespan.
We must now switch to using GlobalRenderFrameHostId (child_id, frame_routing_id)
instead for that purpose. Additionally, we simplify existing code by using the
GlobalRenderFrameHostId struct in all places that previously used a
(render_process_id, render_frame_id) pair, since these concepts are equivalent.

See https://crbug.com/1179502#c8 for additional background.
2021-08-19 19:41:44 -04:00
Marshall Greenblatt cfdec92624 Fix ExecuteJavaScript failure with null CefRenderProcessHandler (see issue #2421)
When CefApp::GetRenderProcessHandler returned null
CefRenderFrameObserver::DidCreateScriptContext was returning early (not
calling CefFrameImpl::OnContextCreated) and consequently queued actions
such as JavaScript were never executed.
2021-08-18 18:08:00 -04:00
Marshall Greenblatt b4ab321a79 Remove unicode character from cef_bind_internal.h
This can cause compile errors on non-English Windows versions.
2021-08-16 13:22:39 -04:00
Marshall Greenblatt 2ecf6f1070 Fix duplicate log-file entry on sub-process command-line 2021-08-11 13:28:52 -04:00
Marshall Greenblatt f435c3af9e Linux: Update user data path docs (see issue #3149) 2021-08-11 13:15:03 -04:00
Marshall Greenblatt ee090039c7 Mac: Update CFBundleIdentifier for the CEF framework 2021-08-11 12:38:43 -04:00
Marshall Greenblatt 17d2d13030 widevine: Fix ARM compile error due to unused variable (see issue #3149)
alloy_browser_main.cc:223:17: error: unused variable 'cus' [-Werror,-Wunused-variable]
    auto* const cus = g_browser_process->component_updater();
2021-08-10 12:05:48 -04:00
Marshall Greenblatt 240b869db5 widevine: Use component updater with the Alloy runtime (fixes issue #3149)
Widevine CDM binaries will be downloaded on supported platforms shortly after
application startup. Widevine support will then become available within a few
seconds after successful installation on Windows or after the next application
restart on other platforms. The CDM files will be downloaded to a "WidevineCdm"
directory inside the `CefSettings.user_data_path` directory.

Pass the `--disable-component-update` command-line flag to disable Widevine
download and installation. Pass the `--component-updater=fast-update` command-
line flag to force Widevine download immediately after application startup.

See the related issue for additional usage details.
2021-08-09 21:10:45 -04:00
Marshall Greenblatt eaf581e544 chrome: Fix AssertBlockingAllowed() with disk-based Profile creation (see issue #2969) 2021-08-04 15:23:49 -04:00
Marshall Greenblatt ad71ec9fdf views: Fix multiple issues with hide-frame (fixes issue #3168) 2021-08-04 14:31:08 -04:00
Marshall Greenblatt 39dbdf8ddb Mac: ceftests: Fix component build error due to unresolved symbols 2021-07-30 13:27:24 -04:00
Marshall Greenblatt a94e113410 Win/Mac: Generate build configs for the native host architecture by default (see issue #2773, see issue #2981)
When building on an ARM64 host the ARM64 configs (arm64) will be generated by
default and the AMD64 configs (x86,x64) will only be generated if the
CEF_ENABLE_AMD64=1 env variable is set.

When building on an AMD64 host the AMD64 configs (x86,x64) will be generated by
default and the ARM64 configs (arm64) will only be generated if the
CEF_ENABLE_ARM64=1 env variable is set.
2021-07-29 13:41:07 -04:00
Marshall Greenblatt 0cfa65b48c Fix gclient vpython3 install error on automated builders (see https://crbug.com/1231439) 2021-07-28 12:13:16 -04:00
Marshall Greenblatt 6f819707b0 chrome: Linux: Fix ceftest DraggableRegionsTest.DraggableRegions failure (see issue #2969) 2021-07-27 19:03:21 -04:00
Marshall Greenblatt 92ec2dcbdd Fix ceftest failures with BackForwardCache enabled (see issue #2421)
When BackForwardCache is enabled the old RFH tree may be cached instead of being
immediately deleted as a result of main frame navigation. If a RFH is cached
then delivery of the CefFrameHandler::OnFrameDetached callback will be delayed
until the the RFH is ejected from the cache (possibly not occurring until the
browser is destroyed). This change in OnFrameDetached timing was causing
FrameHandlerTest.OrderSubCrossOrigin* to fail, and the inclusion of cached
frames in CefBrowserInfo::GetAllFrames was causing
FrameTest.NestedIframesDiffOrigin to fail.

BackForwardCache is currently being tested via field trials (see
https://crbug.com/1171298) and can be explicitly disabled using the
`--disable-back-forward-cache` or `--disable-features=BackForwardCache`
command-line flags.
2021-07-27 19:03:21 -04:00
Marshall Greenblatt 645b62257c chrome: Fix potential UAF of ChromeBrowserContext and Profile (see issue #2969) 2021-07-27 19:03:21 -04:00
Marshall Greenblatt b4ea0496e7 Update to Chromium version 93.0.4577.0 (#902210) 2021-07-27 19:03:09 -04:00
campersau 1ffa5528b3 Windows: cefclient: Map Shift+Ctrl+Alt to Shift+AltGr for OSR (see issue #3026) 2021-07-19 15:55:43 +00:00
Vladislav 2be59f6edd Translate additional CEF modifiers to EF_* flags (see issue #2597) 2021-07-19 15:52:36 +00:00
Marshall Greenblatt 103fe12b72 Linux: Fix SchemeHandlerTest.Custom*StandardNoResponse test failures 2021-06-24 20:55:29 -04:00
Marshall Greenblatt 7efac13ac1 gtest: Add plugin for TeamCity integration
Automatically report unit tests to the TeamCity server if run within TeamCity.
See tests/gtest/teamcity/README.cef for details.

To test: Set the TEAMCITY_PROJECT_NAME environment variable and run ceftests.
2021-06-24 17:00:21 -04:00
Marshall Greenblatt 50f627b07e cmake: Windows: Fix ceftests ARM64 unresolved external symbol GetDeviceCaps (see issue #2773, see issue #3140) 2021-06-23 13:27:42 -04:00
Marshall Greenblatt 28c9e9db35 Update distribution build requirements (see issue #3140) 2021-06-23 13:00:34 -04:00
Marshall Greenblatt 9efd3dc8ee Fix compile errors with VS2019 v16.9.3 and GCC v7.5.0 (see issue #3140) 2021-06-23 13:00:34 -04:00
Marshall Greenblatt 529b91bc6e tests: Convert usage of base::Bind to Once or Repeating (see issue #3140) 2021-06-19 17:19:32 -04:00
Marshall Greenblatt ed1840ddb5 wrapper: Convert usage of base::Bind to Once or Repeating (see issue #3140) 2021-06-19 15:35:12 -04:00
Marshall Greenblatt cc2759d07e Add base::OnceClosure support in cef_closure_task.h (see issue #3140) 2021-06-18 14:19:11 -04:00
Marshall Greenblatt 3545e20b01 ceftests: Don't use base::Bind in object constructor (see issue #3140)
Fixes the following error:
[FATAL:cef_bind_internal.h(868)] Check failed: receiver->HasAtLeastOneRef().
base::Bind{Once,Repeating}() refuses to create the first reference to ref-counted
objects. That typically happens around PostTask() in their constructor, and such
objects can be destroyed before `new` returns if the task resolves fast enough.
2021-06-18 13:42:32 -04:00