1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

LibWeb: Add Document::viewport_rect()

This is a convenience helper that returns an empty rect if there is no
browsing context (to get the actual rect from).
This commit is contained in:
Andreas Kling 2023-08-21 12:26:18 +02:00
parent b8e694c0f2
commit ae5313d33c
2 changed files with 10 additions and 5 deletions

View file

@ -390,6 +390,7 @@ public:
void add_media_query_list(JS::NonnullGCPtr<CSS::MediaQueryList>);
JS::NonnullGCPtr<CSS::VisualViewport> visual_viewport();
[[nodiscard]] CSSPixelRect viewport_rect() const;
bool has_focus() const;