SVGGElement.cpp 702 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <AK/StringBuilder.h>
  7. #include <LibWeb/DOM/Document.h>
  8. #include <LibWeb/Layout/SVGGraphicsBox.h>
  9. #include <LibWeb/SVG/SVGGElement.h>
  10. namespace Web::SVG {
  11. SVGGElement::SVGGElement(DOM::Document& document, QualifiedName qualified_name)
  12. : SVGGraphicsElement(document, move(qualified_name))
  13. {
  14. }
  15. RefPtr<Layout::Node> SVGGElement::create_layout_node()
  16. {
  17. auto style = document().style_computer().compute_style(*this);
  18. if (style->display() == CSS::Display::None)
  19. return nullptr;
  20. return adopt_ref(*new Layout::SVGGraphicsBox(document(), *this, move(style)));
  21. }
  22. }