FrameBox.h 875 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.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. public:
  13. FrameBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>);
  14. virtual ~FrameBox() override;
  15. virtual void prepare_for_replaced_layout() override;
  16. const HTML::HTMLIFrameElement& dom_node() const { return verify_cast<HTML::HTMLIFrameElement>(ReplacedBox::dom_node()); }
  17. HTML::HTMLIFrameElement& dom_node() { return verify_cast<HTML::HTMLIFrameElement>(ReplacedBox::dom_node()); }
  18. virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
  19. private:
  20. virtual void did_set_rect() override;
  21. };
  22. }