mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue