SVGMaskPaintable.h 679 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2024, MacDue <macdue@dueutil.tech>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Layout/SVGMaskBox.h>
  8. #include <LibWeb/Painting/SVGGraphicsPaintable.h>
  9. namespace Web::Painting {
  10. class SVGMaskPaintable : public SVGGraphicsPaintable {
  11. JS_CELL(SVGMaskPaintable, SVGGraphicsPaintable);
  12. public:
  13. static JS::NonnullGCPtr<SVGMaskPaintable> create(Layout::SVGMaskBox const&);
  14. bool forms_unconnected_subtree() const override
  15. {
  16. // Masks should not be painted (i.e. reachable) unless referenced by another element.
  17. return true;
  18. }
  19. protected:
  20. SVGMaskPaintable(Layout::SVGMaskBox const&);
  21. };
  22. }