Changeset 17027 in webkit


Ignore:
Timestamp:
Oct 13, 2006 5:56:42 AM (18 years ago)
Author:
rwlbuis
Message:

Reviewed by Mitz.

http://bugs.webkit.org/show_bug.cgi?id=11217
Cleanup svg coding style

Cleanup coding style in svg structure classes.

Location:
trunk/WebCore
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r17026 r17027  
     12006-10-13  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Mitz.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=11217
     6        Cleanup svg coding style
     7
     8        Cleanup coding style in svg structure classes.
     9
     10        * ksvg2/svg/SVGDefsElement.cpp:
     11        (WebCore::SVGDefsElement::SVGDefsElement):
     12        * ksvg2/svg/SVGDefsElement.h:
     13        * ksvg2/svg/SVGDescElement.cpp:
     14        (WebCore::SVGDescElement::SVGDescElement):
     15        * ksvg2/svg/SVGDescElement.h:
     16        * ksvg2/svg/SVGDocument.cpp:
     17        * ksvg2/svg/SVGDocument.h:
     18        * ksvg2/svg/SVGElementInstance.cpp:
     19        (WebCore::SVGElementInstance::SVGElementInstance):
     20        (WebCore::SVGElementInstance::correspondingElement):
     21        (WebCore::SVGElementInstance::correspondingUseElement):
     22        (WebCore::SVGElementInstance::parentNode):
     23        (WebCore::SVGElementInstance::childNodes):
     24        (WebCore::SVGElementInstance::previousSibling):
     25        (WebCore::SVGElementInstance::nextSibling):
     26        (WebCore::SVGElementInstance::firstChild):
     27        (WebCore::SVGElementInstance::lastChild):
     28        * ksvg2/svg/SVGElementInstance.h:
     29        * ksvg2/svg/SVGElementInstanceList.cpp:
     30        * ksvg2/svg/SVGElementInstanceList.h:
     31        * ksvg2/svg/SVGGElement.cpp:
     32        (WebCore::SVGGElement::SVGGElement):
     33        (WebCore::SVGGElement::parseMappedAttribute):
     34        (WebCore::SVGDummyElement::SVGDummyElement):
     35        * ksvg2/svg/SVGGElement.h:
     36        (WebCore::SVGGElement::rendererIsNeeded):
     37        * ksvg2/svg/SVGImageElement.cpp:
     38        (WebCore::SVGImageElement::createRenderer):
     39        * ksvg2/svg/SVGImageElement.h:
     40        * ksvg2/svg/SVGSVGElement.cpp:
     41        (WebCore::SVGSVGElement::SVGSVGElement):
     42        (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
     43        (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
     44        (WebCore::SVGSVGElement::currentScale):
     45        (WebCore::SVGSVGElement::setCurrentScale):
     46        (WebCore::SVGSVGElement::currentTranslate):
     47        (WebCore::SVGSVGElement::parseMappedAttribute):
     48        (WebCore::SVGSVGElement::suspendRedraw):
     49        (WebCore::SVGSVGElement::unsuspendRedraw):
     50        (WebCore::SVGSVGElement::unsuspendRedrawAll):
     51        (WebCore::SVGSVGElement::forceRedraw):
     52        (WebCore::SVGSVGElement::getIntersectionList):
     53        (WebCore::SVGSVGElement::getEnclosureList):
     54        (WebCore::SVGSVGElement::checkIntersection):
     55        (WebCore::SVGSVGElement::checkEnclosure):
     56        (WebCore::SVGSVGElement::deselectAll):
     57        (WebCore::SVGSVGElement::createSVGLength):
     58        (WebCore::SVGSVGElement::createSVGAngle):
     59        (WebCore::SVGSVGElement::createSVGMatrix):
     60        (WebCore::SVGSVGElement::createSVGTransform):
     61        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
     62        (WebCore::SVGSVGElement::getCTM):
     63        (WebCore::SVGSVGElement::getScreenCTM):
     64        (WebCore::SVGSVGElement::setCurrentTime):
     65        * ksvg2/svg/SVGSVGElement.h:
     66        (WebCore::SVGSVGElement::rendererIsNeeded):
     67        * ksvg2/svg/SVGSwitchElement.cpp:
     68        (WebCore::SVGSwitchElement::SVGSwitchElement):
     69        (WebCore::SVGSwitchElement::childShouldCreateRenderer):
     70        * ksvg2/svg/SVGSwitchElement.h:
     71        (WebCore::SVGSwitchElement::rendererIsNeeded):
     72        * ksvg2/svg/SVGSymbolElement.cpp:
     73        (WebCore::SVGSymbolElement::SVGSymbolElement):
     74        (WebCore::SVGSymbolElement::parseMappedAttribute):
     75        * ksvg2/svg/SVGSymbolElement.h:
     76        (WebCore::SVGSymbolElement::shouldAttachChild):
     77        * ksvg2/svg/SVGTitleElement.cpp:
     78        (WebCore::SVGTitleElement::SVGTitleElement):
     79        * ksvg2/svg/SVGTitleElement.h:
     80        * ksvg2/svg/SVGUseElement.cpp:
     81        (WebCore::SVGUseElement::parseMappedAttribute):
     82        (WebCore::SVGUseElement::closeRenderer):
     83        * ksvg2/svg/SVGUseElement.h:
     84        (WebCore::SVGUseElement::rendererIsNeeded):
     85
    1862006-10-12  Adele Peterson  <adele@apple.com>
    287
  • trunk/WebCore/ksvg2/svg/SVGDefsElement.cpp

    r15872 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2424#ifdef SVG_SUPPORT
    2525#include "SVGDefsElement.h"
     26
    2627#include "RenderSVGContainer.h"
    2728
    2829namespace WebCore {
    2930
    30 SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document *doc)
     31SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* doc)
    3132    : SVGStyledTransformableElement(tagName, doc)
    3233    , SVGTests()
  • trunk/WebCore/ksvg2/svg/SVGDefsElement.h

    r16308 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
     27#include "SVGExternalResourcesRequired.h"
     28#include "SVGLangSpace.h"
    2729#include "SVGStyledTransformableElement.h"
    2830#include "SVGTests.h"
    29 #include "SVGLangSpace.h"
    30 #include "SVGExternalResourcesRequired.h"
    3131
    3232namespace WebCore
    3333{
    3434    class SVGDefsElement : public SVGStyledTransformableElement,
    35                                public SVGTests,
    36                                public SVGLangSpace,
    37                                public SVGExternalResourcesRequired
     35                           public SVGTests,
     36                           public SVGLangSpace,
     37                           public SVGExternalResourcesRequired
    3838    {
    3939    public:
  • trunk/WebCore/ksvg2/svg/SVGDocument.cpp

    r16575 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
  • trunk/WebCore/ksvg2/svg/SVGDocument.h

    r16698 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    3535    class SVGDocument : public Document {
    3636    public:
    37         SVGDocument(DOMImplementation *i, FrameView *view);
     37        SVGDocument(DOMImplementation*, FrameView*);
    3838        virtual ~SVGDocument();
    3939       
  • trunk/WebCore/ksvg2/svg/SVGElementInstance.cpp

    r15828 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2323#include "config.h"
    2424#ifdef SVG_SUPPORT
    25 #include "SVGElement.h"
     25#include "SVGElementInstance.h"
     26
     27#include "SVGElementInstanceList.h"
    2628#include "SVGUseElement.h"
    27 #include "SVGElementInstance.h"
    28 #include "SVGElementInstanceList.h"
    2929
    30 using namespace WebCore;
     30namespace WebCore {
    3131
    32 SVGElementInstance::SVGElementInstance() : EventTarget()
     32SVGElementInstance::SVGElementInstance()
     33    : EventTarget()
    3334{
    3435}
     
    3839}
    3940
    40 SVGElement *SVGElementInstance::correspondingElement() const
     41SVGElement* SVGElementInstance::correspondingElement() const
    4142{
    4243    return 0;
    4344}
    4445
    45 SVGUseElement *SVGElementInstance::correspondingUseElement() const
     46SVGUseElement* SVGElementInstance::correspondingUseElement() const
    4647{
    4748    return 0;
    4849}
    4950
    50 SVGElementInstance *SVGElementInstance::parentNode() const
     51SVGElementInstance* SVGElementInstance::parentNode() const
    5152{
    5253    return 0;
    5354}
    5455
    55 SVGElementInstanceList *SVGElementInstance::childNodes() const
     56SVGElementInstanceList* SVGElementInstance::childNodes() const
    5657{
    5758    return 0;
    5859}
    5960
    60 SVGElementInstance *SVGElementInstance::previousSibling() const
     61SVGElementInstance* SVGElementInstance::previousSibling() const
    6162{
    6263    return 0;
    6364}
    6465
    65 SVGElementInstance *SVGElementInstance::nextSibling() const
     66SVGElementInstance* SVGElementInstance::nextSibling() const
    6667{
    6768    return 0;
    6869}
    6970
    70 SVGElementInstance *SVGElementInstance::firstChild() const
     71SVGElementInstance* SVGElementInstance::firstChild() const
    7172{
    7273    return 0;
    7374}
    7475
    75 SVGElementInstance *SVGElementInstance::lastChild() const
     76SVGElementInstance* SVGElementInstance::lastChild() const
    7677{
    7778    return 0;
     79}
     80
    7881}
    7982
  • trunk/WebCore/ksvg2/svg/SVGElementInstance.h

    r15828 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
    27 #include <kdom/events/EventTarget.h>
     27#include "EventTarget.h"
    2828
    2929namespace WebCore
     
    3939
    4040        // 'SVGElementInstance' functions
    41         SVGElement *correspondingElement() const;
    42         SVGUseElement *correspondingUseElement() const;
     41        SVGElement* correspondingElement() const;
     42        SVGUseElement* correspondingUseElement() const;
    4343
    44         SVGElementInstance *parentNode() const;
    45         SVGElementInstanceList *childNodes() const;
    46         SVGElementInstance *previousSibling() const;
    47         SVGElementInstance *nextSibling() const;
    48         SVGElementInstance *firstChild() const;
    49         SVGElementInstance *lastChild() const;
     44        SVGElementInstance* parentNode() const;
     45        SVGElementInstanceList* childNodes() const;
     46        SVGElementInstance* previousSibling() const;
     47        SVGElementInstance* nextSibling() const;
     48        SVGElementInstance* firstChild() const;
     49        SVGElementInstance* lastChild() const;
    5050    };
    5151
  • trunk/WebCore/ksvg2/svg/SVGElementInstanceList.cpp

    r16378 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2424
    2525#ifdef SVG_SUPPORT
    26 
    2726#include "SVGElementInstanceList.h"
    2827
  • trunk/WebCore/ksvg2/svg/SVGElementInstanceList.h

    r16378 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2626#ifdef SVG_SUPPORT
    2727
     28#include "SVGElementInstance.h"
    2829#include "SVGList.h"
    29 #include "SVGElementInstance.h"
    3030
    3131namespace WebCore
  • trunk/WebCore/ksvg2/svg/SVGGElement.cpp

    r16206 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#include "SVGGElement.h"
    2626
    27 #include <kcanvas/RenderSVGContainer.h>
    28 #include <kcanvas/device/KRenderingDevice.h>
     27#include "RenderSVGContainer.h"
    2928
    3029namespace WebCore {
    3130
    32 SVGGElement::SVGGElement(const QualifiedName& tagName, Document *doc)
     31SVGGElement::SVGGElement(const QualifiedName& tagName, Document* doc)
    3332    : SVGStyledTransformableElement(tagName, doc)
    3433    , SVGTests()
     
    4241}
    4342
    44 void SVGGElement::parseMappedAttribute(MappedAttribute *attr)
     43void SVGGElement::parseMappedAttribute(MappedAttribute* attr)
    4544{
    4645    if (SVGTests::parseMappedAttribute(attr))
     
    5958
    6059// Helper class for <use> support
    61 SVGDummyElement::SVGDummyElement(const QualifiedName& tagName, Document *doc)
     60SVGDummyElement::SVGDummyElement(const QualifiedName& tagName, Document* doc)
    6261    : SVGGElement(tagName, doc)
    6362    ,  m_localName("dummy")
  • trunk/WebCore/ksvg2/svg/SVGGElement.h

    r16308 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
     27#include "SVGExternalResourcesRequired.h"
     28#include "SVGLangSpace.h"
    2729#include "SVGStyledTransformableElement.h"
    2830#include "SVGTests.h"
    29 #include "SVGLangSpace.h"
    30 #include "SVGExternalResourcesRequired.h"
    3131
    3232namespace WebCore
    3333{
    3434    class SVGGElement : public SVGStyledTransformableElement,
    35                             public SVGTests,
    36                             public SVGLangSpace,
    37                             public SVGExternalResourcesRequired
     35                        public SVGTests,
     36                        public SVGLangSpace,
     37                        public SVGExternalResourcesRequired
    3838    {
    3939    public:
     
    4343        virtual bool isValid() const { return SVGTests::isValid(); }
    4444
    45         virtual void parseMappedAttribute(MappedAttribute *attr);
     45        virtual void parseMappedAttribute(MappedAttribute*);
    4646
    47         virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
    48         virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);
     47        virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
     48        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    4949
    5050    protected:
  • trunk/WebCore/ksvg2/svg/SVGImageElement.cpp

    r16804 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44                  2006       Alexander Kellett <lypanov@kde.org>
    55
     
    2626#include "SVGImageElement.h"
    2727
    28 #include "Attr.h"
    2928#include "CSSPropertyNames.h"
     29#include "KCanvasImage.h"
     30#include "RenderSVGContainer.h"
    3031#include "RenderSVGImage.h"
    31 #include "SVGLength.h"
    32 #include "SVGPreserveAspectRatio.h"
    3332#include "SVGDocument.h"
    3433#include "SVGHelper.h"
     34#include "SVGLength.h"
    3535#include "SVGNames.h"
     36#include "SVGPreserveAspectRatio.h"
    3637#include "SVGSVGElement.h"
    3738#include "XLinkNames.h"
    38 #include "RenderSVGContainer.h"
    39 #include "KCanvasImage.h"
    40 #include <wtf/Assertions.h>
    4139
    4240namespace WebCore {
     
    9896}
    9997
    100 RenderObject *SVGImageElement::createRenderer(RenderArena *arena, RenderStyle *style)
     98RenderObject* SVGImageElement::createRenderer(RenderArena* arena, RenderStyle* style)
    10199{
    102100    return new (arena) RenderSVGImage(this);
  • trunk/WebCore/ksvg2/svg/SVGImageElement.h

    r16308 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
     27#include "SVGExternalResourcesRequired.h"
     28#include "SVGLangSpace.h"
     29#include "SVGImageLoader.h"
     30#include "SVGStyledTransformableElement.h"
    2731#include "SVGTests.h"
    28 #include "SVGImageLoader.h"
    29 #include "SVGLangSpace.h"
    3032#include "SVGURIReference.h"
    31 #include "SVGStyledTransformableElement.h"
    32 #include "SVGExternalResourcesRequired.h"
    3333
    3434namespace WebCore
     
    3939
    4040    class SVGImageElement : public SVGStyledTransformableElement,
    41                                 public SVGTests,
    42                                 public SVGLangSpace,
    43                                 public SVGExternalResourcesRequired,
    44                                 public SVGURIReference
     41                            public SVGTests,
     42                            public SVGLangSpace,
     43                            public SVGExternalResourcesRequired,
     44                            public SVGURIReference
    4545    {
    4646    public:
     
    5151
    5252        // 'SVGImageElement' functions
    53         virtual void parseMappedAttribute(MappedAttribute *attr);
     53        virtual void parseMappedAttribute(MappedAttribute*);
    5454        virtual void attach();
    5555
    56         virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
    57         virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);
     56        virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
     57        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    5858       
    5959    protected:
  • trunk/WebCore/ksvg2/svg/SVGSVGElement.cpp

    r16804 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    3131#include "HTMLNames.h"
    3232#include "KSVGTimeScheduler.h"
     33#include "RenderSVGContainer.h"
    3334#include "SVGAngle.h"
    3435#include "SVGLength.h"
     36#include "SVGMatrix.h"
    3537#include "SVGPreserveAspectRatio.h"
    36 #include "SVGDocumentExtensions.h"
    37 #include "SVGMatrix.h"
    3838#include "SVGTransform.h"
    3939#include "SVGZoomEvent.h"
    40 #include "ksvg.h"
    41 #include <kcanvas/RenderSVGContainer.h>
    42 #include <kcanvas/device/KRenderingDevice.h>
    4340#include "TextStream.h"
    4441
     
    4845using namespace EventNames;
    4946
    50 SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document *doc)
     47SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
    5148    : SVGStyledLocatableElement(tagName, doc)
    5249    , SVGTests()
     
    114111float SVGSVGElement::pixelUnitToMillimeterX() const
    115112{
    116 #if 0
    117     if(ownerDocument() && ownerDocument()->paintDeviceMetrics())
    118     {
    119         Q3PaintDeviceMetrics *metrics = ownerDocument()->paintDeviceMetrics();
    120         return float(metrics->widthMM()) / float(metrics->width());
    121     }
    122 #endif
    123 
     113    // FIXME: Implement me (see bug 11273)
    124114    return .28;
    125115}
     
    127117float SVGSVGElement::pixelUnitToMillimeterY() const
    128118{
    129 #if 0
    130     if(ownerDocument() && ownerDocument()->paintDeviceMetrics())
    131     {
    132         Q3PaintDeviceMetrics *metrics = ownerDocument()->paintDeviceMetrics();
    133         return float(metrics->heightMM()) / float(metrics->height());
    134     }
    135 #endif
    136 
     119    // FIXME: Implement me (see bug 11273)
    137120    return .28;
    138121}
     
    160143float SVGSVGElement::currentScale() const
    161144{
    162     //if(!canvasView())
    163         return 1.;
    164 
    165     //return canvasView()->zoom();
     145    // FIXME: Return the current zoom/scale value (see bug 11272)
     146    return 1.;
    166147}
    167148
    168149void SVGSVGElement::setCurrentScale(float scale)
    169150{
    170 //    if(canvasView())
    171 //    {
    172 //        float oldzoom = canvasView()->zoom();
    173 //        canvasView()->setZoom(scale);
    174 //        document()->dispatchZoomEvent(oldzoom, scale);
    175 //    }
     151    // FIXME: Set the current zoom/scale value (see bug 11272)
    176152}
    177153
    178154FloatPoint SVGSVGElement::currentTranslate() const
    179155{
    180     //if(!view())
    181         return FloatPoint();
    182 
    183     //return createSVGPoint(canvasView()->pan());
     156    // FIXME: Return the current pan/translate value (see bug 11272)
     157    return FloatPoint();
    184158}
    185159
     
    193167}
    194168
    195 void SVGSVGElement::parseMappedAttribute(MappedAttribute *attr)
     169void SVGSVGElement::parseMappedAttribute(MappedAttribute* attr)
    196170{
    197171    const AtomicString& value = attr->value();
     
    239213unsigned long SVGSVGElement::suspendRedraw(unsigned long /* max_wait_milliseconds */)
    240214{
    241     // TODO
     215    // FIXME: Implement me (see bug 11275)
    242216    return 0;
    243217}
     
    246220{
    247221    // if suspend_handle_id is not found, throw exception
    248     // TODO
     222    // FIXME: Implement me (see bug 11275)
    249223}
    250224
    251225void SVGSVGElement::unsuspendRedrawAll()
    252226{
    253     // TODO
     227    // FIXME: Implement me (see bug 11275)
    254228}
    255229
    256230void SVGSVGElement::forceRedraw()
    257231{
    258     // TODO
    259 }
    260 
    261 NodeList *SVGSVGElement::getIntersectionList(const FloatRect& rect, SVGElement*)
    262 {
    263     //NodeList *list;
    264     // TODO
     232    // FIXME: Implement me (see bug 11275)
     233}
     234
     235NodeList* SVGSVGElement::getIntersectionList(const FloatRect& rect, SVGElement*)
     236{
     237    // FIXME: Implement me (see bug 11274)
    265238    return 0;
    266239}
    267240
    268 NodeList *SVGSVGElement::getEnclosureList(const FloatRect& rect, SVGElement*)
    269 {
    270     // TODO
     241NodeList* SVGSVGElement::getEnclosureList(const FloatRect& rect, SVGElement*)
     242{
     243    // FIXME: Implement me (see bug 11274)
    271244    return 0;
    272245}
     
    276249    // TODO : take into account pointer-events?
    277250    // FIXME: Why is element ignored??
     251    // FIXME: Implement me (see bug 11274)
    278252    return rect.intersects(getBBox());
    279253}
     
    283257    // TODO : take into account pointer-events?
    284258    // FIXME: Why is element ignored??
     259    // FIXME: Implement me (see bug 11274)
    285260    return rect.contains(getBBox());
    286261}
     
    288263void SVGSVGElement::deselectAll()
    289264{
    290     // TODO
     265    // FIXME: Implement me (see bug 11275)
    291266}
    292267
     
    296271}
    297272
    298 SVGLength *SVGSVGElement::createSVGLength()
     273SVGLength* SVGSVGElement::createSVGLength()
    299274{
    300275    return new SVGLength(0);
    301276}
    302277
    303 SVGAngle *SVGSVGElement::createSVGAngle()
     278SVGAngle* SVGSVGElement::createSVGAngle()
    304279{
    305280    return new SVGAngle(0);
     
    311286}
    312287
    313 SVGMatrix *SVGSVGElement::createSVGMatrix()
     288SVGMatrix* SVGSVGElement::createSVGMatrix()
    314289{
    315290    return new SVGMatrix();
     
    321296}
    322297
    323 SVGTransform *SVGSVGElement::createSVGTransform()
     298SVGTransform* SVGSVGElement::createSVGTransform()
    324299{
    325300    return new SVGTransform();
    326301}
    327302
    328 SVGTransform *SVGSVGElement::createSVGTransformFromMatrix(SVGMatrix *matrix)
     303SVGTransform* SVGSVGElement::createSVGTransformFromMatrix(SVGMatrix* matrix)
    329304{   
    330     SVGTransform *obj = SVGSVGElement::createSVGTransform();
     305    SVGTransform* obj = SVGSVGElement::createSVGTransform();
    331306    obj->setMatrix(matrix);
    332307    return obj;
    333308}
    334309
    335 SVGMatrix *SVGSVGElement::getCTM() const
    336 {
    337     SVGMatrix *mat = createSVGMatrix();
    338     if(mat)
    339     {
    340         mat->translate(x()->value(), y()->value());
    341 
    342         if(attributes()->getNamedItem(SVGNames::viewBoxAttr))
    343         {
    344             RefPtr<SVGMatrix> viewBox = viewBoxToViewTransform(width()->value(), height()->value());
    345             mat->multiply(viewBox.get());
    346         }
    347     }
    348 
    349     return mat;
    350 }
    351 
    352 SVGMatrix *SVGSVGElement::getScreenCTM() const
    353 {
    354     SVGMatrix *mat = SVGStyledLocatableElement::getScreenCTM();
    355     if(mat) {
     310SVGMatrix* SVGSVGElement::getCTM() const
     311{
     312    SVGMatrix* mat = createSVGMatrix();
     313    if (mat) {
    356314        mat->translate(x()->value(), y()->value());
    357315
     
    365323}
    366324
     325SVGMatrix* SVGSVGElement::getScreenCTM() const
     326{
     327    SVGMatrix* mat = SVGStyledLocatableElement::getScreenCTM();
     328    if (mat) {
     329        mat->translate(x()->value(), y()->value());
     330
     331        if (attributes()->getNamedItem(SVGNames::viewBoxAttr)) {
     332            RefPtr<SVGMatrix> viewBox = viewBoxToViewTransform(width()->value(), height()->value());
     333            mat->multiply(viewBox.get());
     334        }
     335    }
     336
     337    return mat;
     338}
     339
    367340RenderObject* SVGSVGElement::createRenderer(RenderArena* arena, RenderStyle*)
    368341{
    369342    RenderSVGContainer* rootContainer = new (arena) RenderSVGContainer(this);
    370343
    371     // FIXME: all this setup should be done after attributesChanged, not here.
     344    // FIXME: All this setup should be done after attributesChanged, not here.
    372345    rootContainer->setViewBox(viewBox());
    373346    rootContainer->setAlign(KCAlign(preserveAspectRatio()->align() - 1));
     
    419392void SVGSVGElement::setCurrentTime(float /* seconds */)
    420393{
    421     // TODO
     394    // FIXME: Implement me
    422395}
    423396
  • trunk/WebCore/ksvg2/svg/SVGSVGElement.h

    r16601 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
     27#include "SVGExternalResourcesRequired.h"
     28#include "SVGFitToViewBox.h"
     29#include "SVGLangSpace.h"
     30#include "SVGStyledLocatableElement.h"
    2731#include "SVGTests.h"
    28 #include "SVGLangSpace.h"
    29 #include "SVGFitToViewBox.h"
    3032#include "SVGZoomAndPan.h"
    31 #include "SVGStyledLocatableElement.h"
    32 #include "SVGExternalResourcesRequired.h"
    3333
    3434namespace WebCore
    3535{
    36     class DocumentPtr;
    3736    class SVGAngle;
    3837    class SVGLength;
     
    4241    class TimeScheduler;
    4342    class SVGSVGElement : public SVGStyledLocatableElement,
    44                               public SVGTests,
    45                               public SVGLangSpace,
    46                               public SVGExternalResourcesRequired,
    47                               public SVGFitToViewBox,
    48                               public SVGZoomAndPan
     43                          public SVGTests,
     44                          public SVGLangSpace,
     45                          public SVGExternalResourcesRequired,
     46                          public SVGFitToViewBox,
     47                          public SVGZoomAndPan
    4948    {
    5049    public:
     
    7978        void setUseCurrentView(bool currentView);
    8079
    81         // SVGViewSpec *currentView() const;
     80        // SVGViewSpec* currentView() const;
    8281
    8382        float currentScale() const;
     
    10099        void forceRedraw();
    101100
    102         NodeList* getIntersectionList(const FloatRect&, SVGElement *referenceElement);
    103         NodeList* getEnclosureList(const FloatRect&, SVGElement *referenceElement);
     101        NodeList* getIntersectionList(const FloatRect&, SVGElement* referenceElement);
     102        NodeList* getEnclosureList(const FloatRect&, SVGElement* referenceElement);
    104103        bool checkIntersection(SVGElement*, const FloatRect&);
    105104        bool checkEnclosure(SVGElement*, const FloatRect&);
     
    115114        static SVGTransform* createSVGTransformFromMatrix(SVGMatrix*);
    116115
    117         virtual void parseMappedAttribute(MappedAttribute *attr);
     116        virtual void parseMappedAttribute(MappedAttribute*);
    118117
    119118        // 'virtual SVGLocatable' functions
    120         virtual SVGMatrix *getCTM() const;
    121         virtual SVGMatrix *getScreenCTM() const;
     119        virtual SVGMatrix* getCTM() const;
     120        virtual SVGMatrix* getScreenCTM() const;
    122121
    123         virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
    124         virtual RenderObject* createRenderer(RenderArena *arena, RenderStyle *style);
    125        
     122        virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
     123        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     124
    126125        virtual void insertedIntoDocument();
    127126        virtual void removedFromDocument();
  • trunk/WebCore/ksvg2/svg/SVGSwitchElement.cpp

    r16244 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2323#include "config.h"
    2424#ifdef SVG_SUPPORT
    25 #include "Attr.h"
     25#include "SVGSwitchElement.h"
    2626
    27 #include <kcanvas/RenderSVGContainer.h>
    28 #include <kcanvas/device/KRenderingDevice.h>
    29 
     27#include "RenderSVGContainer.h"
    3028#include "SVGNames.h"
    31 #include "SVGHelper.h"
    32 #include "SVGTests.h"
    33 #include "SVGSwitchElement.h"
    34 #include "SVGLength.h"
    3529
    3630namespace WebCore {
    3731
    38 SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document *doc)
    39 : SVGStyledTransformableElement(tagName, doc), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired()
     32SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* doc)
     33    : SVGStyledTransformableElement(tagName, doc)
     34    , SVGTests()
     35    , SVGLangSpace()
     36    , SVGExternalResourcesRequired()
    4037{
    4138}
     
    4542}
    4643
    47 bool SVGSwitchElement::childShouldCreateRenderer(Node *child) const
     44bool SVGSwitchElement::childShouldCreateRenderer(Node* child) const
    4845{
    49     for (Node *n = firstChild(); n != 0; n = n->nextSibling()) {
    50         SVGElement *element = svg_dynamic_cast(n);
     46    for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
     47        SVGElement* element = svg_dynamic_cast(n);
    5148        if (element && element->isValid())
    5249            return (n == child); // Only allow this child if it's the first valid child
  • trunk/WebCore/ksvg2/svg/SVGSwitchElement.h

    r16308 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
    27 #include "SVGTests.h"
     27#include "SVGExternalResourcesRequired.h"
    2828#include "SVGLangSpace.h"
    2929#include "SVGStyledTransformableElement.h"
    30 #include "SVGExternalResourcesRequired.h"
     30#include "SVGTests.h"
    3131
    3232namespace WebCore
    3333{
    3434    class SVGSwitchElement : public SVGStyledTransformableElement,
    35                                  public SVGTests,
    36                                  public SVGLangSpace,
    37                                  public SVGExternalResourcesRequired
     35                             public SVGTests,
     36                             public SVGLangSpace,
     37                             public SVGExternalResourcesRequired
    3838    {
    3939    public:
     
    4343        virtual bool isValid() const { return SVGTests::isValid(); }
    4444
    45         virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
    46         virtual bool childShouldCreateRenderer(Node *) const;
     45        virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
     46        virtual bool childShouldCreateRenderer(Node*) const;
    4747
    48         virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);
     48        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    4949
    5050    protected:
  • trunk/WebCore/ksvg2/svg/SVGSymbolElement.cpp

    r15828 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2323#include "config.h"
    2424#ifdef SVG_SUPPORT
     25#include "SVGSymbolElement.h"
     26
    2527#include "PlatformString.h"
     28#include "SVGFitToViewBox.h"
     29#include "SVGHelper.h"
    2630
    27 #include "SVGHelper.h"
    28 #include "SVGSymbolElement.h"
    29 #include "SVGFitToViewBox.h"
     31namespace WebCore {
    3032
    31 using namespace WebCore;
    32 
    33 SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document *doc)
    34 : SVGStyledElement(tagName, doc), SVGLangSpace(), SVGExternalResourcesRequired(), SVGFitToViewBox()
     33SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* doc)
     34    : SVGStyledElement(tagName, doc)
     35    , SVGLangSpace()
     36    , SVGExternalResourcesRequired()
     37    , SVGFitToViewBox()
    3538{
    3639}
     
    4043}
    4144
    42 void SVGSymbolElement::parseMappedAttribute(MappedAttribute *attr)
     45void SVGSymbolElement::parseMappedAttribute(MappedAttribute* attr)
    4346{
    44     if(SVGLangSpace::parseMappedAttribute(attr)) return;
    45     if(SVGExternalResourcesRequired::parseMappedAttribute(attr)) return;
    46     if(SVGFitToViewBox::parseMappedAttribute(attr)) return;
     47    if (SVGLangSpace::parseMappedAttribute(attr))
     48        return;
     49    if (SVGExternalResourcesRequired::parseMappedAttribute(attr))
     50        return;
     51    if (SVGFitToViewBox::parseMappedAttribute(attr))
     52        return;
    4753
    4854    SVGStyledElement::parseMappedAttribute(attr);
     55}
     56
    4957}
    5058
  • trunk/WebCore/ksvg2/svg/SVGSymbolElement.h

    r16308 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
     27#include "SVGExternalResourcesRequired.h"
     28#include "SVGFitToViewBox.h"
    2729#include "SVGLangSpace.h"
    28 #include "SVGFitToViewBox.h"
    2930#include "SVGStyledElement.h"
    30 #include "SVGExternalResourcesRequired.h"
    3131
    3232namespace WebCore
    3333{
    3434    class SVGSymbolElement : public SVGStyledElement,
    35                                  public SVGLangSpace,
    36                                  public SVGExternalResourcesRequired,
    37                                  public SVGFitToViewBox
     35                             public SVGLangSpace,
     36                             public SVGExternalResourcesRequired,
     37                             public SVGFitToViewBox
    3838    {
    3939    public:
     
    4141        virtual ~SVGSymbolElement();
    4242
    43         virtual void parseMappedAttribute(MappedAttribute *attr);
    44         virtual bool shouldAttachChild(Element *) const { return false; }
     43        virtual void parseMappedAttribute(MappedAttribute*);
     44        virtual bool shouldAttachChild(Element*) const { return false; }
    4545   
    4646    protected:
  • trunk/WebCore/ksvg2/svg/SVGTitleElement.cpp

    r15828 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2929namespace WebCore {
    3030
    31 SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document *doc)
     31SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* doc)
    3232    : SVGStyledElement(tagName, doc)
    3333{
  • trunk/WebCore/ksvg2/svg/SVGTitleElement.h

    r15828 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    3131{
    3232    class SVGTitleElement : public SVGStyledElement,
    33                                 public SVGLangSpace
     33                            public SVGLangSpace
    3434    {
    3535    public:
  • trunk/WebCore/ksvg2/svg/SVGUseElement.cpp

    r16804 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#include "SVGUseElement.h"
    2626
    27 #include "Attr.h"
    2827#include "Document.h"
    29 #include "SVGLength.h"
    30 #include "SVGPreserveAspectRatio.h"
     28#include "RenderSVGContainer.h"
    3129#include "SVGGElement.h"
    3230#include "SVGHelper.h"
     31#include "SVGLength.h"
    3332#include "SVGNames.h"
     33#include "SVGPreserveAspectRatio.h"
    3434#include "SVGSVGElement.h"
    3535#include "SVGSymbolElement.h"
    36 #include "ksvg.h"
    37 #include "RenderSVGContainer.h"
    38 #include "KRenderingDevice.h"
    3936
    4037namespace WebCore {
     
    6259ANIMATED_PROPERTY_DEFINITIONS(SVGUseElement, SVGLength*, Length, length, Height, height, SVGNames::heightAttr.localName(), m_height.get())
    6360
    64 void SVGUseElement::parseMappedAttribute(MappedAttribute *attr)
     61void SVGUseElement::parseMappedAttribute(MappedAttribute* attr)
    6562{
    6663    const AtomicString& value = attr->value();
     
    9087{
    9188    String targetId = SVGURIReference::getTarget(href().deprecatedString());
    92     Element *targetElement = ownerDocument()->getElementById(targetId);
    93     SVGElement *target = svg_dynamic_cast(targetElement);
     89    Element* targetElement = ownerDocument()->getElementById(targetId);
     90    SVGElement* target = svg_dynamic_cast(targetElement);
    9491    if (!target) {
    9592        //document()->addForwardReference(this);
     
    112109            dummy->setAttribute(SVGNames::heightAttr, hString);
    113110       
    114         SVGSymbolElement *symbol = static_cast<SVGSymbolElement *>(target);
     111        SVGSymbolElement* symbol = static_cast<SVGSymbolElement*>(target);
    115112        if (symbol->hasAttribute(SVGNames::viewBoxAttr)) {
    116113            const AtomicString& symbolViewBox = symbol->getAttribute(SVGNames::viewBoxAttr);
  • trunk/WebCore/ksvg2/svg/SVGUseElement.h

    r16308 r17027  
    11/*
    22    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
    3                   2004, 2005 Rob Buis <buis@kde.org>
     3                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
    55    This file is part of the KDE project
     
    2525#ifdef SVG_SUPPORT
    2626
     27#include "SVGExternalResourcesRequired.h"
     28#include "SVGLangSpace.h"
     29#include "SVGStyledTransformableElement.h"
    2730#include "SVGTests.h"
    28 #include "SVGLangSpace.h"
    2931#include "SVGURIReference.h"
    30 #include "SVGStyledTransformableElement.h"
    31 #include "SVGExternalResourcesRequired.h"
    3232
    3333namespace WebCore
     
    3535    class SVGLength;
    3636    class SVGUseElement : public SVGStyledTransformableElement,
    37                               public SVGTests,
    38                               public SVGLangSpace,
    39                               public SVGExternalResourcesRequired,
    40                               public SVGURIReference
     37                          public SVGTests,
     38                          public SVGLangSpace,
     39                          public SVGExternalResourcesRequired,
     40                          public SVGURIReference
    4141    {
    4242    public:
     
    5252
    5353        // 'SVGUseElement' functions
    54         virtual void parseMappedAttribute(MappedAttribute *attr);
     54        virtual void parseMappedAttribute(MappedAttribute*);
    5555
    56         virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
    57         virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);
     56        virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
     57        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    5858
    5959    protected:
Note: See TracChangeset for help on using the changeset viewer.