// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_MASK_SOURCE_IMAGE_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_MASK_SOURCE_IMAGE_H_ #include "third_party/blink/renderer/core/style/style_image.h" #include "third_party/blink/renderer/platform/heap/member.h" #include "third_party/blink/renderer/platform/wtf/casting.h" namespace WTF { class String; } // namespace WTF namespace blink { class CSSImageValue; class StyleFetchedImage; class SVGResource; class SVGResourceClient; // A pseudo-<image> representing the <mask-source> production described in // [1]. It's a url() <image> that can either be a regular image, or an SVG // <mask> reference. // // If the reference is non-local this wraps an StyleFetchedImage, and a // corresponding SVGResource that wraps the same ImageResourceContent as the // StyleFetchedImage. If the url() has fragment that in turn references an SVG // <mask> element this can be used to paint/generate a mask from that source. // // If the reference is local an SVGResource is wrapped. // // [1] https://drafts.fxtf.org/css-masking/#the-mask-image class StyleMaskSourceImage : public StyleImage { … }; template <> struct DowncastTraits<StyleMaskSourceImage> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_MASK_SOURCE_IMAGE_H_