FrameBox.h 904 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLIFrameElement.h>
  8. #include <LibWeb/Layout/ReplacedBox.h>
  9. namespace Web::Layout {
  10. class FrameBox final : public ReplacedBox {
  11. JS_CELL(FrameBox, ReplacedBox);
  12. JS_DECLARE_ALLOCATOR(FrameBox);
  13. public:
  14. FrameBox(DOM::Document&, DOM::Element&, CSS::StyleProperties);
  15. virtual ~FrameBox() override;
  16. virtual void prepare_for_replaced_layout() override;
  17. const HTML::HTMLIFrameElement& dom_node() const { return verify_cast<HTML::HTMLIFrameElement>(ReplacedBox::dom_node()); }
  18. HTML::HTMLIFrameElement& dom_node() { return verify_cast<HTML::HTMLIFrameElement>(ReplacedBox::dom_node()); }
  19. virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
  20. private:
  21. virtual void did_set_content_size() override;
  22. };
  23. }