Class name changes for SVG Light Effect files.
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Jul 2008 11:10:45 +0000 (11:10 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Jul 2008 11:10:45 +0000 (11:10 +0000)
Reviewed by Nikolas Zimmermann.

The class names that changed :

SVGLightSource -> LightSource
SVGDistantLightSource -> DistantLightSource
SVGPointLightSource -> PointLightSource
SVGSpotLightSource -> SpotLightSource

Every other file that is changed is just propagating the class name changes to
dependent files.

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

23 files changed:
WebCore/ChangeLog
WebCore/svg/SVGFEDiffuseLightingElement.cpp
WebCore/svg/SVGFEDistantLightElement.cpp
WebCore/svg/SVGFEDistantLightElement.h
WebCore/svg/SVGFELightElement.h
WebCore/svg/SVGFEPointLightElement.cpp
WebCore/svg/SVGFEPointLightElement.h
WebCore/svg/SVGFESpecularLightingElement.cpp
WebCore/svg/SVGFESpotLightElement.cpp
WebCore/svg/SVGFESpotLightElement.h
WebCore/svg/graphics/filters/SVGDistantLightSource.h
WebCore/svg/graphics/filters/SVGFEDiffuseLighting.cpp
WebCore/svg/graphics/filters/SVGFEDiffuseLighting.h
WebCore/svg/graphics/filters/SVGFESpecularLighting.cpp
WebCore/svg/graphics/filters/SVGFESpecularLighting.h
WebCore/svg/graphics/filters/SVGLightSource.cpp
WebCore/svg/graphics/filters/SVGLightSource.h
WebCore/svg/graphics/filters/SVGPointLightSource.h
WebCore/svg/graphics/filters/SVGSpotLightSource.h
WebCore/svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm
WebCore/svg/graphics/filters/cg/SVGFEHelpersCg.h
WebCore/svg/graphics/filters/cg/SVGFEHelpersCg.mm
WebCore/svg/graphics/filters/cg/SVGFESpecularLightingCg.mm

index d86e948..ac93e93 100644 (file)
@@ -1,3 +1,69 @@
+2008-07-01  Alex Mathews  <possessedpenguinbob@gmail.com>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Class name changes for SVG Light Effect files. The class names that changed :
+
+        SVGLightSource -> LightSource
+        SVGDistantLightSource -> DistantLightSource
+        SVGPointLightSource -> PointLightSource
+        SVGSpotLightSource -> SpotLightSource
+
+        Every other file that is changed is just propagating the class name changes to
+        dependent files.
+
+        * svg/SVGFEDiffuseLightingElement.cpp:
+        (WebCore::SVGFEDiffuseLightingElement::updateLights):
+        * svg/SVGFEDistantLightElement.cpp:
+        (WebCore::SVGFEDistantLightElement::lightSource):
+        * svg/SVGFEDistantLightElement.h:
+        * svg/SVGFELightElement.h:
+        * svg/SVGFEPointLightElement.cpp:
+        (WebCore::SVGFEPointLightElement::lightSource):
+        * svg/SVGFEPointLightElement.h:
+        * svg/SVGFESpecularLightingElement.cpp:
+        (WebCore::SVGFESpecularLightingElement::updateLights):
+        * svg/SVGFESpotLightElement.cpp:
+        (WebCore::SVGFESpotLightElement::lightSource):
+        * svg/SVGFESpotLightElement.h:
+        * svg/graphics/filters/SVGDistantLightSource.h:
+        (WebCore::DistantLightSource::DistantLightSource):
+        (WebCore::DistantLightSource::azimuth):
+        (WebCore::DistantLightSource::elevation):
+        * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
+        (WebCore::SVGFEDiffuseLighting::lightSource):
+        (WebCore::SVGFEDiffuseLighting::setLightSource):
+        * svg/graphics/filters/SVGFEDiffuseLighting.h:
+        * svg/graphics/filters/SVGFESpecularLighting.cpp:
+        (WebCore::SVGFESpecularLighting::lightSource):
+        (WebCore::SVGFESpecularLighting::setLightSource):
+        * svg/graphics/filters/SVGFESpecularLighting.h:
+        * svg/graphics/filters/SVGLightSource.cpp:
+        (WebCore::PointLightSource::externalRepresentation):
+        (WebCore::SpotLightSource::externalRepresentation):
+        (WebCore::DistantLightSource::externalRepresentation):
+        * svg/graphics/filters/SVGLightSource.h:
+        (WebCore::):
+        (WebCore::LightSource::LightSource):
+        (WebCore::LightSource::~LightSource):
+        (WebCore::LightSource::type):
+        * svg/graphics/filters/SVGPointLightSource.h:
+        (WebCore::PointLightSource::PointLightSource):
+        (WebCore::PointLightSource::position):
+        * svg/graphics/filters/SVGSpotLightSource.h:
+        (WebCore::SpotLightSource::SpotLightSource):
+        (WebCore::SpotLightSource::position):
+        (WebCore::SpotLightSource::direction):
+        (WebCore::SpotLightSource::specularExponent):
+        (WebCore::SpotLightSource::limitingConeAngle):
+        * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
+        (WebCore::SVGFEDiffuseLighting::getCIFilter):
+        * svg/graphics/filters/cg/SVGFEHelpersCg.h:
+        * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
+        (WebCore::getLightVectors):
+        * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
+        (WebCore::SVGFESpecularLighting::getCIFilter):
+
 2008-07-01  Alp Toker  <alp@nuanti.com>
 
         Rubber-stamped by Holger.
index f23a830..3cfda3d 100644 (file)
@@ -104,7 +104,7 @@ void SVGFEDiffuseLightingElement::updateLights() const
     if (!m_filterEffect)
         return;
     
-    SVGLightSource* light = 0;
+    LightSource* light = 0;
     for (Node* n = firstChild(); n; n = n->nextSibling()) {
         if (n->hasTagName(SVGNames::feDistantLightTag) ||
             n->hasTagName(SVGNames::fePointLightTag) ||
index e45b447..e9ec48d 100644 (file)
@@ -34,9 +34,9 @@ SVGFEDistantLightElement::~SVGFEDistantLightElement()
 {
 }
 
-SVGLightSource* SVGFEDistantLightElement::lightSource() const
+LightSource* SVGFEDistantLightElement::lightSource() const
 {
-    return new SVGDistantLightSource(azimuth(), elevation());
+    return new DistantLightSource(azimuth(), elevation());
 }
 
 }
index fd51e08..e43282f 100644 (file)
@@ -31,7 +31,7 @@ namespace WebCore
         SVGFEDistantLightElement(const QualifiedName&, Document*);
         virtual ~SVGFEDistantLightElement();
 
-        virtual SVGLightSource* lightSource() const;
+        virtual LightSource* lightSource() const;
     };
 
 } // namespace WebCore
index e0b28e7..439c90e 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore
         SVGFELightElement(const QualifiedName&, Document*);
         virtual ~SVGFELightElement();
         
-        virtual SVGLightSource* lightSource() const = 0;
+        virtual LightSource* lightSource() const = 0;
         virtual void parseMappedAttribute(MappedAttribute*);
 
     private:
index ff33330..f30f6db 100644 (file)
@@ -34,10 +34,10 @@ SVGFEPointLightElement::~SVGFEPointLightElement()
 {
 }
 
-SVGLightSource* SVGFEPointLightElement::lightSource() const
+LightSource* SVGFEPointLightElement::lightSource() const
 {
     FloatPoint3D pos(x(), y(), z());
-    return new SVGPointLightSource(pos);
+    return new PointLightSource(pos);
 }
 
 }
index 191f7f6..5b72e09 100644 (file)
@@ -31,7 +31,7 @@ namespace WebCore
         SVGFEPointLightElement(const QualifiedName&, Document*);
         virtual ~SVGFEPointLightElement();
 
-        virtual SVGLightSource* lightSource() const;
+        virtual LightSource* lightSource() const;
     };
 
 } // namespace WebCore
index 764c727..2655f76 100644 (file)
@@ -109,7 +109,7 @@ void SVGFESpecularLightingElement::updateLights() const
     if (!m_filterEffect)
         return;
 
-    SVGLightSource* light = 0;    
+    LightSource* light = 0;    
     for (Node* n = firstChild(); n; n = n->nextSibling()) {
         if (n->hasTagName(SVGNames::feDistantLightTag) || 
             n->hasTagName(SVGNames::fePointLightTag) ||
index 7d89f78..5add579 100644 (file)
@@ -34,7 +34,7 @@ SVGFESpotLightElement::~SVGFESpotLightElement()
 {
 }
 
-SVGLightSource* SVGFESpotLightElement::lightSource() const
+LightSource* SVGFESpotLightElement::lightSource() const
 {
     FloatPoint3D pos(x(), y(), z());
 
@@ -44,7 +44,7 @@ SVGLightSource* SVGFESpotLightElement::lightSource() const
                            pointsAtZ() - pos.z());
 
     direction.normalize();
-    return new SVGSpotLightSource(pos, direction, specularExponent(), limitingConeAngle());
+    return new SpotLightSource(pos, direction, specularExponent(), limitingConeAngle());
 }
 
 }
index 5738201..2989b14 100644 (file)
@@ -31,7 +31,7 @@ namespace WebCore
         SVGFESpotLightElement(const QualifiedName&, Document*);
         virtual ~SVGFESpotLightElement();
 
-        virtual SVGLightSource* lightSource() const;
+        virtual LightSource* lightSource() const;
     };
 
 } // namespace WebCore
index c4ff9b7..25c2045 100644 (file)
@@ -1,5 +1,6 @@
 /*
-    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
                   2004, 2005 Rob Buis <buis@kde.org>
                   2005 Eric Seidel <eric@webkit.org>
 
 
 namespace WebCore {
 
-class SVGDistantLightSource : public SVGLightSource {
-public:
-    SVGDistantLightSource(float azimuth, float elevation)
-        : SVGLightSource(LS_DISTANT)
-        , m_azimuth(azimuth)
-        , m_elevation(elevation)
-    { }
+    class DistantLightSource : public LightSource {
+    public:
+        DistantLightSource(float azimuth, float elevation)
+            : LightSource(LS_DISTANT)
+            , m_azimuth(azimuth)
+            , m_elevation(elevation)
+        { }
 
-    float azimuth() const { return m_azimuth; }
-    float elevation() const { return m_elevation; }
+        float azimuth() const { return m_azimuth; }
+        float elevation() const { return m_elevation; }
 
-    virtual TextStream& externalRepresentation(TextStream&) const;
+        virtual TextStream& externalRepresentation(TextStream&) const;
 
-private:
-    float m_azimuth;
-    float m_elevation;
-};
+    private:
+        float m_azimuth;
+        float m_elevation;
+    };
 
 } // namespace WebCore
 
index 198cfee..9f71fa9 100644 (file)
@@ -98,12 +98,12 @@ void SVGFEDiffuseLighting::setKernelUnitLengthY(float kernelUnitLengthY)
     m_kernelUnitLengthY = kernelUnitLengthY;
 }
 
-const SVGLightSource* SVGFEDiffuseLighting::lightSource() const
+const LightSource* SVGFEDiffuseLighting::lightSource() const
 {
     return m_lightSource.get();
 }
 
-void SVGFEDiffuseLighting::setLightSource(SVGLightSource* lightSource)
+void SVGFEDiffuseLighting::setLightSource(LightSource* lightSource)
 {    
     m_lightSource = lightSource;
 }
index 89a962a..c487fb8 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace WebCore {
 
-class SVGLightSource;
+class LightSource;
 
 class SVGFEDiffuseLighting : public SVGFilterEffect {
 public:
@@ -50,8 +50,8 @@ public:
     float kernelUnitLengthY() const;
     void setKernelUnitLengthY(float);
 
-    const SVGLightSource* lightSource() const;
-    void setLightSource(SVGLightSource*);
+    const LightSource* lightSource() const;
+    void setLightSource(LightSource*);
 
     virtual TextStream& externalRepresentation(TextStream&) const;
 
@@ -67,7 +67,7 @@ private:
     float m_diffuseConstant;
     float m_kernelUnitLengthX;
     float m_kernelUnitLengthY;
-    RefPtr<SVGLightSource> m_lightSource;
+    RefPtr<LightSource> m_lightSource;
 };
 
 } // namespace WebCore
index 80968ad..14f496c 100644 (file)
@@ -108,12 +108,12 @@ void SVGFESpecularLighting::setKernelUnitLengthY(float kernelUnitLengthY)
     m_kernelUnitLengthY = kernelUnitLengthY;
 }
 
-const SVGLightSource* SVGFESpecularLighting::lightSource() const
+const LightSource* SVGFESpecularLighting::lightSource() const
 {
     return m_lightSource.get();
 }
 
-void SVGFESpecularLighting::setLightSource(SVGLightSource* lightSource)
+void SVGFESpecularLighting::setLightSource(LightSource* lightSource)
 {
     m_lightSource = lightSource;
 }
index 3a5aa8e..5276339 100644 (file)
@@ -52,8 +52,8 @@ public:
     float kernelUnitLengthY() const;
     void setKernelUnitLengthY(float);
 
-    const SVGLightSource* lightSource() const;
-    void setLightSource(SVGLightSource*);
+    const LightSource* lightSource() const;
+    void setLightSource(LightSource*);
 
     virtual TextStream& externalRepresentation(TextStream&) const;
 
@@ -70,7 +70,7 @@ private:
     float m_specularExponent;
     float m_kernelUnitLengthX;
     float m_kernelUnitLengthY;
-    RefPtr<SVGLightSource> m_lightSource;
+    RefPtr<LightSource> m_lightSource;
 };
 
 } // namespace WebCore
index 517ed50..77611ca 100644 (file)
@@ -35,14 +35,14 @@ static TextStream& operator<<(TextStream& ts, const FloatPoint3D& p)
     return ts;
 }
 
-TextStream& SVGPointLightSource::externalRepresentation(TextStream& ts) const
+TextStream& PointLightSource::externalRepresentation(TextStream& ts) const
 {
     ts << "[type=POINT-LIGHT] ";
     ts << "[position=\"" << position() << "\"]";
     return ts;
 }
 
-TextStream& SVGSpotLightSource::externalRepresentation(TextStream& ts) const
+TextStream& SpotLightSource::externalRepresentation(TextStream& ts) const
 {
     ts << "[type=SPOT-LIGHT] ";
     ts << "[position=\"" << position() << "\"]";
@@ -52,7 +52,7 @@ TextStream& SVGSpotLightSource::externalRepresentation(TextStream& ts) const
     return ts;
 }
 
-TextStream& SVGDistantLightSource::externalRepresentation(TextStream& ts) const
+TextStream& DistantLightSource::externalRepresentation(TextStream& ts) const
 {
     ts << "[type=DISTANT-LIGHT] ";
     ts << "[azimuth=\"" << azimuth() << "\"]";
index 92dcfa8..779e147 100644 (file)
@@ -1,5 +1,6 @@
 /*
-    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
                   2004, 2005 Rob Buis <buis@kde.org>
                   2005 Eric Seidel <eric@webkit.org>
 
 
 namespace WebCore {
 
-enum SVGLightType {
-    LS_DISTANT,
-    LS_POINT,
-    LS_SPOT
-};
+    enum LightType {
+        LS_DISTANT,
+        LS_POINT,
+        LS_SPOT
+    };
 
-class TextStream;
+    class TextStream;
 
-class SVGLightSource : public RefCounted<SVGLightSource> {
-public:
-    SVGLightSource(SVGLightType type)
-        : m_type(type)
-    { }
+    class LightSource : public RefCounted<LightSource> {
+    public:
+        LightSource(LightType type)
+            : m_type(type)
+        { }
 
-    virtual ~SVGLightSource() { }
+        virtual ~LightSource() { }
 
-    SVGLightType type() const { return m_type; }
-    virtual TextStream& externalRepresentation(TextStream&) const = 0;
-
-private:
-    SVGLightType m_type;
-};
+        LightType type() const { return m_type; }
+        virtual TextStream& externalRepresentation(TextStream&) const = 0;
 
+    private:
+        LightType m_type;
+    };
 
 } // namespace WebCore
 
index 71b8f70..099a165 100644 (file)
@@ -1,5 +1,6 @@
 /*
-    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
                   2004, 2005 Rob Buis <buis@kde.org>
                   2005 Eric Seidel <eric@webkit.org>
 
 
 namespace WebCore {
 
-class SVGPointLightSource : public SVGLightSource {
-public:
-    SVGPointLightSource(const FloatPoint3D& position)
-        : SVGLightSource(LS_POINT)
-        , m_position(position)
-    { }
+    class PointLightSource : public LightSource {
+    public:
+        PointLightSource(const FloatPoint3D& position)
+            : LightSource(LS_POINT)
+            , m_position(position)
+        { }
 
-    const FloatPoint3D& position() const { return m_position; }
+        const FloatPoint3D& position() const { return m_position; }
 
-    virtual TextStream& externalRepresentation(TextStream&) const;
+        virtual TextStream& externalRepresentation(TextStream&) const;
 
-private:
-    FloatPoint3D m_position;
-};
+    private:
+        FloatPoint3D m_position;
+    };
 
 } // namespace WebCore
 
index 850a5fa..a4aa1fb 100644 (file)
@@ -1,5 +1,6 @@
 /*
-    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
                   2004, 2005 Rob Buis <buis@kde.org>
                   2005 Eric Seidel <eric@webkit.org>
 
 
 namespace WebCore {
 
-class SVGSpotLightSource : public SVGLightSource {
-public:
-    SVGSpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
-        : SVGLightSource(LS_SPOT)
-        , m_position(position)
-        , m_direction(direction)
-        , m_specularExponent(specularExponent)
-        , m_limitingConeAngle(limitingConeAngle)
-    { }
+    class SpotLightSource : public LightSource {
+    public:
+        SpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
+            : LightSource(LS_SPOT)
+            , m_position(position)
+            , m_direction(direction)
+            , m_specularExponent(specularExponent)
+            , m_limitingConeAngle(limitingConeAngle)
+        { }
 
-    const FloatPoint3D& position() const { return m_position; }
-    const FloatPoint3D& direction() const { return m_direction; }
+        const FloatPoint3D& position() const { return m_position; }
+        const FloatPoint3D& direction() const { return m_direction; }
 
-    float specularExponent() const { return m_specularExponent; }
-    float limitingConeAngle() const { return m_limitingConeAngle; }
+        float specularExponent() const { return m_specularExponent; }
+        float limitingConeAngle() const { return m_limitingConeAngle; }
 
-    virtual TextStream& externalRepresentation(TextStream&) const;
+        virtual TextStream& externalRepresentation(TextStream&) const;
 
-private:
-    FloatPoint3D m_position;
-    FloatPoint3D m_direction;
+    private:
+        FloatPoint3D m_position;
+        FloatPoint3D m_direction;
 
-    float m_specularExponent;
-    float m_limitingConeAngle;
-};
+        float m_specularExponent;
+        float m_limitingConeAngle;
+    };
 
 } // namespace WebCore
 
index 981b88b..b329943 100644 (file)
@@ -31,7 +31,7 @@ namespace WebCore {
 
 CIFilter* SVGFEDiffuseLighting::getCIFilter(const FloatRect& bbox) const
 {
-    const SVGLightSource* light = lightSource();
+    const LightSource* light = lightSource();
     if (!light)
         return nil;
 
index 176abb5..f17e7ad 100644 (file)
@@ -29,7 +29,7 @@
 #include <wtf/MathExtras.h>
 
 class Color;
-class SVGLightSource;
+class LightSource;
 
 namespace WebCore {
 
@@ -38,7 +38,7 @@ CIColor* ciColor(const Color& c);
 
 // Lighting
 CIFilter* getPointLightVectors(CIFilter* normals, CIVector* lightPosition, float surfaceScale);
-CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float surfaceScale);
+CIFilter* getLightVectors(CIFilter* normals, const LightSource* light, float surfaceScale);
 CIFilter* getNormalMap(CIImage* bumpMap, float scale);
 
 };
index 5c7fc31..92f044d 100644 (file)
@@ -82,7 +82,7 @@ CIFilter* getPointLightVectors(CIFilter* normals, CIVector* lightPosition, float
     return nil;
 }
 
-CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float surfaceScale)
+CIFilter* getLightVectors(CIFilter* normals, const LightSource* light, float surfaceScale)
 {
     [WKDistantLightFilter class];
     [WKPointLightFilter class];
@@ -94,7 +94,7 @@ CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float
     switch (light->type()) {
     case LS_DISTANT:
     {
-        const SVGDistantLightSource* dlight = static_cast<const SVGDistantLightSource*>(light);
+        const DistantLightSource* dlight = static_cast<const DistantLightSource*>(light);
 
         filter = [CIFilter filterWithName:@"WKDistantLight"];
         if (!filter)
@@ -115,12 +115,12 @@ CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float
     }
     case LS_POINT:
     {
-        const SVGPointLightSource* plight = static_cast<const SVGPointLightSource*>(light);
+        const PointLightSource* plight = static_cast<const PointLightSource*>(light);
         return getPointLightVectors(normals, [CIVector vectorWithX:plight->position().x() Y:plight->position().y() Z:plight->position().z()], surfaceScale);
     }
     case LS_SPOT:
     {
-        const SVGSpotLightSource* slight = static_cast<const SVGSpotLightSource*>(light);
+        const SpotLightSource* slight = static_cast<const SpotLightSource*>(light);
         filter = [CIFilter filterWithName:@"WKSpotLight"];
         if (!filter)
             return nil;
index e872c6a..493bce6 100644 (file)
@@ -31,7 +31,7 @@ namespace WebCore {
 
 CIFilter* SVGFESpecularLighting::getCIFilter(const FloatRect& bbox) const
 {
-    const SVGLightSource* light = lightSource();
+    const LightSource* light = lightSource();
     if (!light)
         return nil;