Changeset 34912 in webkit


Ignore:
Timestamp:
Jul 1, 2008 4:10:45 AM (16 years ago)
Author:
oliver@apple.com
Message:

Class name changes for SVG Light Effect files.

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.

Location:
trunk/WebCore
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r34911 r34912  
     12008-07-01  Alex Mathews  <possessedpenguinbob@gmail.com>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Class name changes for SVG Light Effect files. The class names that changed :
     6
     7        SVGLightSource -> LightSource
     8        SVGDistantLightSource -> DistantLightSource
     9        SVGPointLightSource -> PointLightSource
     10        SVGSpotLightSource -> SpotLightSource
     11
     12        Every other file that is changed is just propagating the class name changes to
     13        dependent files.
     14
     15        * svg/SVGFEDiffuseLightingElement.cpp:
     16        (WebCore::SVGFEDiffuseLightingElement::updateLights):
     17        * svg/SVGFEDistantLightElement.cpp:
     18        (WebCore::SVGFEDistantLightElement::lightSource):
     19        * svg/SVGFEDistantLightElement.h:
     20        * svg/SVGFELightElement.h:
     21        * svg/SVGFEPointLightElement.cpp:
     22        (WebCore::SVGFEPointLightElement::lightSource):
     23        * svg/SVGFEPointLightElement.h:
     24        * svg/SVGFESpecularLightingElement.cpp:
     25        (WebCore::SVGFESpecularLightingElement::updateLights):
     26        * svg/SVGFESpotLightElement.cpp:
     27        (WebCore::SVGFESpotLightElement::lightSource):
     28        * svg/SVGFESpotLightElement.h:
     29        * svg/graphics/filters/SVGDistantLightSource.h:
     30        (WebCore::DistantLightSource::DistantLightSource):
     31        (WebCore::DistantLightSource::azimuth):
     32        (WebCore::DistantLightSource::elevation):
     33        * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
     34        (WebCore::SVGFEDiffuseLighting::lightSource):
     35        (WebCore::SVGFEDiffuseLighting::setLightSource):
     36        * svg/graphics/filters/SVGFEDiffuseLighting.h:
     37        * svg/graphics/filters/SVGFESpecularLighting.cpp:
     38        (WebCore::SVGFESpecularLighting::lightSource):
     39        (WebCore::SVGFESpecularLighting::setLightSource):
     40        * svg/graphics/filters/SVGFESpecularLighting.h:
     41        * svg/graphics/filters/SVGLightSource.cpp:
     42        (WebCore::PointLightSource::externalRepresentation):
     43        (WebCore::SpotLightSource::externalRepresentation):
     44        (WebCore::DistantLightSource::externalRepresentation):
     45        * svg/graphics/filters/SVGLightSource.h:
     46        (WebCore::):
     47        (WebCore::LightSource::LightSource):
     48        (WebCore::LightSource::~LightSource):
     49        (WebCore::LightSource::type):
     50        * svg/graphics/filters/SVGPointLightSource.h:
     51        (WebCore::PointLightSource::PointLightSource):
     52        (WebCore::PointLightSource::position):
     53        * svg/graphics/filters/SVGSpotLightSource.h:
     54        (WebCore::SpotLightSource::SpotLightSource):
     55        (WebCore::SpotLightSource::position):
     56        (WebCore::SpotLightSource::direction):
     57        (WebCore::SpotLightSource::specularExponent):
     58        (WebCore::SpotLightSource::limitingConeAngle):
     59        * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
     60        (WebCore::SVGFEDiffuseLighting::getCIFilter):
     61        * svg/graphics/filters/cg/SVGFEHelpersCg.h:
     62        * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
     63        (WebCore::getLightVectors):
     64        * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
     65        (WebCore::SVGFESpecularLighting::getCIFilter):
     66
    1672008-07-01  Alp Toker  <alp@nuanti.com>
    268
  • trunk/WebCore/svg/SVGFEDiffuseLightingElement.cpp

    r34656 r34912  
    105105        return;
    106106   
    107     SVGLightSource* light = 0;
     107    LightSource* light = 0;
    108108    for (Node* n = firstChild(); n; n = n->nextSibling()) {
    109109        if (n->hasTagName(SVGNames::feDistantLightTag) ||
  • trunk/WebCore/svg/SVGFEDistantLightElement.cpp

    r28568 r34912  
    3535}
    3636
    37 SVGLightSource* SVGFEDistantLightElement::lightSource() const
     37LightSource* SVGFEDistantLightElement::lightSource() const
    3838{
    39     return new SVGDistantLightSource(azimuth(), elevation());
     39    return new DistantLightSource(azimuth(), elevation());
    4040}
    4141
  • trunk/WebCore/svg/SVGFEDistantLightElement.h

    r28568 r34912  
    3232        virtual ~SVGFEDistantLightElement();
    3333
    34         virtual SVGLightSource* lightSource() const;
     34        virtual LightSource* lightSource() const;
    3535    };
    3636
  • trunk/WebCore/svg/SVGFELightElement.h

    r31600 r34912  
    3737        virtual ~SVGFELightElement();
    3838       
    39         virtual SVGLightSource* lightSource() const = 0;
     39        virtual LightSource* lightSource() const = 0;
    4040        virtual void parseMappedAttribute(MappedAttribute*);
    4141
  • trunk/WebCore/svg/SVGFEPointLightElement.cpp

    r28568 r34912  
    3535}
    3636
    37 SVGLightSource* SVGFEPointLightElement::lightSource() const
     37LightSource* SVGFEPointLightElement::lightSource() const
    3838{
    3939    FloatPoint3D pos(x(), y(), z());
    40     return new SVGPointLightSource(pos);
     40    return new PointLightSource(pos);
    4141}
    4242
  • trunk/WebCore/svg/SVGFEPointLightElement.h

    r28568 r34912  
    3232        virtual ~SVGFEPointLightElement();
    3333
    34         virtual SVGLightSource* lightSource() const;
     34        virtual LightSource* lightSource() const;
    3535    };
    3636
  • trunk/WebCore/svg/SVGFESpecularLightingElement.cpp

    r34656 r34912  
    110110        return;
    111111
    112     SVGLightSource* light = 0;   
     112    LightSource* light = 0;   
    113113    for (Node* n = firstChild(); n; n = n->nextSibling()) {
    114114        if (n->hasTagName(SVGNames::feDistantLightTag) ||
  • trunk/WebCore/svg/SVGFESpotLightElement.cpp

    r28568 r34912  
    3535}
    3636
    37 SVGLightSource* SVGFESpotLightElement::lightSource() const
     37LightSource* SVGFESpotLightElement::lightSource() const
    3838{
    3939    FloatPoint3D pos(x(), y(), z());
     
    4545
    4646    direction.normalize();
    47     return new SVGSpotLightSource(pos, direction, specularExponent(), limitingConeAngle());
     47    return new SpotLightSource(pos, direction, specularExponent(), limitingConeAngle());
    4848}
    4949
  • trunk/WebCore/svg/SVGFESpotLightElement.h

    r28568 r34912  
    3232        virtual ~SVGFESpotLightElement();
    3333
    34         virtual SVGLightSource* lightSource() const;
     34        virtual LightSource* lightSource() const;
    3535    };
    3636
  • trunk/WebCore/svg/graphics/filters/SVGDistantLightSource.h

    r29663 r34912  
    11/*
    2     Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
     3                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    34                  2004, 2005 Rob Buis <buis@kde.org>
    45                  2005 Eric Seidel <eric@webkit.org>
     
    2829namespace WebCore {
    2930
    30 class SVGDistantLightSource : public SVGLightSource {
    31 public:
    32     SVGDistantLightSource(float azimuth, float elevation)
    33         : SVGLightSource(LS_DISTANT)
    34         , m_azimuth(azimuth)
    35         , m_elevation(elevation)
    36     { }
     31    class DistantLightSource : public LightSource {
     32    public:
     33        DistantLightSource(float azimuth, float elevation)
     34            : LightSource(LS_DISTANT)
     35            , m_azimuth(azimuth)
     36            , m_elevation(elevation)
     37        { }
    3738
    38     float azimuth() const { return m_azimuth; }
    39     float elevation() const { return m_elevation; }
     39        float azimuth() const { return m_azimuth; }
     40        float elevation() const { return m_elevation; }
    4041
    41     virtual TextStream& externalRepresentation(TextStream&) const;
     42        virtual TextStream& externalRepresentation(TextStream&) const;
    4243
    43 private:
    44     float m_azimuth;
    45     float m_elevation;
    46 };
     44    private:
     45        float m_azimuth;
     46        float m_elevation;
     47    };
    4748
    4849} // namespace WebCore
  • trunk/WebCore/svg/graphics/filters/SVGFEDiffuseLighting.cpp

    r34656 r34912  
    9999}
    100100
    101 const SVGLightSource* SVGFEDiffuseLighting::lightSource() const
     101const LightSource* SVGFEDiffuseLighting::lightSource() const
    102102{
    103103    return m_lightSource.get();
    104104}
    105105
    106 void SVGFEDiffuseLighting::setLightSource(SVGLightSource* lightSource)
     106void SVGFEDiffuseLighting::setLightSource(LightSource* lightSource)
    107107{   
    108108    m_lightSource = lightSource;
  • trunk/WebCore/svg/graphics/filters/SVGFEDiffuseLighting.h

    r34656 r34912  
    2929namespace WebCore {
    3030
    31 class SVGLightSource;
     31class LightSource;
    3232
    3333class SVGFEDiffuseLighting : public SVGFilterEffect {
     
    5151    void setKernelUnitLengthY(float);
    5252
    53     const SVGLightSource* lightSource() const;
    54     void setLightSource(SVGLightSource*);
     53    const LightSource* lightSource() const;
     54    void setLightSource(LightSource*);
    5555
    5656    virtual TextStream& externalRepresentation(TextStream&) const;
     
    6868    float m_kernelUnitLengthX;
    6969    float m_kernelUnitLengthY;
    70     RefPtr<SVGLightSource> m_lightSource;
     70    RefPtr<LightSource> m_lightSource;
    7171};
    7272
  • trunk/WebCore/svg/graphics/filters/SVGFESpecularLighting.cpp

    r34656 r34912  
    109109}
    110110
    111 const SVGLightSource* SVGFESpecularLighting::lightSource() const
     111const LightSource* SVGFESpecularLighting::lightSource() const
    112112{
    113113    return m_lightSource.get();
    114114}
    115115
    116 void SVGFESpecularLighting::setLightSource(SVGLightSource* lightSource)
     116void SVGFESpecularLighting::setLightSource(LightSource* lightSource)
    117117{
    118118    m_lightSource = lightSource;
  • trunk/WebCore/svg/graphics/filters/SVGFESpecularLighting.h

    r34656 r34912  
    5353    void setKernelUnitLengthY(float);
    5454
    55     const SVGLightSource* lightSource() const;
    56     void setLightSource(SVGLightSource*);
     55    const LightSource* lightSource() const;
     56    void setLightSource(LightSource*);
    5757
    5858    virtual TextStream& externalRepresentation(TextStream&) const;
     
    7171    float m_kernelUnitLengthX;
    7272    float m_kernelUnitLengthY;
    73     RefPtr<SVGLightSource> m_lightSource;
     73    RefPtr<LightSource> m_lightSource;
    7474};
    7575
  • trunk/WebCore/svg/graphics/filters/SVGLightSource.cpp

    r29663 r34912  
    3636}
    3737
    38 TextStream& SVGPointLightSource::externalRepresentation(TextStream& ts) const
     38TextStream& PointLightSource::externalRepresentation(TextStream& ts) const
    3939{
    4040    ts << "[type=POINT-LIGHT] ";
     
    4343}
    4444
    45 TextStream& SVGSpotLightSource::externalRepresentation(TextStream& ts) const
     45TextStream& SpotLightSource::externalRepresentation(TextStream& ts) const
    4646{
    4747    ts << "[type=SPOT-LIGHT] ";
     
    5353}
    5454
    55 TextStream& SVGDistantLightSource::externalRepresentation(TextStream& ts) const
     55TextStream& DistantLightSource::externalRepresentation(TextStream& ts) const
    5656{
    5757    ts << "[type=DISTANT-LIGHT] ";
  • trunk/WebCore/svg/graphics/filters/SVGLightSource.h

    r34656 r34912  
    11/*
    2     Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
     3                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    34                  2004, 2005 Rob Buis <buis@kde.org>
    45                  2005 Eric Seidel <eric@webkit.org>
     
    2829namespace WebCore {
    2930
    30 enum SVGLightType {
    31     LS_DISTANT,
    32     LS_POINT,
    33     LS_SPOT
    34 };
     31    enum LightType {
     32        LS_DISTANT,
     33        LS_POINT,
     34        LS_SPOT
     35    };
    3536
    36 class TextStream;
     37    class TextStream;
    3738
    38 class SVGLightSource : public RefCounted<SVGLightSource> {
    39 public:
    40     SVGLightSource(SVGLightType type)
    41         : m_type(type)
    42     { }
     39    class LightSource : public RefCounted<LightSource> {
     40    public:
     41        LightSource(LightType type)
     42            : m_type(type)
     43        { }
    4344
    44     virtual ~SVGLightSource() { }
     45        virtual ~LightSource() { }
    4546
    46     SVGLightType type() const { return m_type; }
    47     virtual TextStream& externalRepresentation(TextStream&) const = 0;
     47        LightType type() const { return m_type; }
     48        virtual TextStream& externalRepresentation(TextStream&) const = 0;
    4849
    49 private:
    50     SVGLightType m_type;
    51 };
    52 
     50    private:
     51        LightType m_type;
     52    };
    5353
    5454} // namespace WebCore
  • trunk/WebCore/svg/graphics/filters/SVGPointLightSource.h

    r29663 r34912  
    11/*
    2     Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
     3                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    34                  2004, 2005 Rob Buis <buis@kde.org>
    45                  2005 Eric Seidel <eric@webkit.org>
     
    2930namespace WebCore {
    3031
    31 class SVGPointLightSource : public SVGLightSource {
    32 public:
    33     SVGPointLightSource(const FloatPoint3D& position)
    34         : SVGLightSource(LS_POINT)
    35         , m_position(position)
    36     { }
     32    class PointLightSource : public LightSource {
     33    public:
     34        PointLightSource(const FloatPoint3D& position)
     35            : LightSource(LS_POINT)
     36            , m_position(position)
     37        { }
    3738
    38     const FloatPoint3D& position() const { return m_position; }
     39        const FloatPoint3D& position() const { return m_position; }
    3940
    40     virtual TextStream& externalRepresentation(TextStream&) const;
     41        virtual TextStream& externalRepresentation(TextStream&) const;
    4142
    42 private:
    43     FloatPoint3D m_position;
    44 };
     43    private:
     44        FloatPoint3D m_position;
     45    };
    4546
    4647} // namespace WebCore
  • trunk/WebCore/svg/graphics/filters/SVGSpotLightSource.h

    r29663 r34912  
    11/*
    2     Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
     3                  2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    34                  2004, 2005 Rob Buis <buis@kde.org>
    45                  2005 Eric Seidel <eric@webkit.org>
     
    2930namespace WebCore {
    3031
    31 class SVGSpotLightSource : public SVGLightSource {
    32 public:
    33     SVGSpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
    34         : SVGLightSource(LS_SPOT)
    35         , m_position(position)
    36         , m_direction(direction)
    37         , m_specularExponent(specularExponent)
    38         , m_limitingConeAngle(limitingConeAngle)
    39     { }
     32    class SpotLightSource : public LightSource {
     33    public:
     34        SpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
     35            : LightSource(LS_SPOT)
     36            , m_position(position)
     37            , m_direction(direction)
     38            , m_specularExponent(specularExponent)
     39            , m_limitingConeAngle(limitingConeAngle)
     40        { }
    4041
    41     const FloatPoint3D& position() const { return m_position; }
    42     const FloatPoint3D& direction() const { return m_direction; }
     42        const FloatPoint3D& position() const { return m_position; }
     43        const FloatPoint3D& direction() const { return m_direction; }
    4344
    44     float specularExponent() const { return m_specularExponent; }
    45     float limitingConeAngle() const { return m_limitingConeAngle; }
     45        float specularExponent() const { return m_specularExponent; }
     46        float limitingConeAngle() const { return m_limitingConeAngle; }
    4647
    47     virtual TextStream& externalRepresentation(TextStream&) const;
     48        virtual TextStream& externalRepresentation(TextStream&) const;
    4849
    49 private:
    50     FloatPoint3D m_position;
    51     FloatPoint3D m_direction;
     50    private:
     51        FloatPoint3D m_position;
     52        FloatPoint3D m_direction;
    5253
    53     float m_specularExponent;
    54     float m_limitingConeAngle;
    55 };
     54        float m_specularExponent;
     55        float m_limitingConeAngle;
     56    };
    5657
    5758} // namespace WebCore
  • trunk/WebCore/svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm

    r29663 r34912  
    3232CIFilter* SVGFEDiffuseLighting::getCIFilter(const FloatRect& bbox) const
    3333{
    34     const SVGLightSource* light = lightSource();
     34    const LightSource* light = lightSource();
    3535    if (!light)
    3636        return nil;
  • trunk/WebCore/svg/graphics/filters/cg/SVGFEHelpersCg.h

    r29663 r34912  
    3030
    3131class Color;
    32 class SVGLightSource;
     32class LightSource;
    3333
    3434namespace WebCore {
     
    3939// Lighting
    4040CIFilter* getPointLightVectors(CIFilter* normals, CIVector* lightPosition, float surfaceScale);
    41 CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float surfaceScale);
     41CIFilter* getLightVectors(CIFilter* normals, const LightSource* light, float surfaceScale);
    4242CIFilter* getNormalMap(CIImage* bumpMap, float scale);
    4343
  • trunk/WebCore/svg/graphics/filters/cg/SVGFEHelpersCg.mm

    r29663 r34912  
    8383}
    8484
    85 CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float surfaceScale)
     85CIFilter* getLightVectors(CIFilter* normals, const LightSource* light, float surfaceScale)
    8686{
    8787    [WKDistantLightFilter class];
     
    9595    case LS_DISTANT:
    9696    {
    97         const SVGDistantLightSource* dlight = static_cast<const SVGDistantLightSource*>(light);
     97        const DistantLightSource* dlight = static_cast<const DistantLightSource*>(light);
    9898
    9999        filter = [CIFilter filterWithName:@"WKDistantLight"];
     
    116116    case LS_POINT:
    117117    {
    118         const SVGPointLightSource* plight = static_cast<const SVGPointLightSource*>(light);
     118        const PointLightSource* plight = static_cast<const PointLightSource*>(light);
    119119        return getPointLightVectors(normals, [CIVector vectorWithX:plight->position().x() Y:plight->position().y() Z:plight->position().z()], surfaceScale);
    120120    }
    121121    case LS_SPOT:
    122122    {
    123         const SVGSpotLightSource* slight = static_cast<const SVGSpotLightSource*>(light);
     123        const SpotLightSource* slight = static_cast<const SpotLightSource*>(light);
    124124        filter = [CIFilter filterWithName:@"WKSpotLight"];
    125125        if (!filter)
  • trunk/WebCore/svg/graphics/filters/cg/SVGFESpecularLightingCg.mm

    r29663 r34912  
    3232CIFilter* SVGFESpecularLighting::getCIFilter(const FloatRect& bbox) const
    3333{
    34     const SVGLightSource* light = lightSource();
     34    const LightSource* light = lightSource();
    3535    if (!light)
    3636        return nil;
Note: See TracChangeset for help on using the changeset viewer.