| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/dom/Event.h" | 35 #include "core/dom/Event.h" |
| 36 #include "core/dom/NodeRenderingContext.h" | 36 #include "core/dom/NodeRenderingContext.h" |
| 37 #include "core/rendering/RenderObject.h" | 37 #include "core/rendering/RenderObject.h" |
| 38 #include "core/svg/SVGCursorElement.h" | 38 #include "core/svg/SVGCursorElement.h" |
| 39 #include "core/svg/SVGDocumentExtensions.h" | 39 #include "core/svg/SVGDocumentExtensions.h" |
| 40 #include "core/svg/SVGElementInstance.h" | 40 #include "core/svg/SVGElementInstance.h" |
| 41 #include "core/svg/SVGElementRareData.h" | 41 #include "core/svg/SVGElementRareData.h" |
| 42 #include "core/svg/SVGGraphicsElement.h" | 42 #include "core/svg/SVGGraphicsElement.h" |
| 43 #include "core/svg/SVGSVGElement.h" | 43 #include "core/svg/SVGSVGElement.h" |
| 44 #include "core/svg/SVGTextElement.h" | |
| 45 | 44 |
| 46 namespace WebCore { | 45 namespace WebCore { |
| 47 | 46 |
| 48 using namespace HTMLNames; | 47 using namespace HTMLNames; |
| 49 | 48 |
| 50 SVGElement::SVGElement(const QualifiedName& tagName, Document* document, Constru
ctionType constructionType) | 49 SVGElement::SVGElement(const QualifiedName& tagName, Document* document, Constru
ctionType constructionType) |
| 51 : Element(tagName, document, constructionType) | 50 : Element(tagName, document, constructionType) |
| 52 { | 51 { |
| 53 ScriptWrappable::init(this); | 52 ScriptWrappable::init(this); |
| 54 setHasCustomStyleCallbacks(); | 53 setHasCustomStyleCallbacks(); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 } | 251 } |
| 253 return svgRareData()->elementInstances(); | 252 return svgRareData()->elementInstances(); |
| 254 } | 253 } |
| 255 | 254 |
| 256 bool SVGElement::getBoundingBox(FloatRect& rect, SVGLocatable::StyleUpdateStrate
gy styleUpdateStrategy) | 255 bool SVGElement::getBoundingBox(FloatRect& rect, SVGLocatable::StyleUpdateStrate
gy styleUpdateStrategy) |
| 257 { | 256 { |
| 258 if (isSVGGraphicsElement()) { | 257 if (isSVGGraphicsElement()) { |
| 259 rect = toSVGGraphicsElement(this)->getBBox(styleUpdateStrategy); | 258 rect = toSVGGraphicsElement(this)->getBBox(styleUpdateStrategy); |
| 260 return true; | 259 return true; |
| 261 } | 260 } |
| 262 if (hasTagName(SVGNames::textTag)) { | |
| 263 rect = static_cast<SVGTextElement*>(this)->getBBox(styleUpdateStrategy); | |
| 264 return true; | |
| 265 } | |
| 266 return false; | 261 return false; |
| 267 } | 262 } |
| 268 | 263 |
| 269 void SVGElement::setCursorElement(SVGCursorElement* cursorElement) | 264 void SVGElement::setCursorElement(SVGCursorElement* cursorElement) |
| 270 { | 265 { |
| 271 SVGElementRareData* rareData = ensureSVGRareData(); | 266 SVGElementRareData* rareData = ensureSVGRareData(); |
| 272 if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) { | 267 if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) { |
| 273 if (cursorElement == oldCursorElement) | 268 if (cursorElement == oldCursorElement) |
| 274 return; | 269 return; |
| 275 oldCursorElement->removeReferencedElement(this); | 270 oldCursorElement->removeReferencedElement(this); |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 } | 727 } |
| 733 | 728 |
| 734 if (name == classAttr) | 729 if (name == classAttr) |
| 735 return isSVGStyledElement(); | 730 return isSVGStyledElement(); |
| 736 | 731 |
| 737 return animatableAttributes.contains(name); | 732 return animatableAttributes.contains(name); |
| 738 } | 733 } |
| 739 #endif | 734 #endif |
| 740 | 735 |
| 741 } | 736 } |
| OLD | NEW |