HTMLLabelElement.cpp 696 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/DOM/Document.h>
  7. #include <LibWeb/HTML/HTMLLabelElement.h>
  8. #include <LibWeb/Layout/Label.h>
  9. namespace Web::HTML {
  10. HTMLLabelElement::HTMLLabelElement(DOM::Document& document, DOM::QualifiedName qualified_name)
  11. : HTMLElement(document, move(qualified_name))
  12. {
  13. set_prototype(&Bindings::cached_web_prototype(realm(), "HTMLLabelElement"));
  14. }
  15. HTMLLabelElement::~HTMLLabelElement() = default;
  16. RefPtr<Layout::Node> HTMLLabelElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
  17. {
  18. return adopt_ref(*new Layout::Label(document(), this, move(style)));
  19. }
  20. }