| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 4 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #include "config.h" | 22 #include "config.h" |
| 23 | 23 |
| 24 #include "core/svg/SVGElementInstance.h" | 24 #include "core/svg/SVGElementInstance.h" |
| 25 | 25 |
| 26 #include "core/dom/ContainerNodeAlgorithms.h" | 26 #include "core/dom/ContainerNodeAlgorithms.h" |
| 27 #include "core/events/Event.h" | 27 #include "core/events/Event.h" |
| 28 #include "core/events/EventListener.h" | 28 #include "core/events/EventListener.h" |
| 29 #include "core/svg/SVGDocumentExtensions.h" |
| 29 #include "core/svg/SVGElement.h" | 30 #include "core/svg/SVGElement.h" |
| 30 #include "core/svg/SVGUseElement.h" | 31 #include "core/svg/SVGUseElement.h" |
| 31 | 32 |
| 32 #include "wtf/RefCountedLeakCounter.h" | 33 #include "wtf/RefCountedLeakCounter.h" |
| 33 | 34 |
| 34 namespace WebCore { | 35 namespace WebCore { |
| 35 | 36 |
| 36 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, instanceCounter, ("WebCoreS
VGElementInstance")); | 37 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, instanceCounter, ("WebCoreS
VGElementInstance")); |
| 37 | 38 |
| 38 // EventTarget API | 39 // EventTarget API |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 removeDetachedChildrenInContainer<SVGElementInstance, SVGElementInstance>(*t
his); | 151 removeDetachedChildrenInContainer<SVGElementInstance, SVGElementInstance>(*t
his); |
| 151 #endif | 152 #endif |
| 152 } | 153 } |
| 153 | 154 |
| 154 void SVGElementInstance::setShadowTreeElement(SVGElement* element) | 155 void SVGElementInstance::setShadowTreeElement(SVGElement* element) |
| 155 { | 156 { |
| 156 ASSERT(element); | 157 ASSERT(element); |
| 157 m_shadowTreeElement = element; | 158 m_shadowTreeElement = element; |
| 158 // Register as instance for passed element. | 159 // Register as instance for passed element. |
| 159 m_element->mapInstanceToElement(shadowTreeElement()); | 160 m_element->mapInstanceToElement(shadowTreeElement()); |
| 160 | |
| 161 } | 161 } |
| 162 | 162 |
| 163 void SVGElementInstance::appendChild(PassRefPtrWillBeRawPtr<SVGElementInstance>
child) | 163 void SVGElementInstance::appendChild(PassRefPtrWillBeRawPtr<SVGElementInstance>
child) |
| 164 { | 164 { |
| 165 appendChildToContainer<SVGElementInstance, SVGElementInstance>(*child, *this
); | 165 appendChildToContainer<SVGElementInstance, SVGElementInstance>(*child, *this
); |
| 166 } | 166 } |
| 167 | 167 |
| 168 const AtomicString& SVGElementInstance::interfaceName() const | 168 const AtomicString& SVGElementInstance::interfaceName() const |
| 169 { | 169 { |
| 170 return EventTargetNames::SVGElementInstance; | 170 return EventTargetNames::SVGElementInstance; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 visitor->trace(m_directUseElement); | 230 visitor->trace(m_directUseElement); |
| 231 visitor->trace(m_element); | 231 visitor->trace(m_element); |
| 232 visitor->trace(m_shadowTreeElement); | 232 visitor->trace(m_shadowTreeElement); |
| 233 visitor->trace(m_previousSibling); | 233 visitor->trace(m_previousSibling); |
| 234 visitor->trace(m_nextSibling); | 234 visitor->trace(m_nextSibling); |
| 235 visitor->trace(m_firstChild); | 235 visitor->trace(m_firstChild); |
| 236 visitor->trace(m_lastChild); | 236 visitor->trace(m_lastChild); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } | 239 } |
| OLD | NEW |