1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:17:44 +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

@ -636,4 +636,14 @@ void Tab::show_storage_inspector()
window->move_to_front();
}
void Tab::show_event(GUI::ShowEvent&)
{
m_web_content_view->set_visible(true);
}
void Tab::hide_event(GUI::HideEvent&)
{
m_web_content_view->set_visible(false);
}
}