mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +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:
@@ -429,12 +429,12 @@ bool Window::dispatch_event(DOM::Event& event)
|
||||
|
||||
Page* Window::page()
|
||||
{
|
||||
return associated_document().page();
|
||||
return &associated_document().page();
|
||||
}
|
||||
|
||||
Page const* Window::page() const
|
||||
{
|
||||
return associated_document().page();
|
||||
return &associated_document().page();
|
||||
}
|
||||
|
||||
Optional<CSS::MediaFeatureValue> Window::query_media_feature(CSS::MediaFeatureID media_feature) const
|
||||
|
||||
Reference in New Issue
Block a user