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

Side by Side Diff: Source/core/svg/SVGGraphicsElement.h

Issue 61753005: Remove SVGLocatable and SVGTransformable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef SVGGraphicsElement_h 21 #ifndef SVGGraphicsElement_h
22 #define SVGGraphicsElement_h 22 #define SVGGraphicsElement_h
23 23
24 #include "core/svg/SVGAnimatedTransformList.h" 24 #include "core/svg/SVGAnimatedTransformList.h"
25 #include "core/svg/SVGElement.h" 25 #include "core/svg/SVGElement.h"
26 #include "core/svg/SVGTests.h" 26 #include "core/svg/SVGTests.h"
27 #include "core/svg/SVGTransformable.h"
28 27
29 namespace WebCore { 28 namespace WebCore {
30 29
31 class AffineTransform; 30 class AffineTransform;
32 class Path; 31 class Path;
33 32
34 class SVGGraphicsElement : public SVGElement, public SVGTransformable, public SV GTests { 33 class SVGGraphicsElement : public SVGElement, public SVGTests {
35 public: 34 public:
36 virtual ~SVGGraphicsElement(); 35 virtual ~SVGGraphicsElement();
37 36
38 virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate); 37 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate };
39 virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) ;
40 virtual SVGElement* nearestViewportElement() const;
41 virtual SVGElement* farthestViewportElement() const;
42 38
43 virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGTransformable::localCoordinateSpaceTransform(mode); } 39 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate);
40 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate);
41 AffineTransform getTransformToElement(SVGElement*, ExceptionState&, StyleUpd ateStrategy = AllowStyleUpdate);
pdr. 2013/11/08 23:50:48 Is the StyleUpdateStrategy parameter needed?
rwlbuis 2013/11/10 20:35:45 I think so.
pdr. 2013/11/11 00:02:09 No, it's not needed. Just remove the updateStrateg
42 SVGElement* nearestViewportElement() const;
43 SVGElement* farthestViewportElement() const;
44 static SVGElement* nearestViewportElement(const SVGElement*);
45 static SVGElement* farthestViewportElement(const SVGElement*);
pdr. 2013/11/08 23:50:48 These static methods don't belong here. The stati
rwlbuis 2013/11/10 20:35:45 Done.
46
47 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const { return animatedLocalTransform(); }
pdr. 2013/11/08 23:50:48 Please add OVERRIDE
rwlbuis 2013/11/10 20:35:45 Done.
44 virtual AffineTransform animatedLocalTransform() const; 48 virtual AffineTransform animatedLocalTransform() const;
45 virtual AffineTransform* supplementalTransform(); 49 virtual AffineTransform* supplementalTransform();
46 50
47 virtual SVGRect getBBox(); 51 virtual SVGRect getBBox();
48 SVGRect getStrokeBBox(); 52 SVGRect getStrokeBBox();
49 53
50 // "base class" methods for all the elements which render as paths 54 // "base class" methods for all the elements which render as paths
51 virtual void toClipPath(Path&); 55 virtual void toClipPath(Path&);
52 virtual RenderObject* createRenderer(RenderStyle*); 56 virtual RenderObject* createRenderer(RenderStyle*);
53 57
(...skipping 23 matching lines...) Expand all
77 inline SVGGraphicsElement* toSVGGraphicsElement(Node* node) 81 inline SVGGraphicsElement* toSVGGraphicsElement(Node* node)
78 { 82 {
79 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isSVGElement()); 83 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isSVGElement());
80 ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGGraphicsE lement()); 84 ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGGraphicsE lement());
81 return static_cast<SVGGraphicsElement*>(node); 85 return static_cast<SVGGraphicsElement*>(node);
82 } 86 }
83 87
84 } // namespace WebCore 88 } // namespace WebCore
85 89
86 #endif // SVGGraphicsElement_h 90 #endif // SVGGraphicsElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698