mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
headless-browser: Send a dummy screen rect to WebContent
The window.open spec assumes the User Agent knows its screen size. Send a fake screen from headless-browser to WebContent.
This commit is contained in:
parent
47af8c6733
commit
6590b8a1a7
Notes:
github-actions[bot]
2024-10-28 22:50:42 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6590b8a1a77 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2005
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ void HeadlessWebView::initialize_client(CreateNewClient create_new_client)
|
|||
client().async_set_viewport_size(m_client_state.page_index, viewport_size());
|
||||
client().async_set_window_size(m_client_state.page_index, viewport_size());
|
||||
|
||||
Vector<Web::DevicePixelRect> screen_rects { Web::DevicePixelRect { 0, 0, 1920, 1080 } };
|
||||
client().async_update_screen_rects(m_client_state.page_index, move(screen_rects), 0);
|
||||
|
||||
if (Application::chrome_options().allow_popups == WebView::AllowPopups::Yes)
|
||||
client().async_debug_request(m_client_state.page_index, "block-pop-ups"sv, "off"sv);
|
||||
|
||||
|
|
Loading…
Reference in a new issue