1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:35:06 +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

@ -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;
});