summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/RenderSVGResourceGradient.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/svg/RenderSVGResourceGradient.h')
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGResourceGradient.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceGradient.h b/Source/WebCore/rendering/svg/RenderSVGResourceGradient.h
index c37fc7a5c..e7918f594 100644
--- a/Source/WebCore/rendering/svg/RenderSVGResourceGradient.h
+++ b/Source/WebCore/rendering/svg/RenderSVGResourceGradient.h
@@ -19,15 +19,13 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef RenderSVGResourceGradient_h
-#define RenderSVGResourceGradient_h
+#pragma once
-#if ENABLE(SVG)
#include "Gradient.h"
#include "ImageBuffer.h"
#include "RenderSVGResourceContainer.h"
#include "SVGGradientElement.h"
-
+#include <memory>
#include <wtf/HashMap.h>
namespace WebCore {
@@ -45,15 +43,15 @@ class RenderSVGResourceGradient : public RenderSVGResourceContainer {
public:
SVGGradientElement& gradientElement() const { return static_cast<SVGGradientElement&>(RenderSVGResourceContainer::element()); }
- virtual void removeAllClientsFromCache(bool markForInvalidation = true) override final;
- virtual void removeClientFromCache(RenderObject&, bool markForInvalidation = true) override final;
+ void removeAllClientsFromCache(bool markForInvalidation = true) final;
+ void removeClientFromCache(RenderElement&, bool markForInvalidation = true) final;
- virtual bool applyResource(RenderElement&, const RenderStyle&, GraphicsContext*&, unsigned short resourceMode) override final;
- virtual void postApplyResource(RenderElement&, GraphicsContext*&, unsigned short resourceMode, const Path*, const RenderSVGShape*) override final;
- virtual FloatRect resourceBoundingBox(const RenderObject&) override final { return FloatRect(); }
+ bool applyResource(RenderElement&, const RenderStyle&, GraphicsContext*&, unsigned short resourceMode) final;
+ void postApplyResource(RenderElement&, GraphicsContext*&, unsigned short resourceMode, const Path*, const RenderSVGShape*) final;
+ FloatRect resourceBoundingBox(const RenderObject&) final { return FloatRect(); }
protected:
- RenderSVGResourceGradient(SVGGradientElement&, PassRef<RenderStyle>);
+ RenderSVGResourceGradient(SVGGradientElement&, RenderStyle&&);
void element() const = delete;
@@ -68,7 +66,7 @@ protected:
private:
bool m_shouldCollectGradientAttributes : 1;
- HashMap<RenderObject*, OwnPtr<GradientData>> m_gradientMap;
+ HashMap<RenderObject*, std::unique_ptr<GradientData>> m_gradientMap;
#if USE(CG)
GraphicsContext* m_savedContext;
@@ -76,7 +74,4 @@ private:
#endif
};
-}
-
-#endif
-#endif
+} // namespace WebCore