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

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

Issue 18334002: Remove SVGStyledLocatableElement class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove SVGElement::isStyledLocatable() 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/SVGElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('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 21 matching lines...) Expand all
32 #include "core/css/CSSCursorImageValue.h" 32 #include "core/css/CSSCursorImageValue.h"
33 #include "core/dom/DOMImplementation.h" 33 #include "core/dom/DOMImplementation.h"
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/SVGSVGElement.h" 43 #include "core/svg/SVGSVGElement.h"
43 #include "core/svg/SVGStyledLocatableElement.h"
44 #include "core/svg/SVGTextElement.h" 44 #include "core/svg/SVGTextElement.h"
45 45
46 namespace WebCore { 46 namespace WebCore {
47 47
48 using namespace HTMLNames; 48 using namespace HTMLNames;
49 49
50 SVGElement::SVGElement(const QualifiedName& tagName, Document* document, Constru ctionType constructionType) 50 SVGElement::SVGElement(const QualifiedName& tagName, Document* document, Constru ctionType constructionType)
51 : Element(tagName, document, constructionType) 51 : Element(tagName, document, constructionType)
52 { 52 {
53 ScriptWrappable::init(this); 53 ScriptWrappable::init(this);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 { 248 {
249 if (!hasSVGRareData()) { 249 if (!hasSVGRareData()) {
250 DEFINE_STATIC_LOCAL(HashSet<SVGElementInstance*>, emptyInstances, ()); 250 DEFINE_STATIC_LOCAL(HashSet<SVGElementInstance*>, emptyInstances, ());
251 return emptyInstances; 251 return emptyInstances;
252 } 252 }
253 return svgRareData()->elementInstances(); 253 return svgRareData()->elementInstances();
254 } 254 }
255 255
256 bool SVGElement::getBoundingBox(FloatRect& rect, SVGLocatable::StyleUpdateStrate gy styleUpdateStrategy) 256 bool SVGElement::getBoundingBox(FloatRect& rect, SVGLocatable::StyleUpdateStrate gy styleUpdateStrategy)
257 { 257 {
258 if (isStyledLocatable()) { 258 if (isSVGGraphicsElement()) {
259 rect = toSVGStyledLocatableElement(this)->getBBox(styleUpdateStrategy); 259 rect = toSVGGraphicsElement(this)->getBBox(styleUpdateStrategy);
260 return true; 260 return true;
261 } 261 }
262 if (hasTagName(SVGNames::textTag)) { 262 if (hasTagName(SVGNames::textTag)) {
263 rect = static_cast<SVGTextElement*>(this)->getBBox(styleUpdateStrategy); 263 rect = static_cast<SVGTextElement*>(this)->getBBox(styleUpdateStrategy);
264 return true; 264 return true;
265 } 265 }
266 return false; 266 return false;
267 } 267 }
268 268
269 void SVGElement::setCursorElement(SVGCursorElement* cursorElement) 269 void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 } 732 }
733 733
734 if (name == classAttr) 734 if (name == classAttr)
735 return isSVGStyledElement(); 735 return isSVGStyledElement();
736 736
737 return animatableAttributes.contains(name); 737 return animatableAttributes.contains(name);
738 } 738 }
739 #endif 739 #endif
740 740
741 } 741 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698