Changeset 17027 in webkit
- Timestamp:
- Oct 13, 2006 5:56:42 AM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r17026 r17027 1 2006-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 1 86 2006-10-12 Adele Peterson <adele@apple.com> 2 87 -
trunk/WebCore/ksvg2/svg/SVGDefsElement.cpp
r15872 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 24 24 #ifdef SVG_SUPPORT 25 25 #include "SVGDefsElement.h" 26 26 27 #include "RenderSVGContainer.h" 27 28 28 29 namespace WebCore { 29 30 30 SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document *doc)31 SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* doc) 31 32 : SVGStyledTransformableElement(tagName, doc) 32 33 , SVGTests() -
trunk/WebCore/ksvg2/svg/SVGDefsElement.h
r16308 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGLangSpace.h" 27 29 #include "SVGStyledTransformableElement.h" 28 30 #include "SVGTests.h" 29 #include "SVGLangSpace.h"30 #include "SVGExternalResourcesRequired.h"31 31 32 32 namespace WebCore 33 33 { 34 34 class SVGDefsElement : public SVGStyledTransformableElement, 35 36 37 35 public SVGTests, 36 public SVGLangSpace, 37 public SVGExternalResourcesRequired 38 38 { 39 39 public: -
trunk/WebCore/ksvg2/svg/SVGDocument.cpp
r16575 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project -
trunk/WebCore/ksvg2/svg/SVGDocument.h
r16698 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 35 35 class SVGDocument : public Document { 36 36 public: 37 SVGDocument(DOMImplementation *i, FrameView *view);37 SVGDocument(DOMImplementation*, FrameView*); 38 38 virtual ~SVGDocument(); 39 39 -
trunk/WebCore/ksvg2/svg/SVGElementInstance.cpp
r15828 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 23 23 #include "config.h" 24 24 #ifdef SVG_SUPPORT 25 #include "SVGElement.h" 25 #include "SVGElementInstance.h" 26 27 #include "SVGElementInstanceList.h" 26 28 #include "SVGUseElement.h" 27 #include "SVGElementInstance.h"28 #include "SVGElementInstanceList.h"29 29 30 using namespace WebCore; 30 namespace WebCore { 31 31 32 SVGElementInstance::SVGElementInstance() : EventTarget() 32 SVGElementInstance::SVGElementInstance() 33 : EventTarget() 33 34 { 34 35 } … … 38 39 } 39 40 40 SVGElement *SVGElementInstance::correspondingElement() const41 SVGElement* SVGElementInstance::correspondingElement() const 41 42 { 42 43 return 0; 43 44 } 44 45 45 SVGUseElement *SVGElementInstance::correspondingUseElement() const46 SVGUseElement* SVGElementInstance::correspondingUseElement() const 46 47 { 47 48 return 0; 48 49 } 49 50 50 SVGElementInstance *SVGElementInstance::parentNode() const51 SVGElementInstance* SVGElementInstance::parentNode() const 51 52 { 52 53 return 0; 53 54 } 54 55 55 SVGElementInstanceList *SVGElementInstance::childNodes() const56 SVGElementInstanceList* SVGElementInstance::childNodes() const 56 57 { 57 58 return 0; 58 59 } 59 60 60 SVGElementInstance *SVGElementInstance::previousSibling() const61 SVGElementInstance* SVGElementInstance::previousSibling() const 61 62 { 62 63 return 0; 63 64 } 64 65 65 SVGElementInstance *SVGElementInstance::nextSibling() const66 SVGElementInstance* SVGElementInstance::nextSibling() const 66 67 { 67 68 return 0; 68 69 } 69 70 70 SVGElementInstance *SVGElementInstance::firstChild() const71 SVGElementInstance* SVGElementInstance::firstChild() const 71 72 { 72 73 return 0; 73 74 } 74 75 75 SVGElementInstance *SVGElementInstance::lastChild() const76 SVGElementInstance* SVGElementInstance::lastChild() const 76 77 { 77 78 return 0; 79 } 80 78 81 } 79 82 -
trunk/WebCore/ksvg2/svg/SVGElementInstance.h
r15828 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include <kdom/events/EventTarget.h>27 #include "EventTarget.h" 28 28 29 29 namespace WebCore … … 39 39 40 40 // 'SVGElementInstance' functions 41 SVGElement *correspondingElement() const;42 SVGUseElement *correspondingUseElement() const;41 SVGElement* correspondingElement() const; 42 SVGUseElement* correspondingUseElement() const; 43 43 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; 50 50 }; 51 51 -
trunk/WebCore/ksvg2/svg/SVGElementInstanceList.cpp
r16378 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 24 24 25 25 #ifdef SVG_SUPPORT 26 27 26 #include "SVGElementInstanceList.h" 28 27 -
trunk/WebCore/ksvg2/svg/SVGElementInstanceList.h
r16378 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 26 26 #ifdef SVG_SUPPORT 27 27 28 #include "SVGElementInstance.h" 28 29 #include "SVGList.h" 29 #include "SVGElementInstance.h"30 30 31 31 namespace WebCore -
trunk/WebCore/ksvg2/svg/SVGGElement.cpp
r16206 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #include "SVGGElement.h" 26 26 27 #include <kcanvas/RenderSVGContainer.h> 28 #include <kcanvas/device/KRenderingDevice.h> 27 #include "RenderSVGContainer.h" 29 28 30 29 namespace WebCore { 31 30 32 SVGGElement::SVGGElement(const QualifiedName& tagName, Document *doc)31 SVGGElement::SVGGElement(const QualifiedName& tagName, Document* doc) 33 32 : SVGStyledTransformableElement(tagName, doc) 34 33 , SVGTests() … … 42 41 } 43 42 44 void SVGGElement::parseMappedAttribute(MappedAttribute *attr)43 void SVGGElement::parseMappedAttribute(MappedAttribute* attr) 45 44 { 46 45 if (SVGTests::parseMappedAttribute(attr)) … … 59 58 60 59 // Helper class for <use> support 61 SVGDummyElement::SVGDummyElement(const QualifiedName& tagName, Document *doc)60 SVGDummyElement::SVGDummyElement(const QualifiedName& tagName, Document* doc) 62 61 : SVGGElement(tagName, doc) 63 62 , m_localName("dummy") -
trunk/WebCore/ksvg2/svg/SVGGElement.h
r16308 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGLangSpace.h" 27 29 #include "SVGStyledTransformableElement.h" 28 30 #include "SVGTests.h" 29 #include "SVGLangSpace.h"30 #include "SVGExternalResourcesRequired.h"31 31 32 32 namespace WebCore 33 33 { 34 34 class SVGGElement : public SVGStyledTransformableElement, 35 36 37 35 public SVGTests, 36 public SVGLangSpace, 37 public SVGExternalResourcesRequired 38 38 { 39 39 public: … … 43 43 virtual bool isValid() const { return SVGTests::isValid(); } 44 44 45 virtual void parseMappedAttribute(MappedAttribute *attr);45 virtual void parseMappedAttribute(MappedAttribute*); 46 46 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*); 49 49 50 50 protected: -
trunk/WebCore/ksvg2/svg/SVGImageElement.cpp
r16804 r17027 1 1 /* 2 2 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> 4 4 2006 Alexander Kellett <lypanov@kde.org> 5 5 … … 26 26 #include "SVGImageElement.h" 27 27 28 #include "Attr.h"29 28 #include "CSSPropertyNames.h" 29 #include "KCanvasImage.h" 30 #include "RenderSVGContainer.h" 30 31 #include "RenderSVGImage.h" 31 #include "SVGLength.h"32 #include "SVGPreserveAspectRatio.h"33 32 #include "SVGDocument.h" 34 33 #include "SVGHelper.h" 34 #include "SVGLength.h" 35 35 #include "SVGNames.h" 36 #include "SVGPreserveAspectRatio.h" 36 37 #include "SVGSVGElement.h" 37 38 #include "XLinkNames.h" 38 #include "RenderSVGContainer.h"39 #include "KCanvasImage.h"40 #include <wtf/Assertions.h>41 39 42 40 namespace WebCore { … … 98 96 } 99 97 100 RenderObject *SVGImageElement::createRenderer(RenderArena *arena, RenderStyle *style)98 RenderObject* SVGImageElement::createRenderer(RenderArena* arena, RenderStyle* style) 101 99 { 102 100 return new (arena) RenderSVGImage(this); -
trunk/WebCore/ksvg2/svg/SVGImageElement.h
r16308 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGLangSpace.h" 29 #include "SVGImageLoader.h" 30 #include "SVGStyledTransformableElement.h" 27 31 #include "SVGTests.h" 28 #include "SVGImageLoader.h"29 #include "SVGLangSpace.h"30 32 #include "SVGURIReference.h" 31 #include "SVGStyledTransformableElement.h"32 #include "SVGExternalResourcesRequired.h"33 33 34 34 namespace WebCore … … 39 39 40 40 class SVGImageElement : public SVGStyledTransformableElement, 41 42 43 44 41 public SVGTests, 42 public SVGLangSpace, 43 public SVGExternalResourcesRequired, 44 public SVGURIReference 45 45 { 46 46 public: … … 51 51 52 52 // 'SVGImageElement' functions 53 virtual void parseMappedAttribute(MappedAttribute *attr);53 virtual void parseMappedAttribute(MappedAttribute*); 54 54 virtual void attach(); 55 55 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*); 58 58 59 59 protected: -
trunk/WebCore/ksvg2/svg/SVGSVGElement.cpp
r16804 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 31 31 #include "HTMLNames.h" 32 32 #include "KSVGTimeScheduler.h" 33 #include "RenderSVGContainer.h" 33 34 #include "SVGAngle.h" 34 35 #include "SVGLength.h" 36 #include "SVGMatrix.h" 35 37 #include "SVGPreserveAspectRatio.h" 36 #include "SVGDocumentExtensions.h"37 #include "SVGMatrix.h"38 38 #include "SVGTransform.h" 39 39 #include "SVGZoomEvent.h" 40 #include "ksvg.h"41 #include <kcanvas/RenderSVGContainer.h>42 #include <kcanvas/device/KRenderingDevice.h>43 40 #include "TextStream.h" 44 41 … … 48 45 using namespace EventNames; 49 46 50 SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document *doc)47 SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc) 51 48 : SVGStyledLocatableElement(tagName, doc) 52 49 , SVGTests() … … 114 111 float SVGSVGElement::pixelUnitToMillimeterX() const 115 112 { 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) 124 114 return .28; 125 115 } … … 127 117 float SVGSVGElement::pixelUnitToMillimeterY() const 128 118 { 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) 137 120 return .28; 138 121 } … … 160 143 float SVGSVGElement::currentScale() const 161 144 { 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.; 166 147 } 167 148 168 149 void SVGSVGElement::setCurrentScale(float scale) 169 150 { 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) 176 152 } 177 153 178 154 FloatPoint SVGSVGElement::currentTranslate() const 179 155 { 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(); 184 158 } 185 159 … … 193 167 } 194 168 195 void SVGSVGElement::parseMappedAttribute(MappedAttribute *attr)169 void SVGSVGElement::parseMappedAttribute(MappedAttribute* attr) 196 170 { 197 171 const AtomicString& value = attr->value(); … … 239 213 unsigned long SVGSVGElement::suspendRedraw(unsigned long /* max_wait_milliseconds */) 240 214 { 241 // TODO215 // FIXME: Implement me (see bug 11275) 242 216 return 0; 243 217 } … … 246 220 { 247 221 // if suspend_handle_id is not found, throw exception 248 // TODO222 // FIXME: Implement me (see bug 11275) 249 223 } 250 224 251 225 void SVGSVGElement::unsuspendRedrawAll() 252 226 { 253 // TODO227 // FIXME: Implement me (see bug 11275) 254 228 } 255 229 256 230 void SVGSVGElement::forceRedraw() 257 231 { 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 235 NodeList* SVGSVGElement::getIntersectionList(const FloatRect& rect, SVGElement*) 236 { 237 // FIXME: Implement me (see bug 11274) 265 238 return 0; 266 239 } 267 240 268 NodeList *SVGSVGElement::getEnclosureList(const FloatRect& rect, SVGElement*)269 { 270 // TODO241 NodeList* SVGSVGElement::getEnclosureList(const FloatRect& rect, SVGElement*) 242 { 243 // FIXME: Implement me (see bug 11274) 271 244 return 0; 272 245 } … … 276 249 // TODO : take into account pointer-events? 277 250 // FIXME: Why is element ignored?? 251 // FIXME: Implement me (see bug 11274) 278 252 return rect.intersects(getBBox()); 279 253 } … … 283 257 // TODO : take into account pointer-events? 284 258 // FIXME: Why is element ignored?? 259 // FIXME: Implement me (see bug 11274) 285 260 return rect.contains(getBBox()); 286 261 } … … 288 263 void SVGSVGElement::deselectAll() 289 264 { 290 // TODO265 // FIXME: Implement me (see bug 11275) 291 266 } 292 267 … … 296 271 } 297 272 298 SVGLength *SVGSVGElement::createSVGLength()273 SVGLength* SVGSVGElement::createSVGLength() 299 274 { 300 275 return new SVGLength(0); 301 276 } 302 277 303 SVGAngle *SVGSVGElement::createSVGAngle()278 SVGAngle* SVGSVGElement::createSVGAngle() 304 279 { 305 280 return new SVGAngle(0); … … 311 286 } 312 287 313 SVGMatrix *SVGSVGElement::createSVGMatrix()288 SVGMatrix* SVGSVGElement::createSVGMatrix() 314 289 { 315 290 return new SVGMatrix(); … … 321 296 } 322 297 323 SVGTransform *SVGSVGElement::createSVGTransform()298 SVGTransform* SVGSVGElement::createSVGTransform() 324 299 { 325 300 return new SVGTransform(); 326 301 } 327 302 328 SVGTransform *SVGSVGElement::createSVGTransformFromMatrix(SVGMatrix *matrix)303 SVGTransform* SVGSVGElement::createSVGTransformFromMatrix(SVGMatrix* matrix) 329 304 { 330 SVGTransform *obj = SVGSVGElement::createSVGTransform();305 SVGTransform* obj = SVGSVGElement::createSVGTransform(); 331 306 obj->setMatrix(matrix); 332 307 return obj; 333 308 } 334 309 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) { 310 SVGMatrix* SVGSVGElement::getCTM() const 311 { 312 SVGMatrix* mat = createSVGMatrix(); 313 if (mat) { 356 314 mat->translate(x()->value(), y()->value()); 357 315 … … 365 323 } 366 324 325 SVGMatrix* 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 367 340 RenderObject* SVGSVGElement::createRenderer(RenderArena* arena, RenderStyle*) 368 341 { 369 342 RenderSVGContainer* rootContainer = new (arena) RenderSVGContainer(this); 370 343 371 // FIXME: all this setup should be done after attributesChanged, not here.344 // FIXME: All this setup should be done after attributesChanged, not here. 372 345 rootContainer->setViewBox(viewBox()); 373 346 rootContainer->setAlign(KCAlign(preserveAspectRatio()->align() - 1)); … … 419 392 void SVGSVGElement::setCurrentTime(float /* seconds */) 420 393 { 421 // TODO394 // FIXME: Implement me 422 395 } 423 396 -
trunk/WebCore/ksvg2/svg/SVGSVGElement.h
r16601 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGFitToViewBox.h" 29 #include "SVGLangSpace.h" 30 #include "SVGStyledLocatableElement.h" 27 31 #include "SVGTests.h" 28 #include "SVGLangSpace.h"29 #include "SVGFitToViewBox.h"30 32 #include "SVGZoomAndPan.h" 31 #include "SVGStyledLocatableElement.h"32 #include "SVGExternalResourcesRequired.h"33 33 34 34 namespace WebCore 35 35 { 36 class DocumentPtr;37 36 class SVGAngle; 38 37 class SVGLength; … … 42 41 class TimeScheduler; 43 42 class SVGSVGElement : public SVGStyledLocatableElement, 44 45 46 47 48 43 public SVGTests, 44 public SVGLangSpace, 45 public SVGExternalResourcesRequired, 46 public SVGFitToViewBox, 47 public SVGZoomAndPan 49 48 { 50 49 public: … … 79 78 void setUseCurrentView(bool currentView); 80 79 81 // SVGViewSpec *currentView() const;80 // SVGViewSpec* currentView() const; 82 81 83 82 float currentScale() const; … … 100 99 void forceRedraw(); 101 100 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); 104 103 bool checkIntersection(SVGElement*, const FloatRect&); 105 104 bool checkEnclosure(SVGElement*, const FloatRect&); … … 115 114 static SVGTransform* createSVGTransformFromMatrix(SVGMatrix*); 116 115 117 virtual void parseMappedAttribute(MappedAttribute *attr);116 virtual void parseMappedAttribute(MappedAttribute*); 118 117 119 118 // 'virtual SVGLocatable' functions 120 virtual SVGMatrix *getCTM() const;121 virtual SVGMatrix *getScreenCTM() const;119 virtual SVGMatrix* getCTM() const; 120 virtual SVGMatrix* getScreenCTM() const; 122 121 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 126 125 virtual void insertedIntoDocument(); 127 126 virtual void removedFromDocument(); -
trunk/WebCore/ksvg2/svg/SVGSwitchElement.cpp
r16244 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 23 23 #include "config.h" 24 24 #ifdef SVG_SUPPORT 25 #include " Attr.h"25 #include "SVGSwitchElement.h" 26 26 27 #include <kcanvas/RenderSVGContainer.h> 28 #include <kcanvas/device/KRenderingDevice.h> 29 27 #include "RenderSVGContainer.h" 30 28 #include "SVGNames.h" 31 #include "SVGHelper.h"32 #include "SVGTests.h"33 #include "SVGSwitchElement.h"34 #include "SVGLength.h"35 29 36 30 namespace WebCore { 37 31 38 SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document *doc) 39 : SVGStyledTransformableElement(tagName, doc), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired() 32 SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* doc) 33 : SVGStyledTransformableElement(tagName, doc) 34 , SVGTests() 35 , SVGLangSpace() 36 , SVGExternalResourcesRequired() 40 37 { 41 38 } … … 45 42 } 46 43 47 bool SVGSwitchElement::childShouldCreateRenderer(Node *child) const44 bool SVGSwitchElement::childShouldCreateRenderer(Node* child) const 48 45 { 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); 51 48 if (element && element->isValid()) 52 49 return (n == child); // Only allow this child if it's the first valid child -
trunk/WebCore/ksvg2/svg/SVGSwitchElement.h
r16308 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVG Tests.h"27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGLangSpace.h" 29 29 #include "SVGStyledTransformableElement.h" 30 #include "SVG ExternalResourcesRequired.h"30 #include "SVGTests.h" 31 31 32 32 namespace WebCore 33 33 { 34 34 class SVGSwitchElement : public SVGStyledTransformableElement, 35 36 37 35 public SVGTests, 36 public SVGLangSpace, 37 public SVGExternalResourcesRequired 38 38 { 39 39 public: … … 43 43 virtual bool isValid() const { return SVGTests::isValid(); } 44 44 45 virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }46 virtual bool childShouldCreateRenderer(Node 45 virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); } 46 virtual bool childShouldCreateRenderer(Node*) const; 47 47 48 virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);48 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 49 49 50 50 protected: -
trunk/WebCore/ksvg2/svg/SVGSymbolElement.cpp
r15828 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 23 23 #include "config.h" 24 24 #ifdef SVG_SUPPORT 25 #include "SVGSymbolElement.h" 26 25 27 #include "PlatformString.h" 28 #include "SVGFitToViewBox.h" 29 #include "SVGHelper.h" 26 30 27 #include "SVGHelper.h" 28 #include "SVGSymbolElement.h" 29 #include "SVGFitToViewBox.h" 31 namespace WebCore { 30 32 31 using namespace WebCore; 32 33 SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document *doc) 34 : SVGStyledElement(tagName, doc), SVGLangSpace(), SVGExternalResourcesRequired(), SVGFitToViewBox() 33 SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* doc) 34 : SVGStyledElement(tagName, doc) 35 , SVGLangSpace() 36 , SVGExternalResourcesRequired() 37 , SVGFitToViewBox() 35 38 { 36 39 } … … 40 43 } 41 44 42 void SVGSymbolElement::parseMappedAttribute(MappedAttribute *attr)45 void SVGSymbolElement::parseMappedAttribute(MappedAttribute* attr) 43 46 { 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; 47 53 48 54 SVGStyledElement::parseMappedAttribute(attr); 55 } 56 49 57 } 50 58 -
trunk/WebCore/ksvg2/svg/SVGSymbolElement.h
r16308 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGFitToViewBox.h" 27 29 #include "SVGLangSpace.h" 28 #include "SVGFitToViewBox.h"29 30 #include "SVGStyledElement.h" 30 #include "SVGExternalResourcesRequired.h"31 31 32 32 namespace WebCore 33 33 { 34 34 class SVGSymbolElement : public SVGStyledElement, 35 36 37 35 public SVGLangSpace, 36 public SVGExternalResourcesRequired, 37 public SVGFitToViewBox 38 38 { 39 39 public: … … 41 41 virtual ~SVGSymbolElement(); 42 42 43 virtual void parseMappedAttribute(MappedAttribute *attr);44 virtual bool shouldAttachChild(Element 43 virtual void parseMappedAttribute(MappedAttribute*); 44 virtual bool shouldAttachChild(Element*) const { return false; } 45 45 46 46 protected: -
trunk/WebCore/ksvg2/svg/SVGTitleElement.cpp
r15828 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 29 29 namespace WebCore { 30 30 31 SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document *doc)31 SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* doc) 32 32 : SVGStyledElement(tagName, doc) 33 33 { -
trunk/WebCore/ksvg2/svg/SVGTitleElement.h
r15828 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 31 31 { 32 32 class SVGTitleElement : public SVGStyledElement, 33 33 public SVGLangSpace 34 34 { 35 35 public: -
trunk/WebCore/ksvg2/svg/SVGUseElement.cpp
r16804 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #include "SVGUseElement.h" 26 26 27 #include "Attr.h"28 27 #include "Document.h" 29 #include "SVGLength.h" 30 #include "SVGPreserveAspectRatio.h" 28 #include "RenderSVGContainer.h" 31 29 #include "SVGGElement.h" 32 30 #include "SVGHelper.h" 31 #include "SVGLength.h" 33 32 #include "SVGNames.h" 33 #include "SVGPreserveAspectRatio.h" 34 34 #include "SVGSVGElement.h" 35 35 #include "SVGSymbolElement.h" 36 #include "ksvg.h"37 #include "RenderSVGContainer.h"38 #include "KRenderingDevice.h"39 36 40 37 namespace WebCore { … … 62 59 ANIMATED_PROPERTY_DEFINITIONS(SVGUseElement, SVGLength*, Length, length, Height, height, SVGNames::heightAttr.localName(), m_height.get()) 63 60 64 void SVGUseElement::parseMappedAttribute(MappedAttribute *attr)61 void SVGUseElement::parseMappedAttribute(MappedAttribute* attr) 65 62 { 66 63 const AtomicString& value = attr->value(); … … 90 87 { 91 88 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); 94 91 if (!target) { 95 92 //document()->addForwardReference(this); … … 112 109 dummy->setAttribute(SVGNames::heightAttr, hString); 113 110 114 SVGSymbolElement *symbol = static_cast<SVGSymbolElement*>(target);111 SVGSymbolElement* symbol = static_cast<SVGSymbolElement*>(target); 115 112 if (symbol->hasAttribute(SVGNames::viewBoxAttr)) { 116 113 const AtomicString& symbolViewBox = symbol->getAttribute(SVGNames::viewBoxAttr); -
trunk/WebCore/ksvg2/svg/SVGUseElement.h
r16308 r17027 1 1 /* 2 2 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> 4 4 5 5 This file is part of the KDE project … … 25 25 #ifdef SVG_SUPPORT 26 26 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGLangSpace.h" 29 #include "SVGStyledTransformableElement.h" 27 30 #include "SVGTests.h" 28 #include "SVGLangSpace.h"29 31 #include "SVGURIReference.h" 30 #include "SVGStyledTransformableElement.h"31 #include "SVGExternalResourcesRequired.h"32 32 33 33 namespace WebCore … … 35 35 class SVGLength; 36 36 class SVGUseElement : public SVGStyledTransformableElement, 37 38 39 40 37 public SVGTests, 38 public SVGLangSpace, 39 public SVGExternalResourcesRequired, 40 public SVGURIReference 41 41 { 42 42 public: … … 52 52 53 53 // 'SVGUseElement' functions 54 virtual void parseMappedAttribute(MappedAttribute *attr);54 virtual void parseMappedAttribute(MappedAttribute*); 55 55 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*); 58 58 59 59 protected:
Note: See TracChangeset
for help on using the changeset viewer.