1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 08:07:45 +00:00

LibWeb: Make BrowsingContex::page() return a Page&

This exposed a whole slew of now-unnecessary null checks. :^)

Co-Authored-By: Andreas Kling <kling@serenityos.org>
This commit is contained in:
Shannon Booth 2023-12-03 20:29:37 +13:00 committed by Andreas Kling
parent af2bcc3b56
commit 88f8ea7c60
9 changed files with 56 additions and 88 deletions

View file

@ -194,8 +194,7 @@ WebIDL::ExceptionOr<void> History::shared_history_push_replace_state(JS::Value v
auto navigable = document->navigable();
if (navigable->is_top_level_traversable()) {
if (auto* page = navigable->active_browsing_context()->page())
page->client().page_did_start_loading(new_url, false);
navigable->active_browsing_context()->page().client().page_did_start_loading(new_url, false);
}
// 10. Run the URL and history update steps given document and newURL, with serializedData set to