diff --git a/UI/AppKit/Interface/LadybirdWebViewBridge.cpp b/UI/AppKit/Interface/LadybirdWebViewBridge.cpp index 0d14450802d..c9319e58234 100644 --- a/UI/AppKit/Interface/LadybirdWebViewBridge.cpp +++ b/UI/AppKit/Interface/LadybirdWebViewBridge.cpp @@ -163,6 +163,8 @@ void WebViewBridge::initialize_client(CreateNewClient create_new_client) client().async_set_device_pixels_per_css_pixel(m_client_state.page_index, m_device_pixel_ratio); client().async_set_preferred_color_scheme(m_client_state.page_index, m_preferred_color_scheme); + + set_system_visibility_state(m_system_visibility_state); update_palette(); if (!m_screen_rects.is_empty()) { diff --git a/UI/Headless/HeadlessWebView.cpp b/UI/Headless/HeadlessWebView.cpp index b47444f118d..e0be92096d6 100644 --- a/UI/Headless/HeadlessWebView.cpp +++ b/UI/Headless/HeadlessWebView.cpp @@ -136,6 +136,8 @@ HeadlessWebView::HeadlessWebView(Core::AnonymousBuffer theme, Web::DevicePixelSi m_pending_dialog = Web::Page::PendingDialog::None; m_pending_prompt_text.clear(); }; + + m_system_visibility_state = Web::HTML::VisibilityState::Visible; } NonnullOwnPtr HeadlessWebView::create(Core::AnonymousBuffer theme, Web::DevicePixelSize window_size) @@ -177,7 +179,7 @@ void HeadlessWebView::initialize_client(CreateNewClient create_new_client) client().async_set_window_size(m_client_state.page_index, viewport_size()); client().async_update_screen_rects(m_client_state.page_index, { screen_rect }, 0); - set_system_visibility_state(Web::HTML::VisibilityState::Visible); + set_system_visibility_state(m_system_visibility_state); if (Application::chrome_options().allow_popups == WebView::AllowPopups::Yes) client().async_debug_request(m_client_state.page_index, "block-pop-ups"sv, "off"sv); diff --git a/UI/Qt/WebContentView.cpp b/UI/Qt/WebContentView.cpp index 8f4ae0d2228..26965c906e6 100644 --- a/UI/Qt/WebContentView.cpp +++ b/UI/Qt/WebContentView.cpp @@ -655,8 +655,10 @@ void WebContentView::initialize_client(WebView::ViewImplementation::CreateNewCli client().async_set_window_handle(m_client_state.page_index, m_client_state.client_handle); client().async_set_device_pixels_per_css_pixel(m_client_state.page_index, m_device_pixel_ratio); - update_palette(); + set_system_visibility_state(m_system_visibility_state); + + update_palette(); update_screen_rects(); if (auto webdriver_content_ipc_path = WebView::Application::chrome_options().webdriver_content_ipc_path; webdriver_content_ipc_path.has_value())