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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static PassRefPtrWillBeRawPtr<SVGPathSegList> create(SVGPathElement* context
Element) | 51 static PassRefPtrWillBeRawPtr<SVGPathSegList> create(SVGPathElement* context
Element) |
52 { | 52 { |
53 return adoptRefWillBeNoop(new SVGPathSegList(contextElement)); | 53 return adoptRefWillBeNoop(new SVGPathSegList(contextElement)); |
54 } | 54 } |
55 static PassRefPtrWillBeRawPtr<SVGPathSegList> create() | 55 static PassRefPtrWillBeRawPtr<SVGPathSegList> create() |
56 { | 56 { |
57 ASSERT_NOT_REACHED(); | 57 ASSERT_NOT_REACHED(); |
58 return nullptr; | 58 return nullptr; |
59 } | 59 } |
60 | 60 |
61 virtual ~SVGPathSegList(); | 61 ~SVGPathSegList() override; |
62 | 62 |
63 const SVGPathByteStream* byteStream() const; | 63 const SVGPathByteStream* byteStream() const; |
64 void clearByteStream() { m_byteStream.clear(); } | 64 void clearByteStream() { m_byteStream.clear(); } |
65 | 65 |
66 // SVGListPropertyHelper methods with |m_byteStream| sync: | 66 // SVGListPropertyHelper methods with |m_byteStream| sync: |
67 | 67 |
68 ItemPropertyType* at(size_t index) | 68 ItemPropertyType* at(size_t index) |
69 { | 69 { |
70 updateListFromByteStream(); | 70 updateListFromByteStream(); |
71 return Base::at(index); | 71 return Base::at(index); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 PassRefPtrWillBeRawPtr<ItemPropertyType> removeItem(size_t index, ExceptionS
tate& exceptionState) | 127 PassRefPtrWillBeRawPtr<ItemPropertyType> removeItem(size_t index, ExceptionS
tate& exceptionState) |
128 { | 128 { |
129 updateListFromByteStream(); | 129 updateListFromByteStream(); |
130 clearByteStream(); | 130 clearByteStream(); |
131 return Base::removeItem(index, exceptionState); | 131 return Base::removeItem(index, exceptionState); |
132 } | 132 } |
133 | 133 |
134 PassRefPtrWillBeRawPtr<ItemPropertyType> appendItem(PassRefPtrWillBeRawPtr<I
temPropertyType> passItem); | 134 PassRefPtrWillBeRawPtr<ItemPropertyType> appendItem(PassRefPtrWillBeRawPtr<I
temPropertyType> passItem); |
135 | 135 |
136 // SVGPropertyBase: | 136 // SVGPropertyBase: |
137 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const Stri
ng&) const override; | 137 PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String&) con
st override; |
138 virtual PassRefPtrWillBeRawPtr<SVGPathSegList> clone() override; | 138 PassRefPtrWillBeRawPtr<SVGPathSegList> clone() override; |
139 virtual String valueAsString() const override; | 139 String valueAsString() const override; |
140 void setValueAsString(const String&, ExceptionState&); | 140 void setValueAsString(const String&, ExceptionState&); |
141 | 141 |
142 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; | 142 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; |
143 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRef
PtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase
> toAtEndOfDurationValue, SVGElement*) override; | 143 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned
repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRefPtrWillB
eRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEn
dOfDurationValue, SVGElement*) override; |
144 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to,
SVGElement*) override; | 144 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme
nt*) override; |
145 | 145 |
146 static AnimatedPropertyType classType() { return AnimatedPath; } | 146 static AnimatedPropertyType classType() { return AnimatedPath; } |
147 | 147 |
148 DECLARE_VIRTUAL_TRACE(); | 148 DECLARE_VIRTUAL_TRACE(); |
149 | 149 |
150 private: | 150 private: |
151 explicit SVGPathSegList(SVGPathElement*); | 151 explicit SVGPathSegList(SVGPathElement*); |
152 SVGPathSegList(SVGPathElement*, PassOwnPtr<SVGPathByteStream>); | 152 SVGPathSegList(SVGPathElement*, PassOwnPtr<SVGPathByteStream>); |
153 | 153 |
154 friend class SVGPathSegListBuilder; | 154 friend class SVGPathSegListBuilder; |
(...skipping 19 matching lines...) Expand all Loading... |
174 inline PassRefPtrWillBeRawPtr<SVGPathSegList> toSVGPathSegList(PassRefPtrWillBeR
awPtr<SVGPropertyBase> passBase) | 174 inline PassRefPtrWillBeRawPtr<SVGPathSegList> toSVGPathSegList(PassRefPtrWillBeR
awPtr<SVGPropertyBase> passBase) |
175 { | 175 { |
176 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; | 176 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; |
177 ASSERT(base->type() == SVGPathSegList::classType()); | 177 ASSERT(base->type() == SVGPathSegList::classType()); |
178 return static_pointer_cast<SVGPathSegList>(base.release()); | 178 return static_pointer_cast<SVGPathSegList>(base.release()); |
179 } | 179 } |
180 | 180 |
181 } // namespace blink | 181 } // namespace blink |
182 | 182 |
183 #endif | 183 #endif |
OLD | NEW |