| 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 SVGPropertyBase* toAtEndOfDurationValue, | 68 SVGPropertyBase* toAtEndOfDurationValue, |
| 69 SVGElement*) = 0; | 69 SVGElement*) = 0; |
| 70 virtual float calculateDistance(SVGPropertyBase* to, SVGElement*) = 0; | 70 virtual float calculateDistance(SVGPropertyBase* to, SVGElement*) = 0; |
| 71 | 71 |
| 72 virtual AnimatedPropertyType type() const = 0; | 72 virtual AnimatedPropertyType type() const = 0; |
| 73 | 73 |
| 74 SVGPropertyBase* ownerList() const { return m_ownerList; } | 74 SVGPropertyBase* ownerList() const { return m_ownerList; } |
| 75 | 75 |
| 76 void setOwnerList(SVGPropertyBase* ownerList) { | 76 void setOwnerList(SVGPropertyBase* ownerList) { |
| 77 // Previous owner list must be cleared before setting new owner list. | 77 // Previous owner list must be cleared before setting new owner list. |
| 78 ASSERT((!ownerList && m_ownerList) || (ownerList && !m_ownerList)); | 78 DCHECK((!ownerList && m_ownerList) || (ownerList && !m_ownerList)); |
| 79 | 79 |
| 80 m_ownerList = ownerList; | 80 m_ownerList = ownerList; |
| 81 } | 81 } |
| 82 | 82 |
| 83 DEFINE_INLINE_VIRTUAL_TRACE() {} | 83 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 84 | 84 |
| 85 protected: | 85 protected: |
| 86 SVGPropertyBase() : m_ownerList(nullptr) {} | 86 SVGPropertyBase() : m_ownerList(nullptr) {} |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 // Oilpan: the back reference to the owner should be a Member, but this can | 89 // Oilpan: the back reference to the owner should be a Member, but this can |
| 90 // create cycles when SVG properties meet the off-heap InterpolationValue | 90 // create cycles when SVG properties meet the off-heap InterpolationValue |
| 91 // hierarchy. Not tracing it is safe, albeit an undesirable state of affairs. | 91 // hierarchy. Not tracing it is safe, albeit an undesirable state of affairs. |
| 92 // See http://crbug.com/528275 for the detail. | 92 // See http://crbug.com/528275 for the detail. |
| 93 UntracedMember<SVGPropertyBase> m_ownerList; | 93 UntracedMember<SVGPropertyBase> m_ownerList; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 #define DEFINE_SVG_PROPERTY_TYPE_CASTS(thisType) \ | 96 #define DEFINE_SVG_PROPERTY_TYPE_CASTS(thisType) \ |
| 97 DEFINE_TYPE_CASTS(thisType, SVGPropertyBase, value, \ | 97 DEFINE_TYPE_CASTS(thisType, SVGPropertyBase, value, \ |
| 98 value->type() == thisType::classType(), \ | 98 value->type() == thisType::classType(), \ |
| 99 value.type() == thisType::classType()); | 99 value.type() == thisType::classType()); |
| 100 | 100 |
| 101 } // namespace blink | 101 } // namespace blink |
| 102 | 102 |
| 103 #endif // SVGProperty_h | 103 #endif // SVGProperty_h |
| OLD | NEW |