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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTransformTearOff.h

Issue 2360083002: Remove SVGSVGElement dependency from SVGTransformListTearOff (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SVGTransformTearOff_h 31 #ifndef SVGTransformTearOff_h
32 #define SVGTransformTearOff_h 32 #define SVGTransformTearOff_h
33 33
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "core/svg/SVGMatrixTearOff.h"
36 #include "core/svg/SVGTransform.h" 35 #include "core/svg/SVGTransform.h"
37 #include "core/svg/properties/SVGPropertyTearOff.h" 36 #include "core/svg/properties/SVGPropertyTearOff.h"
38 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
39 38
40 namespace blink { 39 namespace blink {
41 40
41 class SVGMatrixTearOff;
42
42 class SVGTransformTearOff final : public SVGPropertyTearOff<SVGTransform>, publi c ScriptWrappable { 43 class SVGTransformTearOff final : public SVGPropertyTearOff<SVGTransform>, publi c ScriptWrappable {
43 DEFINE_WRAPPERTYPEINFO(); 44 DEFINE_WRAPPERTYPEINFO();
44 public: 45 public:
45 enum SVGTransformType { 46 enum SVGTransformType {
46 kSvgTransformUnknown = blink::kSvgTransformUnknown, 47 kSvgTransformUnknown = blink::kSvgTransformUnknown,
47 kSvgTransformMatrix = blink::kSvgTransformMatrix, 48 kSvgTransformMatrix = blink::kSvgTransformMatrix,
48 kSvgTransformTranslate = blink::kSvgTransformTranslate, 49 kSvgTransformTranslate = blink::kSvgTransformTranslate,
49 kSvgTransformScale = blink::kSvgTransformScale, 50 kSvgTransformScale = blink::kSvgTransformScale,
50 kSvgTransformRotate = blink::kSvgTransformRotate, 51 kSvgTransformRotate = blink::kSvgTransformRotate,
51 kSvgTransformSkewx = blink::kSvgTransformSkewx, 52 kSvgTransformSkewx = blink::kSvgTransformSkewx,
52 kSvgTransformSkewy = blink::kSvgTransformSkewy, 53 kSvgTransformSkewy = blink::kSvgTransformSkewy,
53 }; 54 };
54 55
55 static SVGTransformTearOff* create(SVGTransform* target, SVGElement* context Element, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attribute Name = QualifiedName::null()) 56 static SVGTransformTearOff* create(SVGTransform* target, SVGElement* context Element, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attribute Name = QualifiedName::null())
56 { 57 {
57 return new SVGTransformTearOff(target, contextElement, propertyIsAnimVal , attributeName); 58 return new SVGTransformTearOff(target, contextElement, propertyIsAnimVal , attributeName);
58 } 59 }
60 static SVGTransformTearOff* create(SVGMatrixTearOff*);
59 61
60 ~SVGTransformTearOff() override; 62 ~SVGTransformTearOff() override;
61 63
62 unsigned short transformType() { return target()->transformType(); } 64 unsigned short transformType() { return target()->transformType(); }
63 SVGMatrixTearOff* matrix(); 65 SVGMatrixTearOff* matrix();
64 float angle() { return target()->angle(); } 66 float angle() { return target()->angle(); }
65 67
66 void setMatrix(SVGMatrixTearOff*, ExceptionState&); 68 void setMatrix(SVGMatrixTearOff*, ExceptionState&);
67 void setTranslate(float tx, float ty, ExceptionState&); 69 void setTranslate(float tx, float ty, ExceptionState&);
68 void setScale(float sx, float sy, ExceptionState&); 70 void setScale(float sx, float sy, ExceptionState&);
69 void setRotate(float angle, float cx, float cy, ExceptionState&); 71 void setRotate(float angle, float cx, float cy, ExceptionState&);
70 void setSkewX(float, ExceptionState&); 72 void setSkewX(float, ExceptionState&);
71 void setSkewY(float, ExceptionState&); 73 void setSkewY(float, ExceptionState&);
72 74
73 DECLARE_VIRTUAL_TRACE(); 75 DECLARE_VIRTUAL_TRACE();
74 76
75 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 77 DECLARE_VIRTUAL_TRACE_WRAPPERS();
76 78
77 private: 79 private:
78 SVGTransformTearOff(SVGTransform*, SVGElement* contextElement, PropertyIsAni mValType, const QualifiedName& attributeName); 80 SVGTransformTearOff(SVGTransform*, SVGElement* contextElement, PropertyIsAni mValType, const QualifiedName& attributeName);
79 81
80 Member<SVGMatrixTearOff> m_matrixTearoff; 82 Member<SVGMatrixTearOff> m_matrixTearoff;
81 }; 83 };
82 84
83 } // namespace blink 85 } // namespace blink
84 86
85 #endif // SVGTransformTearOff_h 87 #endif // SVGTransformTearOff_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698