OLD | NEW |
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 24 matching lines...) Expand all Loading... |
35 #include "core/svg/SVGPathSeg.h" | 35 #include "core/svg/SVGPathSeg.h" |
36 #include "core/svg/properties/SVGAnimatedProperty.h" | 36 #include "core/svg/properties/SVGAnimatedProperty.h" |
37 #include "core/svg/properties/SVGListPropertyHelper.h" | 37 #include "core/svg/properties/SVGListPropertyHelper.h" |
38 #include "wtf/WeakPtr.h" | 38 #include "wtf/WeakPtr.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class SVGPathElement; | 42 class SVGPathElement; |
43 class SVGPathSegListTearOff; | 43 class SVGPathSegListTearOff; |
44 | 44 |
45 class SVGPathSegList : public SVGListPropertyHelper<SVGPathSegList, SVGPathSeg>
{ | 45 class GC_PLUGIN_IGNORE("") SVGPathSegList : public SVGListPropertyHelper<SVGPath
SegList, SVGPathSeg> { |
46 public: | 46 public: |
47 typedef void PrimitiveType; | 47 typedef void PrimitiveType; |
48 typedef SVGPathSeg ItemPropertyType; | 48 typedef SVGPathSeg ItemPropertyType; |
49 typedef SVGPathSegListTearOff TearOffType; | 49 typedef SVGPathSegListTearOff TearOffType; |
50 typedef SVGListPropertyHelper<SVGPathSegList, SVGPathSeg> Base; | 50 typedef SVGListPropertyHelper<SVGPathSegList, SVGPathSeg> Base; |
51 | 51 |
52 static PassRefPtrWillBeRawPtr<SVGPathSegList> create(SVGPathElement* context
Element) | 52 static PassRefPtrWillBeRawPtr<SVGPathSegList> create(SVGPathElement* context
Element) |
53 { | 53 { |
54 return adoptRefWillBeNoop(new SVGPathSegList(contextElement)); | 54 return adoptRefWillBeNoop(new SVGPathSegList(contextElement)); |
55 } | 55 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 virtual PassRefPtrWillBeRawPtr<SVGPathSegList> clone() override; | 139 virtual PassRefPtrWillBeRawPtr<SVGPathSegList> clone() override; |
140 virtual String valueAsString() const override; | 140 virtual String valueAsString() const override; |
141 void setValueAsString(const String&, ExceptionState&); | 141 void setValueAsString(const String&, ExceptionState&); |
142 | 142 |
143 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; | 143 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; |
144 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRef
PtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase
> toAtEndOfDurationValue, SVGElement*) override; | 144 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRef
PtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase
> toAtEndOfDurationValue, SVGElement*) override; |
145 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to,
SVGElement*) override; | 145 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to,
SVGElement*) override; |
146 | 146 |
147 static AnimatedPropertyType classType() { return AnimatedPath; } | 147 static AnimatedPropertyType classType() { return AnimatedPath; } |
148 | 148 |
149 virtual void trace(Visitor*) override; | 149 DECLARE_TRACE(virtual,override); |
150 | 150 |
151 private: | 151 private: |
152 explicit SVGPathSegList(SVGPathElement*); | 152 explicit SVGPathSegList(SVGPathElement*); |
153 SVGPathSegList(SVGPathElement*, PassOwnPtr<SVGPathByteStream>); | 153 SVGPathSegList(SVGPathElement*, PassOwnPtr<SVGPathByteStream>); |
154 | 154 |
155 friend class SVGPathSegListBuilder; | 155 friend class SVGPathSegListBuilder; |
156 // This is only to be called from SVGPathSegListBuilder. | 156 // This is only to be called from SVGPathSegListBuilder. |
157 void appendWithoutByteStreamSync(PassRefPtrWillBeRawPtr<ItemPropertyType> pa
ssNewItem) | 157 void appendWithoutByteStreamSync(PassRefPtrWillBeRawPtr<ItemPropertyType> pa
ssNewItem) |
158 { | 158 { |
159 Base::append(passNewItem); | 159 Base::append(passNewItem); |
(...skipping 15 matching lines...) Expand all Loading... |
175 inline PassRefPtrWillBeRawPtr<SVGPathSegList> toSVGPathSegList(PassRefPtrWillBeR
awPtr<SVGPropertyBase> passBase) | 175 inline PassRefPtrWillBeRawPtr<SVGPathSegList> toSVGPathSegList(PassRefPtrWillBeR
awPtr<SVGPropertyBase> passBase) |
176 { | 176 { |
177 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; | 177 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; |
178 ASSERT(base->type() == SVGPathSegList::classType()); | 178 ASSERT(base->type() == SVGPathSegList::classType()); |
179 return static_pointer_cast<SVGPathSegList>(base.release()); | 179 return static_pointer_cast<SVGPathSegList>(base.release()); |
180 } | 180 } |
181 | 181 |
182 } // namespace blink | 182 } // namespace blink |
183 | 183 |
184 #endif | 184 #endif |
OLD | NEW |