Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: Source/core/svg/SVGElement.cpp

Issue 18503004: Have SVGTextContentElement inherit SVGGraphicsElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really remove SVGLocatable IDL interface Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGLocatable.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGLocatable.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698