| 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) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 3 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 namespace Private { | 30 namespace Private { |
| 31 template<class GenericNode, class GenericNodeContainer> | 31 template<class GenericNode, class GenericNodeContainer> |
| 32 void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, Generi
cNodeContainer&); | 32 void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, Generi
cNodeContainer&); |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 class Document; | 35 class Document; |
| 36 class SVGElement; | 36 class SVGElement; |
| 37 class SVGUseElement; | 37 class SVGUseElement; |
| 38 | 38 |
| 39 // SVGElementInstance mimics Node, but without providing all its functionality | 39 // SVGElementInstance mimics Node, but without providing all its functionality |
| 40 class SVGElementInstance FINAL : public TreeShared<SVGElementInstance>, public E
ventTarget, public ScriptWrappable { | 40 class SVGElementInstance FINAL : public TreeSharedWillBeRefCountedGarbageCollect
ed<SVGElementInstance>, public EventTarget, public ScriptWrappable { |
| 41 DEFINE_EVENT_TARGET_REFCOUNTING(TreeShared<SVGElementInstance>); | 41 DEFINE_EVENT_TARGET_REFCOUNTING(TreeSharedWillBeRefCountedGarbageCollected<S
VGElementInstance>); |
| 42 public: | 42 public: |
| 43 static PassRefPtr<SVGElementInstance> create(SVGUseElement* correspondingUse
Element, SVGUseElement* directUseElement, PassRefPtr<SVGElement> originalElement
); | 43 static PassRefPtr<SVGElementInstance> create(SVGUseElement* correspondingUse
Element, SVGUseElement* directUseElement, PassRefPtr<SVGElement> originalElement
); |
| 44 | 44 |
| 45 virtual ~SVGElementInstance(); | 45 virtual ~SVGElementInstance(); |
| 46 | 46 |
| 47 void setParentOrShadowHostNode(SVGElementInstance* instance) { m_parentInsta
nce = instance; } | 47 void setParentOrShadowHostNode(SVGElementInstance* instance) { m_parentInsta
nce = instance; } |
| 48 | 48 |
| 49 virtual const AtomicString& interfaceName() const OVERRIDE; | 49 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 50 virtual ExecutionContext* executionContext() const OVERRIDE; | 50 virtual ExecutionContext* executionContext() const OVERRIDE; |
| 51 | 51 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 public: | 87 public: |
| 88 InstanceUpdateBlocker(SVGElement* targetElement); | 88 InstanceUpdateBlocker(SVGElement* targetElement); |
| 89 ~InstanceUpdateBlocker(); | 89 ~InstanceUpdateBlocker(); |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 SVGElement* m_targetElement; | 92 SVGElement* m_targetElement; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 static void invalidateAllInstancesOfElement(SVGElement*); | 95 static void invalidateAllInstancesOfElement(SVGElement*); |
| 96 | 96 |
| 97 virtual void trace(Visitor*) { } | 97 virtual void trace(Visitor*); |
| 98 | 98 |
| 99 // EventTarget API | 99 // EventTarget API |
| 100 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), abort); | 100 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), abort); |
| 101 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), blur); | 101 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), blur); |
| 102 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), change); | 102 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), change); |
| 103 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), click); | 103 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), click); |
| 104 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), contextm
enu); | 104 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), contextm
enu); |
| 105 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dblclick
); | 105 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dblclick
); |
| 106 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), error); | 106 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), error); |
| 107 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), focus); | 107 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), focus); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 void setFirstChild(SVGElementInstance* child) { m_firstChild = child; } | 169 void setFirstChild(SVGElementInstance* child) { m_firstChild = child; } |
| 170 void setLastChild(SVGElementInstance* child) { m_lastChild = child; } | 170 void setLastChild(SVGElementInstance* child) { m_lastChild = child; } |
| 171 | 171 |
| 172 void setNextSibling(SVGElementInstance* sibling) { m_nextSibling = sibling;
} | 172 void setNextSibling(SVGElementInstance* sibling) { m_nextSibling = sibling;
} |
| 173 void setPreviousSibling(SVGElementInstance* sibling) { m_previousSibling = s
ibling; } | 173 void setPreviousSibling(SVGElementInstance* sibling) { m_previousSibling = s
ibling; } |
| 174 | 174 |
| 175 virtual EventTargetData* eventTargetData() OVERRIDE; | 175 virtual EventTargetData* eventTargetData() OVERRIDE; |
| 176 virtual EventTargetData& ensureEventTargetData() OVERRIDE; | 176 virtual EventTargetData& ensureEventTargetData() OVERRIDE; |
| 177 | 177 |
| 178 SVGElementInstance* m_parentInstance; | 178 RawPtrWillBeMember<SVGElementInstance> m_parentInstance; |
| 179 | 179 |
| 180 SVGUseElement* m_correspondingUseElement; | 180 SVGUseElement* m_correspondingUseElement; |
| 181 SVGUseElement* m_directUseElement; | 181 SVGUseElement* m_directUseElement; |
| 182 RefPtr<SVGElement> m_element; | 182 RefPtrWillBeMember<SVGElement> m_element; |
| 183 RefPtr<SVGElement> m_shadowTreeElement; | 183 RefPtrWillBeMember<SVGElement> m_shadowTreeElement; |
| 184 | 184 |
| 185 SVGElementInstance* m_previousSibling; | 185 RawPtrWillBeMember<SVGElementInstance> m_previousSibling; |
| 186 SVGElementInstance* m_nextSibling; | 186 RawPtrWillBeMember<SVGElementInstance> m_nextSibling; |
| 187 | 187 |
| 188 SVGElementInstance* m_firstChild; | 188 RawPtrWillBeMember<SVGElementInstance> m_firstChild; |
| 189 SVGElementInstance* m_lastChild; | 189 RawPtrWillBeMember<SVGElementInstance> m_lastChild; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace WebCore | 192 } // namespace WebCore |
| 193 | 193 |
| 194 #endif | 194 #endif |
| OLD | NEW |