Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 G* * Redistributions in binary form must reproduce the above | 10 G* * Redistributions in binary form must reproduce the above |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 | 85 |
| 86 void setReadOnly() | 86 void setReadOnly() |
| 87 { | 87 { |
| 88 m_isReadOnly = true; | 88 m_isReadOnly = true; |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool isSpecified() const; | 91 bool isSpecified() const; |
| 92 | 92 |
| 93 DEFINE_INLINE_VIRTUAL_TRACE() | 93 DEFINE_INLINE_VIRTUAL_TRACE() |
| 94 { | 94 { |
| 95 visitor->trace(m_contextElement); | |
| 96 } | 95 } |
| 97 | 96 |
| 98 protected: | 97 protected: |
| 99 SVGAnimatedPropertyBase(AnimatedPropertyType, SVGElement*, const QualifiedNa me& attributeName); | 98 SVGAnimatedPropertyBase(AnimatedPropertyType, SVGElement*, const QualifiedNa me& attributeName); |
| 100 | 99 |
| 101 private: | 100 private: |
| 102 const AnimatedPropertyType m_type; | 101 const AnimatedPropertyType m_type; |
| 103 bool m_isReadOnly; | 102 bool m_isReadOnly; |
| 104 | 103 |
| 105 // This reference is kept alive from V8 wrapper | 104 // This reference is kept alive from V8 wrapper |
| 106 RawPtrWillBeMember<SVGElement> m_contextElement; | 105 // TODO(oilpan): This should be a Member. Currently we cannot do it because |
| 106 // it creates a cycle as follows: | |
| 107 // SVGInterporation =(Persistent)=> | |
| 108 // SVGAnimatedProperty =(Member)=> | |
| 109 // SVGElement =(Member)=> | |
| 110 // ElementRareData =(Member)=> | |
| 111 // ElementAnimations =(part of object)=> | |
| 112 // CSSAnimations =(part of object)=> | |
| 113 // CSSAnimationUpdate =(Member)=> | |
| 114 // NewTransition =(Member)=> | |
| 115 // InertEffect =(Member)=> | |
| 116 // EffectModel =(RefPtr)=> | |
| 117 // InterpolationEffect =(RefPtr)=> | |
| 118 // InterpolationRecord =(RefPtr)=> | |
| 119 // SVGInterpolation | |
| 120 SVGElement* m_contextElement; | |
|
sof
2015/09/04 07:16:49
Add a GC_PLUGIN_IGNORE() (and a tracking issue, if
haraken
2015/09/04 07:18:03
Will do in a follow-up (to fix the leak in oilpan
| |
| 107 | 121 |
| 108 const QualifiedName& m_attributeName; | 122 const QualifiedName& m_attributeName; |
| 109 }; | 123 }; |
| 110 | 124 |
| 111 template <typename Property> | 125 template <typename Property> |
| 112 class SVGAnimatedPropertyCommon : public SVGAnimatedPropertyBase { | 126 class SVGAnimatedPropertyCommon : public SVGAnimatedPropertyBase { |
| 113 public: | 127 public: |
| 114 Property* baseValue() | 128 Property* baseValue() |
| 115 { | 129 { |
| 116 return m_baseValue.get(); | 130 return m_baseValue.get(); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 // When animated: | 335 // When animated: |
| 322 // m_animValTearOff targets m_currentValue. | 336 // m_animValTearOff targets m_currentValue. |
| 323 // m_baseValTearOff targets m_baseValue. | 337 // m_baseValTearOff targets m_baseValue. |
| 324 RefPtrWillBeMember<TearOffType> m_baseValTearOff; | 338 RefPtrWillBeMember<TearOffType> m_baseValTearOff; |
| 325 RefPtrWillBeMember<TearOffType> m_animValTearOff; | 339 RefPtrWillBeMember<TearOffType> m_animValTearOff; |
| 326 }; | 340 }; |
| 327 | 341 |
| 328 } // namespace blink | 342 } // namespace blink |
| 329 | 343 |
| 330 #endif // SVGAnimatedProperty_h | 344 #endif // SVGAnimatedProperty_h |
| OLD | NEW |