HTMLBRElement.cpp 775 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/HTMLBRElementPrototype.h>
  7. #include <LibWeb/DOM/Document.h>
  8. #include <LibWeb/HTML/HTMLBRElement.h>
  9. #include <LibWeb/Layout/BreakNode.h>
  10. namespace Web::HTML {
  11. HTMLBRElement::HTMLBRElement(DOM::Document& document, DOM::QualifiedName qualified_name)
  12. : HTMLElement(document, move(qualified_name))
  13. {
  14. set_prototype(&window().ensure_web_prototype<Bindings::HTMLBRElementPrototype>("HTMLBRElement"));
  15. }
  16. HTMLBRElement::~HTMLBRElement() = default;
  17. RefPtr<Layout::Node> HTMLBRElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
  18. {
  19. return adopt_ref(*new Layout::BreakNode(document(), *this, move(style)));
  20. }
  21. }