Screen.cpp 449 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibGfx/Rect.h>
  7. #include <LibWeb/CSS/Screen.h>
  8. #include <LibWeb/DOM/Document.h>
  9. #include <LibWeb/DOM/Window.h>
  10. #include <LibWeb/Page/Page.h>
  11. namespace Web::CSS {
  12. Screen::Screen(DOM::Window& window)
  13. : m_window(window)
  14. {
  15. }
  16. Gfx::IntRect Screen::screen_rect() const
  17. {
  18. return m_window.document().page()->screen_rect();
  19. }
  20. }