1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:07:35 +00:00

LibWeb: Move system visibility state to TraversableNavigable

This no longer belongs in BrowsingContext.
This commit is contained in:
Andreas Kling 2023-09-19 20:24:18 +02:00
parent 046ae7fe86
commit 38cb15ff49
7 changed files with 37 additions and 40 deletions

View file

@ -871,7 +871,7 @@ void ConnectionFromClient::request_file(Web::FileRequest file_request)
void ConnectionFromClient::set_system_visibility_state(bool visible)
{
m_page_host->page().top_level_browsing_context().set_system_visibility_state(
m_page_host->page().top_level_traversable()->set_system_visibility_state(
visible
? Web::HTML::VisibilityState::Visible
: Web::HTML::VisibilityState::Hidden);

View file

@ -1948,7 +1948,7 @@ void WebDriverConnection::restore_the_window()
// Do not return from this operation until the visibility state of the top-level browsing contexts active document has reached the visible state, or until the operation times out.
// FIXME: Implement timeouts.
Web::Platform::EventLoopPlugin::the().spin_until([this]() {
auto state = m_page_client.page().top_level_browsing_context().system_visibility_state();
auto state = m_page_client.page().top_level_traversable()->system_visibility_state();
return state == Web::HTML::VisibilityState::Visible;
});
}
@ -1972,7 +1972,7 @@ Gfx::IntRect WebDriverConnection::iconify_the_window()
// Do not return from this operation until the visibility state of the top-level browsing contexts active document has reached the hidden state, or until the operation times out.
// FIXME: Implement timeouts.
Web::Platform::EventLoopPlugin::the().spin_until([this]() {
auto state = m_page_client.page().top_level_browsing_context().system_visibility_state();
auto state = m_page_client.page().top_level_traversable()->system_visibility_state();
return state == Web::HTML::VisibilityState::Hidden;
});