-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chrome: Support top offset for dialogs/popups with frameless window #3628
Comments
Dialog position is retrieved via BrowserViewLayout::WebContentsModalDialogHostViews::GetDialogPosition. For alert box (load https://tests/dialogs, click "Show Alert" button)
For modal dialog (select Tests > Dialog Window)
|
The |browser_view_layout_->dialog_top_y_| value is configured in BrowserViewLayout::LayoutBookmarkAndInfoBars. Running as: The |top| and |browser_view_y| arguments are both 0, so |dialog_top_y_| becomes -3 (kConstrainedWindowOverlap value)
|
The |top| value passed to LayoutBookmarkAndInfoBars comes from BrowserFrame::GetTopInset. We don't want to change that value because it will offset the whole BrowserView downwards. Instead, we should add a new callback that directly modifies the value assigned to |dialog_top_y_| in LayoutBookmarkAndInfoBars. |
Dialogs will be excluded from regions near the top of the window that contain overlays, draggable regions or titlebar.
Is your feature request related to a problem? Please describe.
By default, Chrome/Chromium shows dialogs/popups immediately underneath the address bar. Frameless windows often do not have an address bar or title bar so dialogs/popups are shown aligned with the top of the window. It would be better to offset these windows either explicitly or implicitly, similar to #3461.
Describe the solution you'd like
Implement implicit offset logic similar to #3461.
Describe alternatives you've considered
Add a new CefWindowDelegate callback for retrieving the top window offset.
The text was updated successfully, but these errors were encountered: