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

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

Issue 672853002: Implement "auto -> angle" animation on <marker> orient attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 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 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 *
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void setValue(float); 86 void setValue(float);
87 float value() const; 87 float value() const;
88 88
89 void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { m_valueInSpecif iedUnits = valueInSpecifiedUnits; } 89 void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { m_valueInSpecif iedUnits = valueInSpecifiedUnits; }
90 float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; } 90 float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
91 91
92 void newValueSpecifiedUnits(SVGAngleType unitType, float valueInSpecifiedUni ts); 92 void newValueSpecifiedUnits(SVGAngleType unitType, float valueInSpecifiedUni ts);
93 void convertToSpecifiedUnits(SVGAngleType unitType, ExceptionState&); 93 void convertToSpecifiedUnits(SVGAngleType unitType, ExceptionState&);
94 94
95 SVGEnumeration<SVGMarkerOrientType>* orientType() { return m_orientType.get( ); } 95 SVGEnumeration<SVGMarkerOrientType>* orientType() { return m_orientType.get( ); }
96 const SVGEnumeration<SVGMarkerOrientType>* orientType() const { return m_ori entType.get(); }
96 void orientTypeChanged(); 97 void orientTypeChanged();
97 98
98 // SVGPropertyBase: 99 // SVGPropertyBase:
99 100
100 PassRefPtr<SVGAngle> clone() const; 101 PassRefPtr<SVGAngle> clone() const;
101 102
102 virtual String valueAsString() const override; 103 virtual String valueAsString() const override;
103 void setValueAsString(const String&, ExceptionState&); 104 void setValueAsString(const String&, ExceptionState&);
104 105
105 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr ide; 106 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr ide;
106 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBa se> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextE lement) override; 107 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBa se> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextE lement) override;
107 virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement) override; 108 virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement) override;
108 109
109 static AnimatedPropertyType classType() { return AnimatedAngle; } 110 static AnimatedPropertyType classType() { return AnimatedAngle; }
110 111
111 private: 112 private:
112 SVGAngle(); 113 SVGAngle();
113 SVGAngle(SVGAngleType, float, SVGMarkerOrientType); 114 SVGAngle(SVGAngleType, float, SVGMarkerOrientType);
114 115
116 void assign(const SVGAngle&);
117
115 SVGAngleType m_unitType; 118 SVGAngleType m_unitType;
116 float m_valueInSpecifiedUnits; 119 float m_valueInSpecifiedUnits;
117 RefPtr<SVGMarkerOrientEnumeration> m_orientType; 120 RefPtr<SVGMarkerOrientEnumeration> m_orientType;
118 }; 121 };
119 122
120 inline PassRefPtr<SVGAngle> toSVGAngle(PassRefPtr<SVGPropertyBase> passBase) 123 inline PassRefPtr<SVGAngle> toSVGAngle(PassRefPtr<SVGPropertyBase> passBase)
121 { 124 {
122 RefPtr<SVGPropertyBase> base = passBase; 125 RefPtr<SVGPropertyBase> base = passBase;
123 ASSERT(base->type() == SVGAngle::classType()); 126 ASSERT(base->type() == SVGAngle::classType());
124 return static_pointer_cast<SVGAngle>(base.release()); 127 return static_pointer_cast<SVGAngle>(base.release());
125 } 128 }
126 129
127 } // namespace blink 130 } // namespace blink
128 131
129 #endif // SVGAngle_h 132 #endif // SVGAngle_h
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/animate-marker-orient-from-auto-to-angle-expected.txt ('k') | Source/core/svg/SVGAngle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698