HTMLBRElement.cpp 689 B

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