HTMLObjectElement.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibCore/Forward.h>
  8. #include <LibGfx/Forward.h>
  9. #include <LibWeb/HTML/FormAssociatedElement.h>
  10. #include <LibWeb/Loader/ImageLoader.h>
  11. namespace Web::HTML {
  12. class HTMLObjectElement final : public FormAssociatedElement {
  13. public:
  14. using WrapperType = Bindings::HTMLObjectElementWrapper;
  15. HTMLObjectElement(DOM::Document&, DOM::QualifiedName);
  16. virtual ~HTMLObjectElement() override;
  17. virtual void parse_attribute(const FlyString& name, const String& value) override;
  18. String data() const { return attribute(HTML::AttributeNames::data); }
  19. String type() const { return attribute(HTML::AttributeNames::type); }
  20. // ^FormAssociatedElement
  21. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  22. virtual bool is_listed() const override { return true; }
  23. private:
  24. virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
  25. ImageLoader m_image_loader;
  26. bool m_should_show_fallback_content { false };
  27. };
  28. }