cef/patch/patches
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
..
base_command_line_1872.patch Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
base_sandbox_2743.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
base_sandbox_3519.patch win: Fix MSVC compile errors in registry.cc (fixes #3519) 2023-05-30 11:57:41 +03:00
base_test_4396276.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
blink_web_element_4200240.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
browser_scheduler.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
browser_security_policy_1081397.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
browser_web_ui_controller_factory.patch Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
build.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_background_mode_1100085.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_browser.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_content_settings.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_context_menus.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_dialogs_native.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_dialogs_widget.patch views: Add support for modal browser dialogs 2023-06-21 11:18:24 +03:00
chrome_browser_extensions.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
chrome_browser_frame_mac.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_net_proxy.patch Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
chrome_browser_permission_prompt.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_privacy_1119417.patch Update to Chromium version 93.0.4577.0 (#902210) 2021-07-27 19:03:09 -04:00
chrome_browser_profile_menu.patch Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
chrome_browser_profiles.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_safe_browsing.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_browser_themes.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_plugins.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_pref_watcher.patch Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
chrome_renderer.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_runtime.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
chrome_runtime_views.patch mac: chrome: Fix crash in BrowserView::ShouldHideUIForFullscreen (fixes #3527) 2023-06-06 12:05:02 +03:00
chrome_utility_client.patch Update to Chromium version 111.0.5563.0 (#1097615) 2023-02-03 13:00:26 -05:00
component_build.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
content_2015.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
content_main_654986.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
crashpad_1995.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
crashpad_tp_1995.patch Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
embedder_product_override.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
extensions_1947.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
font_family_cache_1501.patch Update to Chromium version 109.0.5414.0 (#1070088) 2022-11-17 12:50:15 -05:00
gn_config.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
gritsettings.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
libxml_visibility.patch Update to Chromium version 109.0.5414.0 (#1070088) 2022-11-17 12:50:15 -05:00
linux_assets_path_1936.patch Update to Chromium version 112.0.5615.0 2023-03-03 09:59:30 -05:00
linux_atk_1123214.patch Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
linux_blink_thread_local.patch Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
linux_bluetooth_1319006.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
linux_chrome_widevine_3149.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
linux_glib_deprecated_volatile.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
linux_printing_context.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
mac_event_observer_2539.patch Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
mac_fling_scheduler_2540.patch Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
message_loop.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
message_pump_mac_2495.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
metrics_system_profile.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
mime_handler_view_guest_1565_2727.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
net_cookie_flags.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
net_test_server_3798752.patch Update to Chromium version 112.0.5615.0 2023-03-03 09:59:30 -05:00
osr_fling_2745.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
print_preview_123.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
printing_context_2196.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
renderer_host_1070713.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
resource_bundle_2512.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
runhooks.patch Update to Chromium version 113.0.5672.0 (#1121455) 2023-04-05 17:48:51 -04:00
rwh_background_color_1984.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
screen_1443650.patch views: Add support for modal browser dialogs 2023-06-21 11:18:24 +03:00
services_network_2622.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
services_network_2718.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
set_resize_background_color.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
storage_incognito_2289.patch Update to Chromium version 114.0.5735.0 (#1135570) 2023-05-05 22:53:16 +03:00
trace_event.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
ui_dragdrop_355390.patch Update to Chromium version 109.0.5414.0 (#1070088) 2022-11-17 12:50:15 -05:00
ui_views_widget_type.patch views: Add support for modal browser dialogs 2023-06-21 11:18:24 +03:00
views_1749_2102_3330.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
views_widget.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
viz_osr_2575.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
web_contents_1257_1565.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
webkit_plugin_info_2015.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
webkit_popups.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
webkit_runtime_enabled_features.patch Update to Chromium version 110.0.5481.0 (#1084008) 2023-01-04 21:36:29 -05:00
webui_2037.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
win_cpp17_msvc_sandbox_2819.patch Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
win_sandbox_3210.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
win_sandbox_policy.patch Update to Chromium version 115.0.5790.0 (#1148114) 2023-06-01 13:44:39 +03:00
win_shell_dialogs_3294.patch Update to Chromium version 111.0.5563.0 (#1097615) 2023-02-03 13:00:26 -05:00