mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
LibWeb: Make BrowsingContextGroup & TraversableNavigable return a Page&
Removing another batch of uneeded null checks :^)
This commit is contained in:
parent
88f8ea7c60
commit
0cb0d60ac5
8 changed files with 13 additions and 16 deletions
|
@ -1900,10 +1900,7 @@ void Document::update_readiness(HTML::DocumentReadyState readiness_value)
|
|||
|
||||
if (readiness_value == HTML::DocumentReadyState::Complete && is_active() && navigable()->is_traversable()) {
|
||||
HTML::HTMLLinkElement::load_fallback_favicon_if_needed(*this).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
if (auto* page = navigable()->traversable_navigable()->page()) {
|
||||
page->client().page_did_finish_loading(url());
|
||||
}
|
||||
navigable()->traversable_navigable()->page().client().page_did_finish_loading(url());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1668,8 +1668,8 @@ static ErrorOr<void> scroll_an_element_into_view(DOM::Element& target, Bindings:
|
|||
(void)behavior;
|
||||
|
||||
// AD-HOC:
|
||||
auto* page = document.navigable()->traversable_navigable()->page();
|
||||
page->client().page_did_request_scroll_to(position.location());
|
||||
auto& page = document.navigable()->traversable_navigable()->page();
|
||||
page.client().page_did_request_scroll_to(position.location());
|
||||
}
|
||||
// If scrolling box is associated with an element
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue