Viewport.cpp 677 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/DOM/Range.h>
  7. #include <LibWeb/Dump.h>
  8. #include <LibWeb/Layout/Viewport.h>
  9. #include <LibWeb/Painting/PaintableBox.h>
  10. #include <LibWeb/Painting/StackingContext.h>
  11. #include <LibWeb/Painting/ViewportPaintable.h>
  12. namespace Web::Layout {
  13. Viewport::Viewport(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style)
  14. : BlockContainer(document, &document, move(style))
  15. {
  16. }
  17. Viewport::~Viewport() = default;
  18. JS::GCPtr<Painting::Paintable> Viewport::create_paintable() const
  19. {
  20. return Painting::ViewportPaintable::create(*this);
  21. }
  22. }