Remove PassRefPtr in SVGFEFooElement classes
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Apr 2015 03:21:27 +0000 (03:21 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Apr 2015 03:21:27 +0000 (03:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144425

Reviewed by Darin Adler.

As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
in SVGFEFooElement.

No new tests, no behavior changes.

* css/RGBColor.cpp:
(WebCore::RGBColor::create):
* css/RGBColor.h:
* platform/graphics/filters/PointLightSource.h:
(WebCore::PointLightSource::create):
* platform/graphics/filters/SpotLightSource.h:
(WebCore::SpotLightSource::create):
* svg/SVGColor.cpp:
(WebCore::SVGColor::rgbColor):
* svg/SVGColor.h:
* svg/SVGFEDistantLightElement.cpp:
(WebCore::SVGFEDistantLightElement::lightSource):
* svg/SVGFEDistantLightElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::findLightSource):
* svg/SVGFELightElement.h:
* svg/SVGFEPointLightElement.cpp:
(WebCore::SVGFEPointLightElement::lightSource):
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.cpp:
(WebCore::SVGFESpotLightElement::lightSource):
* svg/SVGFESpotLightElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/RGBColor.cpp
Source/WebCore/css/RGBColor.h
Source/WebCore/platform/graphics/filters/PointLightSource.h
Source/WebCore/platform/graphics/filters/SpotLightSource.h
Source/WebCore/svg/SVGColor.cpp
Source/WebCore/svg/SVGColor.h
Source/WebCore/svg/SVGFEDistantLightElement.cpp
Source/WebCore/svg/SVGFEDistantLightElement.h
Source/WebCore/svg/SVGFELightElement.cpp
Source/WebCore/svg/SVGFELightElement.h
Source/WebCore/svg/SVGFEPointLightElement.cpp
Source/WebCore/svg/SVGFEPointLightElement.h
Source/WebCore/svg/SVGFESpotLightElement.cpp
Source/WebCore/svg/SVGFESpotLightElement.h

index e70d7d7..eedc073 100644 (file)
@@ -1,3 +1,38 @@
+2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Remove PassRefPtr in SVGFEFooElement classes
+        https://bugs.webkit.org/show_bug.cgi?id=144425
+
+        Reviewed by Darin Adler.
+
+        As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
+        in SVGFEFooElement.
+
+        No new tests, no behavior changes.
+
+        * css/RGBColor.cpp:
+        (WebCore::RGBColor::create):
+        * css/RGBColor.h:
+        * platform/graphics/filters/PointLightSource.h:
+        (WebCore::PointLightSource::create):
+        * platform/graphics/filters/SpotLightSource.h:
+        (WebCore::SpotLightSource::create):
+        * svg/SVGColor.cpp:
+        (WebCore::SVGColor::rgbColor):
+        * svg/SVGColor.h:
+        * svg/SVGFEDistantLightElement.cpp:
+        (WebCore::SVGFEDistantLightElement::lightSource):
+        * svg/SVGFEDistantLightElement.h:
+        * svg/SVGFELightElement.cpp:
+        (WebCore::SVGFELightElement::findLightSource):
+        * svg/SVGFELightElement.h:
+        * svg/SVGFEPointLightElement.cpp:
+        (WebCore::SVGFEPointLightElement::lightSource):
+        * svg/SVGFEPointLightElement.h:
+        * svg/SVGFESpotLightElement.cpp:
+        (WebCore::SVGFESpotLightElement::lightSource):
+        * svg/SVGFESpotLightElement.h:
+
 2015-04-29  Dean Jackson  <dino@apple.com>
 
         Create a named CSS property for system colors
index 0844938..a18830e 100644 (file)
@@ -30,9 +30,9 @@
 
 namespace WebCore {
 
-PassRefPtr<RGBColor> RGBColor::create(unsigned rgbColor)
+Ref<RGBColor> RGBColor::create(unsigned rgbColor)
 {
-    return adoptRef(new RGBColor(rgbColor));
+    return adoptRef(*new RGBColor(rgbColor));
 }
 
 PassRefPtr<CSSPrimitiveValue> RGBColor::red()
index fe987de..1af7eb7 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
     class RGBColor : public RefCounted<RGBColor> {
     public:
-        static PassRefPtr<RGBColor> create(unsigned rgbColor);
+        static Ref<RGBColor> create(unsigned rgbColor);
 
         PassRefPtr<CSSPrimitiveValue> red();
         PassRefPtr<CSSPrimitiveValue> green();
index b2caf3f..46c0caa 100644 (file)
@@ -29,9 +29,9 @@ namespace WebCore {
 
 class PointLightSource : public LightSource {
 public:
-    static PassRefPtr<PointLightSource> create(const FloatPoint3D& position)
+    static Ref<PointLightSource> create(const FloatPoint3D& position)
     {
-        return adoptRef(new PointLightSource(position));
+        return adoptRef(*new PointLightSource(position));
     }
 
     const FloatPoint3D& position() const { return m_position; }
index 4bfa36d..b7e61e7 100644 (file)
@@ -29,10 +29,10 @@ namespace WebCore {
 
 class SpotLightSource : public LightSource {
 public:
-    static PassRefPtr<SpotLightSource> create(const FloatPoint3D& position,
+    static Ref<SpotLightSource> create(const FloatPoint3D& position,
         const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
     {
-        return adoptRef(new SpotLightSource(position, direction, specularExponent, limitingConeAngle));
+        return adoptRef(*new SpotLightSource(position, direction, specularExponent, limitingConeAngle));
     }
 
     const FloatPoint3D& position() const { return m_position; }
index f0ae606..8e86bda 100644 (file)
@@ -40,7 +40,7 @@ SVGColor::SVGColor(ClassType classType, const SVGColorType& colorType)
 {
 }
 
-PassRefPtr<RGBColor> SVGColor::rgbColor() const
+Ref<RGBColor> SVGColor::rgbColor() const
 {
     return RGBColor::create(m_color.rgb());
 }
index 905e2d7..01c6625 100644 (file)
@@ -59,7 +59,7 @@ public:
 
     const Color& color() const { return m_color; }
     const SVGColorType& colorType() const { return m_colorType; }
-    PassRefPtr<RGBColor> rgbColor() const;
+    Ref<RGBColor> rgbColor() const;
 
     static Color colorFromRGBColorString(const String&);
 
index 8ca5929..5cea149 100644 (file)
@@ -36,7 +36,7 @@ Ref<SVGFEDistantLightElement> SVGFEDistantLightElement::create(const QualifiedNa
     return adoptRef(*new SVGFEDistantLightElement(tagName, document));
 }
 
-PassRefPtr<LightSource> SVGFEDistantLightElement::lightSource() const
+Ref<LightSource> SVGFEDistantLightElement::lightSource() const
 {
     return DistantLightSource::create(azimuth(), elevation());
 }
index e460421..35dafa6 100644 (file)
@@ -31,7 +31,7 @@ public:
 private:
     SVGFEDistantLightElement(const QualifiedName&, Document&);
 
-    virtual PassRefPtr<LightSource> lightSource() const override;
+    virtual Ref<LightSource> lightSource() const override;
 };
 
 } // namespace WebCore
index 06792e5..42d380f 100644 (file)
@@ -74,7 +74,7 @@ SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElem
     return nullptr;
 }
 
-PassRefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svgElement)
+RefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svgElement)
 {
     SVGFELightElement* lightNode = findLightElement(svgElement);
     if (!lightNode)
index 70845d0..8b94663 100644 (file)
@@ -30,9 +30,9 @@ namespace WebCore {
 
 class SVGFELightElement : public SVGElement {
 public:
-    virtual PassRefPtr<LightSource> lightSource() const = 0;
+    virtual Ref<LightSource> lightSource() const = 0;
     static SVGFELightElement* findLightElement(const SVGElement*);
-    static PassRefPtr<LightSource> findLightSource(const SVGElement*);
+    static RefPtr<LightSource> findLightSource(const SVGElement*);
 
 protected:
     SVGFELightElement(const QualifiedName&, Document&);
index da62749..831f2c8 100644 (file)
@@ -36,7 +36,7 @@ Ref<SVGFEPointLightElement> SVGFEPointLightElement::create(const QualifiedName&
     return adoptRef(*new SVGFEPointLightElement(tagName, document));
 }
 
-PassRefPtr<LightSource> SVGFEPointLightElement::lightSource() const
+Ref<LightSource> SVGFEPointLightElement::lightSource() const
 {
     return PointLightSource::create(FloatPoint3D(x(), y(), z()));
 }
index 209ebb7..6f95374 100644 (file)
@@ -31,7 +31,7 @@ public:
 private:
     SVGFEPointLightElement(const QualifiedName&, Document&);
 
-    virtual PassRefPtr<LightSource> lightSource() const override;
+    virtual Ref<LightSource> lightSource() const override;
 };
 
 } // namespace WebCore
index 50cf764..55952d1 100644 (file)
@@ -36,7 +36,7 @@ Ref<SVGFESpotLightElement> SVGFESpotLightElement::create(const QualifiedName& ta
     return adoptRef(*new SVGFESpotLightElement(tagName, document));
 }
 
-PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const
+Ref<LightSource> SVGFESpotLightElement::lightSource() const
 {
     FloatPoint3D pos(x(), y(), z());
     FloatPoint3D direction(pointsAtX(), pointsAtY(), pointsAtZ());
index c5cea97..a6f1284 100644 (file)
@@ -31,7 +31,7 @@ public:
 private:
     SVGFESpotLightElement(const QualifiedName&, Document&);
 
-    virtual PassRefPtr<LightSource> lightSource() const override;
+    virtual Ref<LightSource> lightSource() const override;
 };
 
 } // namespace WebCore