Commit Graph

1074 Commits

Author SHA1 Message Date
Marshall Greenblatt b2274f534d Update to Chromium version 119.0.6045.0 (#1204232)
Mac: 13.5+ build system w/ 14.0 base SDK (Xcode 15.0) is now required.
2023-10-24 10:56:39 -04:00
Marshall Greenblatt e6a96e2bec chrome: views: Fix close of popup windows when parent is destroyed
When running ceftests with Views enabled always close the CefWindow
when the browser is destroyed and wait for both CefBrowser and
CefWindow destruction before signaling test completion.

To test:
Run `ceftests --enable-chrome-runtime --use-views
     --gtest_filter=FrameHandlerTest.OrderMainPopup*:RequestContextTest.PopupNavDestroyParent*`
2023-10-17 11:48:11 -04:00
Nik Pavlov 8d7001adc3 Replace ReadOnlySharedMemoryRegion with WritableSharedMemoryRegion (see #3502)
Write access to the shared memory region is required because JavaScript lacks
the capability to create read-only ArrayBuffers. When a user attempts to modify
an ArrayBuffer that utilizes a ReadOnlySharedMemoryRegion as its BackingStore
it triggers an access violation.

Note that this pull request may be reverted in the future if JavaScript adds
read-only ArrayBuffer support.
2023-10-16 22:43:29 +00:00
Marshall Greenblatt f3e92b45fc Fix incorrect includes (see #3284) 2023-10-09 13:13:00 -04:00
Marshall Greenblatt 64c2dc13ca Remove CefBrowserSettings.accept_language_list (fixes #3555)
Chromium does not support configuration of this value on a per-Browser basis.
2023-10-05 18:28:49 -04:00
Marshall Greenblatt a8a96235a8 chrome: Set prefs for accept_language_list on Profile init (fixes #3579) 2023-10-05 16:43:45 -04:00
Marshall Greenblatt 29938f9cb0 Add new CanZoom/Zoom API (fixes #3284)
Add a simpler CanZoom/Zoom API as an alternative to the more error-prone
SetZoomLevel/GetZoomLevel API. Both APIs are now implemented for both runtimes.
With the Chrome runtime a zoom notification bubble will be displayed unless
CefBrowserSettings.chrome_zoom_bubble is set to STATE_DISABLED.

To test:
- Run cefclient and select zoom entries from the Tests menu.
- chrome: Run cefclient with `--hide-chrome-bubbles` command-line flag to hide
  the zoom notification bubble.
2023-10-05 13:22:44 -04:00
Marshall Greenblatt c7d4d9690c Add missing media router prefs registration (fixes #3570) 2023-09-29 13:52:22 -04:00
Marshall Greenblatt 39e64d8cc9 chrome: Standardize fullscreen transition behavor/callbacks (fixes #3571)
Use the same code path for all fullscreen transitions so that Chrome UI updates
correctly. All user-initiated fullscreen transitions now result in
CefWindowDelegate::OnWindowFullscreenTransition callbacks.
2023-09-28 17:44:35 -04:00
Marshall Greenblatt 27c6a4eabc Update to Chromium version 118.0.5993.0 (#1192594) 2023-09-20 12:07:47 -04:00
Marshall Greenblatt ef6ae3071d chrome: Support frameless document PiP window with draggable regions (fixes #3566) 2023-09-14 12:41:24 -04:00
Marshall Greenblatt f808926fbd chrome: Add support for CefBrowserViewDelegate::OnGestureCommand 2023-08-31 13:28:27 -04:00
Marshall Greenblatt a4b27a7248 Update to Chromium version 117.0.5938.0 (#1181205) 2023-08-15 12:07:58 -04:00
Julien Bouix 01e1a0f44d alloy: Add setting to customize log items 2023-08-07 13:40:40 -04:00
Marshall Greenblatt 8b46735b79 Update to Chromium version 117.0.5895.0 (#1171312) 2023-07-20 18:11:34 -04:00
Marshall Greenblatt 1353677a98 Don't run UI thread tasks after calling CefQuitMessageLoop
This avoids a situation where misbehaving clients may cause the
application to continue running indefinitely by posting new UI
thread tasks after calling CefQuitMessageLoop.
2023-07-11 15:59:52 +03:00
Marshall Greenblatt 04c042d9d1 linux: Fix invalid argument type in CHECK 2023-06-28 11:46:38 +03:00
Marshall Greenblatt 650755a092 Update to Chromium version 116.0.5845.0 (#1160321) 2023-06-28 11:43:11 +03:00
Marshall Greenblatt 71c588c16a alloy: mac/linux: Support OS execution via OnProtocolExecution (fixes #1340) 2023-06-26 13:08:04 +03:00
Marshall Greenblatt 0b99f92e97 views: Add support for modal browser dialogs
A modal dialog is a child CefWindow that implements some special behaviors
relative to a parent CefWindow. Like any CefWindow it can be framed with
titlebar or frameless, and optionally contain draggable regions (subject to
platform limitations described below). Modal dialogs are shown centered on
the parent window (inside a single display) and always stay on top of the
parent window in z-order. Sizing behavior and available window buttons are
controlled via the usual CefWindowDelegate callbacks. For example, the dialog
can have a preferred size with resize, minimize and maximize disabled (via
GetPreferredSize, CanResize, CanMinimize and CanMaximize respectively).

This change adds support for two modality modes. With window modality all
controls in the parent window are disabled. With browser modality only the
browser view in the parent window is disabled.

Both modality modes require that a valid parent window be returned via
GetParentWindow. For window modality return true from IsWindowModalDialog
and call CefWindow::Show. For browser modality return false from
IsWindowModalDialog (the default value) and call
CefWindow::ShowAsBrowserModalDialog with a reference to the parent window's
browser view.

Window modal dialog behavior depends on the platform. On Windows and
Linux these dialogs have a titlebar and can be moved independent of the
parent window. On macOS these dialogs do not have a titlebar, move with
the parent window, and do not support draggable regions (because they are
implemented using sheets). On Linux disabling the parent window controls
requires a window manager the supports _NET_WM_STATE_MODAL.

Browser modal dialog behavior is similar on all platforms. The dialog will
be automatically sized and positioned relative to the parent window's
browser view. Closing the parent window or navigating the parent browser
view will dismiss the dialog. The dialog can also be moved independent of
the parent window though it will be recentered when the parent window
itself is resized or redisplayed. On MacOS the dialog will move along with
the parent window while on Windows and Linux the parent window can be moved
independently.

To test: Use the Tests > Dialog Window menu option in cefclient with Views
enabled (`--use-views` or `--enable-chrome-runtime` command-line flag).
Browser modal dialog is the default behavior. For window modal dialog add
the `--use-window-modal-dialog` command-line flag.
2023-06-21 11:18:24 +03:00
Marshall Greenblatt 05930b7bc9 views: win: Use black title bar with dark mode 2023-06-21 11:18:16 +03:00
Marshall Greenblatt b5386249bd alloy: Remove CefSettings.user_data_path (fixes #3511)
This change replaces existing CefSettings.user_data_path usage with
CefSettings.root_cache_path for better alignment with the Chrome runtime.
All files should now be written inside the root_cache_path directory.
2023-06-06 17:41:57 +03:00
Chris Frank 36a645ffd8 linux: alloy: Fix window resize after context menu dismissal (fixes #3466) 2023-06-06 12:33:52 +00:00
Marshall Greenblatt 5042d71408 Remove CEF-specific integer and char16 typedef's (see #3507) 2023-06-01 19:32:36 +03:00
Marshall Greenblatt 695ee2a041 Update to Chromium version 115.0.5790.0 (#1148114)
- Mac: 13.3 SDK (Xcode 14.3) is now required
2023-06-01 13:44:39 +03:00
Nik Pavlov eb63f9e7ae alloy: views: mac: Add three-finger-swipe navigation gesture support
This adds support for the three-finger-swipe navigation gesture with
Alloy/Views. The default implementation matches the Chrome runtime
and navigates the browser back/forward. We also add an Alloy/Views-
specific client callback in CefBrowserViewDelegate for optional
custom handling of the gesture event.
2023-05-26 09:05:33 +00:00
Marshall Greenblatt 5707889555 Add methods for configuring website/content settings (fixes #3490)
This approach is now used to allow popups on a case-by-case basis in
tests instead of globally disabling the popup blocker with the Chrome
runtime.
2023-05-25 11:15:06 +00:00
Marshall Greenblatt e5334a5a18 mac: Enable ARC in libcef (fixes #3496)
Also enables debugging of zombie Objective-C objects.
2023-05-09 18:26:47 +03:00
Marshall Greenblatt dc9e64308a Replace NOTREACHED() with DCHECK(false) (fixes #3500)
Restores the old behavior of assertion in Debug build only.
2023-05-08 18:36:00 +03:00
Takashi Hashida cf14b2a972 Add CefDownloadItem IsInterrupted and GetInterruptReason methods (fixes #3486) 2023-05-06 16:11:16 +03:00
Marshall Greenblatt de4f9e8908 tests: Change HTTP test URLs to HTTPS
This avoids unexpected HTTP to HTTPS redirects which cause test failures with
the Chrome runtime.
2023-05-05 22:53:16 +03:00
Marshall Greenblatt ab94a13522 Update to Chromium version 114.0.5735.0 (#1135570)
- Mac: 13.3 SDK (Xcode 14.3) is now supported (see https://crbug.com/1431897).
- Mac: Removed UnderlayOpenGLHostingWindow which is no longer used.
2023-05-05 22:53:16 +03:00
Marshall Greenblatt 09c4142dad chrome: mac: Add Alerts helper app (fixes #3181)
Some Chromium code cleanup will follow in
https://chromium-review.googlesource.com/c/chromium/src/+/4456752
2023-04-21 14:39:19 -04:00
Marshall Greenblatt 7ade772e0b chrome: mac: Support dispatch of window commands (see #3462) 2023-04-20 12:26:07 -04:00
Marshall Greenblatt a39c2a0068 chrome: Improve positioning of the "Find" widget (fixes #3461)
The "Find" widget will be excluded from regions near the edges of the window
that contain overlays, draggable regions or titlebar.
2023-04-20 12:26:07 -04:00
Marshall Greenblatt 17cab6d955 views: mac: Fix overlay association with host CefWindow (fixes #3456) 2023-04-20 12:23:57 -04:00
Nik Pavlov cad2498d87 mac: views: Add CefWindowDelegate::OnWindowFullscreenTransition 2023-04-20 14:59:15 +00:00
Marshall Greenblatt 2094a8e221 alloy: Fix incorrect rendering of PiP overlay on mouseover (fixes #3482)
Initialize the Chrome color mixer so that ColorProvider returns the expected
semi-transparent color for overlay background in video_overlay_window_views.cc
instead of the default opaque red color (kPlaceholderColor).
2023-04-11 14:08:36 -04:00
Marshall Greenblatt 4b3c3132cb Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
Nik Pavlov c83b3cda24 views: mac: Support dynamic resize of title bar height (see #3189)
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
2023-03-16 17:19:50 +00:00
Marshall Greenblatt 0a2c7a1070 chrome: Move ThreadProfiler initialization to the UI thread (fixes #3465)
ThreadProfiler::CreateAndStartOnMainThread and SetMainThreadTaskRunnerImpl
should be called on the same thread.
2023-03-14 15:22:58 -04:00
Marshall Greenblatt 178a44bd18 Rewrite issue links to GitHub (see #3464) 2023-03-13 13:50:48 -04:00
Marshall Greenblatt 14dd0c0d06 chrome: Add ability to hide toolbar and app menu contents (see issue #3280)
This change adds new CefCommandHandler callbacks for optionally hiding
specific Chrome toolbar icons, buttons and app menu items.

To test: Run `cefclient --enable-chrome-runtime --filter-chrome-commands`.
Most icons, buttons and app/context menu items will be hidden.
2023-03-08 12:02:49 -05:00
Marshall Greenblatt d509d5833d chrome: Don't show gray background during browser load (fixes issue #3459) 2023-03-06 15:55:55 -05:00
Marshall Greenblatt f3b570cf8e win: Remove CefEnableHighDPISupport function (fixes issue #3452)
High-DPI support is now enabled by default in Chromium.
2023-03-03 16:07:29 -05:00
Marshall Greenblatt 584b19967a Update to Chromium version 112.0.5615.0
- Windows: VS2022 and Win11 SDK 10.0.22621.0 are now required.
2023-03-03 09:59:30 -05:00
Nik Pavlov 276423dcfb views: mac: Fix frameless window behavior (fixes issue #3189)
Frameless windows now display as expected. Default traffic light buttons can
optionally be shown at configurable vertical position. Layout respects text
direction.
2023-02-28 18:34:12 +00:00
Marshall Greenblatt 42f351a40d alloy: Fix theme configuration on startup (fixes issue #3449) 2023-02-22 17:11:47 -05:00
Marshall Greenblatt 80cfb3c97c chrome: Fix request interception with active extension (fixes issue #3444)
Support chaining of proxies in WillCreateURLLoaderFactory.
2023-02-17 15:18:10 -05:00
Marshall Greenblatt 73082fd2ce chrome: Make primary user profile the default global context (see issue #3444)
Chrome is always loading the primary user profile by default, so with this
change the CEF behavior more accurately reflects reality. Incognito contexts
can still be created explicitly via CefRequestContext::CreateContext.

Prior to this change, the default for the global context was an Incognito
profile based on the primary user profile. That caused request interception
to be bypassed in WillCreateURLLoaderFactory for profiles associated with
the "New window" and "New incognito window" commands. Those profiles, while
also being (or based on) the primary user profile, did not match the specific
Incognito profile assigned to the default global context.

After this change, the "New window" and "New incognito window" commands will
match the default global context when executed on a browser that was created
using the primary user profile.
2023-02-17 14:36:13 -05:00