summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/RenderSVGResourcePattern.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/svg/RenderSVGResourcePattern.h')
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGResourcePattern.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/Source/WebCore/rendering/svg/RenderSVGResourcePattern.h b/Source/WebCore/rendering/svg/RenderSVGResourcePattern.h
index 9eebeefa4..5f5b560df 100644
--- a/Source/WebCore/rendering/svg/RenderSVGResourcePattern.h
+++ b/Source/WebCore/rendering/svg/RenderSVGResourcePattern.h
@@ -18,17 +18,15 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef RenderSVGResourcePattern_h
-#define RenderSVGResourcePattern_h
+#pragma once
-#if ENABLE(SVG)
#include "ImageBuffer.h"
#include "Pattern.h"
#include "PatternAttributes.h"
#include "RenderSVGResourceContainer.h"
#include "SVGPatternElement.h"
#include "SVGUnitTypes.h"
-
+#include <memory>
#include <wtf/HashMap.h>
namespace WebCore {
@@ -42,35 +40,35 @@ public:
class RenderSVGResourcePattern final : public RenderSVGResourceContainer {
public:
- RenderSVGResourcePattern(SVGPatternElement&, PassRef<RenderStyle>);
+ RenderSVGResourcePattern(SVGPatternElement&, RenderStyle&&);
SVGPatternElement& patternElement() const;
- virtual void removeAllClientsFromCache(bool markForInvalidation = true);
- virtual void removeClientFromCache(RenderObject&, bool markForInvalidation = true);
+ void removeAllClientsFromCache(bool markForInvalidation = true) override;
+ void removeClientFromCache(RenderElement&, bool markForInvalidation = true) override;
+
+ bool applyResource(RenderElement&, const RenderStyle&, GraphicsContext*&, unsigned short resourceMode) override;
+ void postApplyResource(RenderElement&, GraphicsContext*&, unsigned short resourceMode, const Path*, const RenderSVGShape*) override;
+ FloatRect resourceBoundingBox(const RenderObject&) override { return FloatRect(); }
- virtual bool applyResource(RenderElement&, const RenderStyle&, GraphicsContext*&, unsigned short resourceMode) override;
- virtual void postApplyResource(RenderElement&, GraphicsContext*&, unsigned short resourceMode, const Path*, const RenderSVGShape*) override;
- virtual FloatRect resourceBoundingBox(const RenderObject&) override { return FloatRect(); }
+ RenderSVGResourceType resourceType() const override { return PatternResourceType; }
- virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
- static RenderSVGResourceType s_resourceType;
+ void collectPatternAttributes(PatternAttributes&) const;
private:
void element() const = delete;
- virtual const char* renderName() const override { return "RenderSVGResourcePattern"; }
+ const char* renderName() const override { return "RenderSVGResourcePattern"; }
- bool buildTileImageTransform(RenderObject*, const PatternAttributes&, const SVGPatternElement&, FloatRect& patternBoundaries, AffineTransform& tileImageTransform) const;
+ bool buildTileImageTransform(RenderElement&, const PatternAttributes&, const SVGPatternElement&, FloatRect& patternBoundaries, AffineTransform& tileImageTransform) const;
- std::unique_ptr<ImageBuffer> createTileImage(const PatternAttributes&, const FloatRect& tileBoundaries, const FloatRect& absoluteTileBoundaries, const AffineTransform& tileImageTransform, FloatRect& clampedAbsoluteTileBoundaries) const;
+ std::unique_ptr<ImageBuffer> createTileImage(const PatternAttributes&, const FloatRect& tileBoundaries, const FloatRect& absoluteTileBoundaries, const AffineTransform& tileImageTransform, FloatRect& clampedAbsoluteTileBoundaries, RenderingMode) const;
- PatternData* buildPattern(RenderObject*, unsigned short resourceMode);
+ PatternData* buildPattern(RenderElement&, unsigned short resourceMode, GraphicsContext&);
bool m_shouldCollectPatternAttributes : 1;
PatternAttributes m_attributes;
- HashMap<RenderObject*, OwnPtr<PatternData>> m_patternMap;
+ HashMap<RenderElement*, std::unique_ptr<PatternData>> m_patternMap;
};
-}
+} // namespace WebCore
-#endif
-#endif
+SPECIALIZE_TYPE_TRAITS_RENDER_SVG_RESOURCE(RenderSVGResourcePattern, PatternResourceType)