| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/svg/SVGElementRareData.h" | 6 #include "core/svg/SVGElementRareData.h" |
| 7 | 7 |
| 8 #include "core/css/CSSCursorImageValue.h" | 8 #include "core/css/CSSCursorImageValue.h" |
| 9 #include "core/css/resolver/StyleResolver.h" | 9 #include "core/css/resolver/StyleResolver.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 visitor->trace(m_correspondingElement); | 44 visitor->trace(m_correspondingElement); |
| 45 visitor->trace(m_owner); | 45 visitor->trace(m_owner); |
| 46 visitor->template registerWeakMembers<SVGElementRareData, &SVGElementRareDat
a::processWeakMembers>(this); | 46 visitor->template registerWeakMembers<SVGElementRareData, &SVGElementRareDat
a::processWeakMembers>(this); |
| 47 #endif | 47 #endif |
| 48 } | 48 } |
| 49 | 49 |
| 50 void SVGElementRareData::processWeakMembers(Visitor* visitor) | 50 void SVGElementRareData::processWeakMembers(Visitor* visitor) |
| 51 { | 51 { |
| 52 #if ENABLE(OILPAN) | 52 #if ENABLE(OILPAN) |
| 53 ASSERT(m_owner); | 53 ASSERT(m_owner); |
| 54 if (!visitor->isHeapObjectAlive(m_cursorElement)) | 54 if (!Heap::isHeapObjectAlive(m_cursorElement)) |
| 55 m_cursorElement = nullptr; | 55 m_cursorElement = nullptr; |
| 56 | 56 |
| 57 if (!visitor->isHeapObjectAlive(m_cursorImageValue)) { | 57 if (!Heap::isHeapObjectAlive(m_cursorImageValue)) { |
| 58 // The owning SVGElement is still alive and if it is pointing to an
SVGCursorElement | 58 // The owning SVGElement is still alive and if it is pointing to an
SVGCursorElement |
| 59 // we unregister it when the CSSCursorImageValue dies. | 59 // we unregister it when the CSSCursorImageValue dies. |
| 60 if (m_cursorElement) { | 60 if (m_cursorElement) { |
| 61 m_cursorElement->removeReferencedElement(m_owner); | 61 m_cursorElement->removeReferencedElement(m_owner); |
| 62 m_cursorElement = nullptr; | 62 m_cursorElement = nullptr; |
| 63 } | 63 } |
| 64 m_cursorImageValue = nullptr; | 64 m_cursorImageValue = nullptr; |
| 65 } | 65 } |
| 66 ASSERT(!m_cursorElement || visitor->isHeapObjectAlive(m_cursorElement)); | 66 ASSERT(!m_cursorElement || Heap::isHeapObjectAlive(m_cursorElement)); |
| 67 ASSERT(!m_cursorImageValue || visitor->isHeapObjectAlive(m_cursorImageVa
lue)); | 67 ASSERT(!m_cursorImageValue || Heap::isHeapObjectAlive(m_cursorImageValue
)); |
| 68 #endif | 68 #endif |
| 69 } | 69 } |
| 70 | 70 |
| 71 AffineTransform* SVGElementRareData::animateMotionTransform() | 71 AffineTransform* SVGElementRareData::animateMotionTransform() |
| 72 { | 72 { |
| 73 if (!m_animateMotionTransform) | 73 if (!m_animateMotionTransform) |
| 74 m_animateMotionTransform = adoptPtr(new AffineTransform); | 74 m_animateMotionTransform = adoptPtr(new AffineTransform); |
| 75 return m_animateMotionTransform.get(); | 75 return m_animateMotionTransform.get(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } | 78 } |
| OLD | NEW |