mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 10:12:07 +00:00
LibWeb: Make Document::page() return a Page&
Now that Document always has a Page, and always keeps it alive, we can make this return a Page&, exposing various unnecessary null checks.
This commit is contained in:
parent
70193c0009
commit
7c95ebc302
17 changed files with 43 additions and 78 deletions
|
@ -70,7 +70,7 @@ void HTMLLinkElement::inserted()
|
|||
ResourceLoader::the().preconnect(document().parse_url(deprecated_attribute(HTML::AttributeNames::href)));
|
||||
} else if (m_relationship & Relationship::Icon) {
|
||||
auto favicon_url = document().parse_url(href());
|
||||
auto favicon_request = LoadRequest::create_for_url_on_page(favicon_url, document().page());
|
||||
auto favicon_request = LoadRequest::create_for_url_on_page(favicon_url, &document().page());
|
||||
set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, favicon_request));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue