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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 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 | Annotate | Revision Log
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 * Copyright (C) 2014 Google, Inc. 4 * Copyright (C) 2014 Google, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #ifndef SVGGraphicsElement_h 22 #ifndef SVGGraphicsElement_h
23 #define SVGGraphicsElement_h 23 #define SVGGraphicsElement_h
24 24
25 #include "core/svg/SVGAnimatedTransformList.h" 25 #include "core/svg/SVGAnimatedTransformList.h"
26 #include "core/svg/SVGElement.h" 26 #include "core/svg/SVGElement.h"
27 #include "core/svg/SVGRectTearOff.h" 27 #include "core/svg/SVGRectTearOff.h"
28 #include "core/svg/SVGTests.h" 28 #include "core/svg/SVGTests.h"
29 #include "platform/heap/Handle.h"
29 30
30 namespace blink { 31 namespace blink {
31 32
32 class AffineTransform; 33 class AffineTransform;
33 class Path; 34 class Path;
34 class SVGMatrixTearOff; 35 class SVGMatrixTearOff;
35 36
36 class SVGGraphicsElement : public SVGElement, public SVGTests { 37 class SVGGraphicsElement : public SVGElement, public SVGTests {
37 DEFINE_WRAPPERTYPEINFO(); 38 DEFINE_WRAPPERTYPEINFO();
39 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGGraphicsElement);
38 public: 40 public:
39 virtual ~SVGGraphicsElement(); 41 virtual ~SVGGraphicsElement();
40 42
41 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate }; 43 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate };
42 44
43 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate); 45 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate);
44 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate); 46 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate);
45 PassRefPtr<SVGMatrixTearOff> getCTMFromJavascript(); 47 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getCTMFromJavascript();
46 PassRefPtr<SVGMatrixTearOff> getScreenCTMFromJavascript(); 48 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getScreenCTMFromJavascript();
47 49
48 PassRefPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*, ExceptionSta te&); 50 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*, ExceptionState&);
49 51
50 SVGElement* nearestViewportElement() const; 52 SVGElement* nearestViewportElement() const;
51 SVGElement* farthestViewportElement() const; 53 SVGElement* farthestViewportElement() const;
52 54
53 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const override { return animatedLocalTransform(); } 55 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const override { return animatedLocalTransform(); }
54 virtual AffineTransform animatedLocalTransform() const; 56 virtual AffineTransform animatedLocalTransform() const;
55 virtual AffineTransform* animateMotionTransform() override; 57 virtual AffineTransform* animateMotionTransform() override;
56 58
57 virtual FloatRect getBBox(); 59 virtual FloatRect getBBox();
58 PassRefPtr<SVGRectTearOff> getBBoxFromJavascript(); 60 PassRefPtrWillBeRawPtr<SVGRectTearOff> getBBoxFromJavascript();
59 61
60 // "base class" methods for all the elements which render as paths 62 // "base class" methods for all the elements which render as paths
61 virtual void toClipPath(Path&); 63 virtual void toClipPath(Path&);
62 virtual RenderObject* createRenderer(RenderStyle*) override; 64 virtual RenderObject* createRenderer(RenderStyle*) override;
63 65
64 virtual bool isValid() const override final { return SVGTests::isValid(); } 66 virtual bool isValid() const override final { return SVGTests::isValid(); }
65 67
66 SVGAnimatedTransformList* transform() { return m_transform.get(); } 68 SVGAnimatedTransformList* transform() { return m_transform.get(); }
67 const SVGAnimatedTransformList* transform() const { return m_transform.get() ; } 69 const SVGAnimatedTransformList* transform() const { return m_transform.get() ; }
68 70
69 AffineTransform computeCTM(SVGElement::CTMScope mode, SVGGraphicsElement::St yleUpdateStrategy, 71 AffineTransform computeCTM(SVGElement::CTMScope mode, SVGGraphicsElement::St yleUpdateStrategy,
70 const SVGGraphicsElement* ancestor = 0) const; 72 const SVGGraphicsElement* ancestor = 0) const;
71 73
74 virtual void trace(Visitor*) override;
75
72 protected: 76 protected:
73 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat eSVGElement); 77 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat eSVGElement);
74 78
75 virtual bool supportsFocus() const override { return Element::supportsFocus( ) || hasFocusEventListeners(); } 79 virtual bool supportsFocus() const override { return Element::supportsFocus( ) || hasFocusEventListeners(); }
76 80
77 bool isSupportedAttribute(const QualifiedName&); 81 bool isSupportedAttribute(const QualifiedName&);
78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 82 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
79 virtual void svgAttributeChanged(const QualifiedName&) override; 83 virtual void svgAttributeChanged(const QualifiedName&) override;
80 84
81 RefPtr<SVGAnimatedTransformList> m_transform; 85 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform;
82 86
83 private: 87 private:
84 virtual bool isSVGGraphicsElement() const override final { return true; } 88 virtual bool isSVGGraphicsElement() const override final { return true; }
85 }; 89 };
86 90
87 inline bool isSVGGraphicsElement(const SVGElement& element) 91 inline bool isSVGGraphicsElement(const SVGElement& element)
88 { 92 {
89 return element.isSVGGraphicsElement(); 93 return element.isSVGGraphicsElement();
90 } 94 }
91 95
92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement); 96 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement);
93 97
94 } // namespace blink 98 } // namespace blink
95 99
96 #endif // SVGGraphicsElement_h 100 #endif // SVGGraphicsElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698