mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +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
|
@ -32,7 +32,7 @@ void ImageStyleValue::load_any_resources(DOM::Document& document)
|
|||
return;
|
||||
m_document = &document;
|
||||
|
||||
m_image_request = HTML::SharedImageRequest::get_or_create(document.realm(), *document.page(), m_url);
|
||||
m_image_request = HTML::SharedImageRequest::get_or_create(document.realm(), document.page(), m_url);
|
||||
m_image_request->add_callbacks(
|
||||
[this, weak_this = make_weak_ptr()] {
|
||||
if (!weak_this)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue