1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWeb+WebContent+Browser: Plumb visibility state from GUI to web pages

OOPWV now reacts to show/hide events and informs LibWeb about the state
change. This makes visibilitychange events fire when switching tabs. :^)
This commit is contained in:
Andreas Kling 2022-09-19 20:50:33 +02:00
parent 5908873b45
commit d4acdac317
14 changed files with 150 additions and 11 deletions

View file

@ -526,4 +526,13 @@ void ConnectionFromClient::request_file(NonnullRefPtr<Web::FileRequest>& file_re
async_did_request_file(file_request->path(), id);
}
void ConnectionFromClient::set_system_visibility_state(bool visible)
{
m_page_host->page().top_level_browsing_context().set_system_visibility_state(
visible
? Web::HTML::VisibilityState::Visible
: Web::HTML::VisibilityState::Hidden);
}
}