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

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

Issue 1544673003: Refactor propagation of parsing errors for SVG attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 *
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 SVGAngle_h 22 #ifndef SVGAngle_h
23 #define SVGAngle_h 23 #define SVGAngle_h
24 24
25 #include "core/svg/SVGEnumeration.h" 25 #include "core/svg/SVGEnumeration.h"
26 #include "core/svg/SVGParsingError.h"
26 #include "core/svg/properties/SVGPropertyHelper.h" 27 #include "core/svg/properties/SVGPropertyHelper.h"
27 #include "platform/heap/Handle.h" 28 #include "platform/heap/Handle.h"
28 29
29 namespace blink { 30 namespace blink {
30 31
31 class SVGAngle; 32 class SVGAngle;
32 class SVGAngleTearOff; 33 class SVGAngleTearOff;
33 34
34 enum SVGMarkerOrientType { 35 enum SVGMarkerOrientType {
35 SVGMarkerOrientUnknown = 0, 36 SVGMarkerOrientUnknown = 0,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 97
97 SVGEnumeration<SVGMarkerOrientType>* orientType() { return m_orientType.get( ); } 98 SVGEnumeration<SVGMarkerOrientType>* orientType() { return m_orientType.get( ); }
98 const SVGEnumeration<SVGMarkerOrientType>* orientType() const { return m_ori entType.get(); } 99 const SVGEnumeration<SVGMarkerOrientType>* orientType() const { return m_ori entType.get(); }
99 void orientTypeChanged(); 100 void orientTypeChanged();
100 101
101 // SVGPropertyBase: 102 // SVGPropertyBase:
102 103
103 PassRefPtrWillBeRawPtr<SVGAngle> clone() const; 104 PassRefPtrWillBeRawPtr<SVGAngle> clone() const;
104 105
105 String valueAsString() const override; 106 String valueAsString() const override;
106 void setValueAsString(const String&, ExceptionState&); 107 SVGParsingError setValueAsString(const String&);
107 108
108 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; 109 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
109 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio nValue, SVGElement* contextElement) override; 110 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio nValue, SVGElement* contextElement) override;
110 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme nt* contextElement) override; 111 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme nt* contextElement) override;
111 112
112 static AnimatedPropertyType classType() { return AnimatedAngle; } 113 static AnimatedPropertyType classType() { return AnimatedAngle; }
113 114
114 DECLARE_VIRTUAL_TRACE(); 115 DECLARE_VIRTUAL_TRACE();
115 116
116 private: 117 private:
117 SVGAngle(); 118 SVGAngle();
118 SVGAngle(SVGAngleType, float, SVGMarkerOrientType); 119 SVGAngle(SVGAngleType, float, SVGMarkerOrientType);
119 120
120 void assign(const SVGAngle&); 121 void assign(const SVGAngle&);
121 122
122 SVGAngleType m_unitType; 123 SVGAngleType m_unitType;
123 float m_valueInSpecifiedUnits; 124 float m_valueInSpecifiedUnits;
124 RefPtrWillBeMember<SVGMarkerOrientEnumeration> m_orientType; 125 RefPtrWillBeMember<SVGMarkerOrientEnumeration> m_orientType;
125 }; 126 };
126 127
127 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGAngle); 128 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGAngle);
128 129
129 } // namespace blink 130 } // namespace blink
130 131
131 #endif // SVGAngle_h 132 #endif // SVGAngle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698