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

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

Issue 153883003: [SVG] SVGAnimatedTransform{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove m_zoomAndPan Created 6 years, 10 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/SVGGradientElement.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('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, 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,
(...skipping 12 matching lines...) Expand all
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/SVGRectTearOff.h" 26 #include "core/svg/SVGRectTearOff.h"
27 #include "core/svg/SVGTests.h" 27 #include "core/svg/SVGTests.h"
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class AffineTransform; 31 class AffineTransform;
32 class Path; 32 class Path;
33 class SVGMatrixTearOff;
33 34
34 class SVGGraphicsElement : public SVGElement, public SVGTests { 35 class SVGGraphicsElement : public SVGElement, public SVGTests {
35 public: 36 public:
36 virtual ~SVGGraphicsElement(); 37 virtual ~SVGGraphicsElement();
37 38
38 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate }; 39 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate };
39 40
40 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate); 41 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate);
41 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate); 42 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate);
42 AffineTransform getTransformToElement(SVGElement*, ExceptionState&); 43 PassRefPtr<SVGMatrixTearOff> getCTMFromJavascript();
44 PassRefPtr<SVGMatrixTearOff> getScreenCTMFromJavascript();
45
46 PassRefPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*, ExceptionSta te&);
47
43 SVGElement* nearestViewportElement() const; 48 SVGElement* nearestViewportElement() const;
44 SVGElement* farthestViewportElement() const; 49 SVGElement* farthestViewportElement() const;
45 50
46 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const OVERRIDE { return animatedLocalTransform(); } 51 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const OVERRIDE { return animatedLocalTransform(); }
47 virtual AffineTransform animatedLocalTransform() const; 52 virtual AffineTransform animatedLocalTransform() const;
48 virtual AffineTransform* supplementalTransform() OVERRIDE; 53 virtual AffineTransform* supplementalTransform() OVERRIDE;
49 54
50 virtual FloatRect getBBox(); 55 virtual FloatRect getBBox();
51 PassRefPtr<SVGRectTearOff> getBBoxFromJavascript(); 56 PassRefPtr<SVGRectTearOff> getBBoxFromJavascript();
52 57
53 // "base class" methods for all the elements which render as paths 58 // "base class" methods for all the elements which render as paths
54 virtual void toClipPath(Path&); 59 virtual void toClipPath(Path&);
55 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 60 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
56 61
57 virtual bool isValid() const OVERRIDE FINAL { return SVGTests::isValid(); } 62 virtual bool isValid() const OVERRIDE FINAL { return SVGTests::isValid(); }
58 63
64 SVGAnimatedTransformList* transform() { return m_transform.get(); }
65 const SVGAnimatedTransformList* transform() const { return m_transform.get() ; }
66
59 protected: 67 protected:
60 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat eSVGElement); 68 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat eSVGElement);
61 69
62 bool isSupportedAttribute(const QualifiedName&); 70 bool isSupportedAttribute(const QualifiedName&);
63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
64 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 72 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
65 73
74 RefPtr<SVGAnimatedTransformList> m_transform;
66 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGraphicsElement) 75 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGraphicsElement)
67 DECLARE_ANIMATED_TRANSFORM_LIST(Transform, transform)
68 END_DECLARE_ANIMATED_PROPERTIES 76 END_DECLARE_ANIMATED_PROPERTIES
69 77
70 private: 78 private:
71 virtual bool isSVGGraphicsElement() const OVERRIDE FINAL { return true; } 79 virtual bool isSVGGraphicsElement() const OVERRIDE FINAL { return true; }
72 80
73 // Used by <animateMotion> 81 // Used by <animateMotion>
74 OwnPtr<AffineTransform> m_supplementalTransform; 82 OwnPtr<AffineTransform> m_supplementalTransform;
75 }; 83 };
76 84
77 inline bool isSVGGraphicsElement(const Node& node) 85 inline bool isSVGGraphicsElement(const Node& node)
78 { 86 {
79 return node.isSVGElement() && toSVGElement(node).isSVGGraphicsElement(); 87 return node.isSVGElement() && toSVGElement(node).isSVGGraphicsElement();
80 } 88 }
81 89
82 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement); 90 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement);
83 91
84 } // namespace WebCore 92 } // namespace WebCore
85 93
86 #endif // SVGGraphicsElement_h 94 #endif // SVGGraphicsElement_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGradientElement.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698