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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 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
« no previous file with comments | « Source/core/svg/SVGMPathElement.cpp ('k') | Source/core/svg/SVGMarkerElement.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, 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 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 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 10 matching lines...) Expand all
21 #ifndef SVGMarkerElement_h 21 #ifndef SVGMarkerElement_h
22 #define SVGMarkerElement_h 22 #define SVGMarkerElement_h
23 23
24 #include "bindings/core/v8/ExceptionState.h" 24 #include "bindings/core/v8/ExceptionState.h"
25 #include "core/svg/SVGAnimatedAngle.h" 25 #include "core/svg/SVGAnimatedAngle.h"
26 #include "core/svg/SVGAnimatedBoolean.h" 26 #include "core/svg/SVGAnimatedBoolean.h"
27 #include "core/svg/SVGAnimatedEnumeration.h" 27 #include "core/svg/SVGAnimatedEnumeration.h"
28 #include "core/svg/SVGAnimatedLength.h" 28 #include "core/svg/SVGAnimatedLength.h"
29 #include "core/svg/SVGElement.h" 29 #include "core/svg/SVGElement.h"
30 #include "core/svg/SVGFitToViewBox.h" 30 #include "core/svg/SVGFitToViewBox.h"
31 #include "platform/heap/Handle.h"
31 32
32 namespace blink { 33 namespace blink {
33 34
34 enum SVGMarkerUnitsType { 35 enum SVGMarkerUnitsType {
35 SVGMarkerUnitsUnknown = 0, 36 SVGMarkerUnitsUnknown = 0,
36 SVGMarkerUnitsUserSpaceOnUse, 37 SVGMarkerUnitsUserSpaceOnUse,
37 SVGMarkerUnitsStrokeWidth 38 SVGMarkerUnitsStrokeWidth
38 }; 39 };
39 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGMarkerUn itsType>(); 40 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGMarkerUn itsType>();
40 41
41 class SVGMarkerElement final : public SVGElement, 42 class SVGMarkerElement final : public SVGElement,
42 public SVGFitToViewBox { 43 public SVGFitToViewBox {
43 DEFINE_WRAPPERTYPEINFO(); 44 DEFINE_WRAPPERTYPEINFO();
45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGMarkerElement);
44 public: 46 public:
45 // Forward declare enumerations in the W3C naming scheme, for IDL generation . 47 // Forward declare enumerations in the W3C naming scheme, for IDL generation .
46 enum { 48 enum {
47 SVG_MARKERUNITS_UNKNOWN = SVGMarkerUnitsUnknown, 49 SVG_MARKERUNITS_UNKNOWN = SVGMarkerUnitsUnknown,
48 SVG_MARKERUNITS_USERSPACEONUSE = SVGMarkerUnitsUserSpaceOnUse, 50 SVG_MARKERUNITS_USERSPACEONUSE = SVGMarkerUnitsUserSpaceOnUse,
49 SVG_MARKERUNITS_STROKEWIDTH = SVGMarkerUnitsStrokeWidth 51 SVG_MARKERUNITS_STROKEWIDTH = SVGMarkerUnitsStrokeWidth
50 }; 52 };
51 53
52 enum { 54 enum {
53 SVG_MARKER_ORIENT_UNKNOWN = SVGMarkerOrientUnknown, 55 SVG_MARKER_ORIENT_UNKNOWN = SVGMarkerOrientUnknown,
54 SVG_MARKER_ORIENT_AUTO = SVGMarkerOrientAuto, 56 SVG_MARKER_ORIENT_AUTO = SVGMarkerOrientAuto,
55 SVG_MARKER_ORIENT_ANGLE = SVGMarkerOrientAngle 57 SVG_MARKER_ORIENT_ANGLE = SVGMarkerOrientAngle
56 }; 58 };
57 59
58 DECLARE_NODE_FACTORY(SVGMarkerElement); 60 DECLARE_NODE_FACTORY(SVGMarkerElement);
59 61
60 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co nst; 62 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co nst;
61 63
62 void setOrientToAuto(); 64 void setOrientToAuto();
63 void setOrientToAngle(PassRefPtr<SVGAngleTearOff>); 65 void setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff>);
64 66
65 SVGAnimatedLength* refX() const { return m_refX.get(); } 67 SVGAnimatedLength* refX() const { return m_refX.get(); }
66 SVGAnimatedLength* refY() const { return m_refY.get(); } 68 SVGAnimatedLength* refY() const { return m_refY.get(); }
67 SVGAnimatedLength* markerWidth() const { return m_markerWidth.get(); } 69 SVGAnimatedLength* markerWidth() const { return m_markerWidth.get(); }
68 SVGAnimatedLength* markerHeight() const { return m_markerHeight.get(); } 70 SVGAnimatedLength* markerHeight() const { return m_markerHeight.get(); }
69 SVGAnimatedEnumeration<SVGMarkerUnitsType>* markerUnits() { return m_markerU nits.get(); } 71 SVGAnimatedEnumeration<SVGMarkerUnitsType>* markerUnits() { return m_markerU nits.get(); }
70 SVGAnimatedAngle* orientAngle() { return m_orientAngle.get(); } 72 SVGAnimatedAngle* orientAngle() { return m_orientAngle.get(); }
71 SVGAnimatedEnumeration<SVGMarkerOrientType>* orientType() { return m_orientA ngle->orientType(); } 73 SVGAnimatedEnumeration<SVGMarkerOrientType>* orientType() { return m_orientA ngle->orientType(); }
72 74
75 virtual void trace(Visitor*) override;
76
73 private: 77 private:
74 explicit SVGMarkerElement(Document&); 78 explicit SVGMarkerElement(Document&);
75 79
76 virtual bool needsPendingResourceHandling() const override { return false; } 80 virtual bool needsPendingResourceHandling() const override { return false; }
77 81
78 bool isSupportedAttribute(const QualifiedName&); 82 bool isSupportedAttribute(const QualifiedName&);
79 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 83 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
80 virtual void svgAttributeChanged(const QualifiedName&) override; 84 virtual void svgAttributeChanged(const QualifiedName&) override;
81 virtual void childrenChanged(const ChildrenChange&) override; 85 virtual void childrenChanged(const ChildrenChange&) override;
82 86
83 virtual RenderObject* createRenderer(RenderStyle*) override; 87 virtual RenderObject* createRenderer(RenderStyle*) override;
84 virtual bool rendererIsNeeded(const RenderStyle&) override { return true; } 88 virtual bool rendererIsNeeded(const RenderStyle&) override { return true; }
85 89
86 virtual bool selfHasRelativeLengths() const override; 90 virtual bool selfHasRelativeLengths() const override;
87 91
88 RefPtr<SVGAnimatedLength> m_refX; 92 RefPtrWillBeMember<SVGAnimatedLength> m_refX;
89 RefPtr<SVGAnimatedLength> m_refY; 93 RefPtrWillBeMember<SVGAnimatedLength> m_refY;
90 RefPtr<SVGAnimatedLength> m_markerWidth; 94 RefPtrWillBeMember<SVGAnimatedLength> m_markerWidth;
91 RefPtr<SVGAnimatedLength> m_markerHeight; 95 RefPtrWillBeMember<SVGAnimatedLength> m_markerHeight;
92 RefPtr<SVGAnimatedAngle> m_orientAngle; 96 RefPtrWillBeMember<SVGAnimatedAngle> m_orientAngle;
93 RefPtr<SVGAnimatedEnumeration<SVGMarkerUnitsType> > m_markerUnits; 97 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGMarkerUnitsType> > m_markerUnit s;
94 }; 98 };
95 99
96 } // namespace blink 100 } // namespace blink
97 101
98 #endif // SVGMarkerElement_h 102 #endif // SVGMarkerElement_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMPathElement.cpp ('k') | Source/core/svg/SVGMarkerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698