1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibWeb: Make HTML::Window::page() return a Page&

This commit is contained in:
Andreas Kling 2023-12-15 20:33:16 +01:00
parent 7c95ebc302
commit 9793d69d4f
10 changed files with 40 additions and 83 deletions

View file

@ -42,7 +42,7 @@ bool Navigator::pdf_viewer_enabled() const
// The NavigatorPlugins mixin's pdfViewerEnabled getter steps are to return the user agent's PDF viewer supported.
// NOTE: The NavigatorPlugins mixin should only be exposed on the Window object.
auto const& window = verify_cast<HTML::Window>(HTML::current_global_object());
return window.page()->pdf_viewer_supported();
return window.page().pdf_viewer_supported();
}
// https://w3c.github.io/webdriver/#dfn-webdriver
@ -52,7 +52,7 @@ bool Navigator::webdriver() const
// NOTE: The NavigatorAutomationInformation interface should not be exposed on WorkerNavigator.
auto const& window = verify_cast<HTML::Window>(HTML::current_global_object());
return window.page()->is_webdriver_active();
return window.page().is_webdriver_active();
}
void Navigator::visit_edges(Cell::Visitor& visitor)