OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 | 100 |
101 protected: | 101 protected: |
102 NodeRareDataBase(RenderObject* renderer) | 102 NodeRareDataBase(RenderObject* renderer) |
103 : m_renderer(renderer) | 103 : m_renderer(renderer) |
104 { } | 104 { } |
105 | 105 |
106 private: | 106 private: |
107 RenderObject* m_renderer; | 107 RenderObject* m_renderer; |
108 }; | 108 }; |
109 | 109 |
110 class Node : public EventTarget, public ScriptWrappable, public TreeSharedWillBe RefCountedGarbageCollected<Node> { | 110 class Node : public EventTarget, public ScriptWrappable, public TreeSharedWillBe GarbageCollectedFinalized<Node> { |
haraken
2014/06/11 04:47:55
GarbageCollectedFinalized should be the left-most
haraken
2014/06/11 04:47:55
Ian: This is a question not related to this CL, bu
haraken
2014/06/11 04:59:04
On the other hand, I remembered that TreeShared mu
Mads Ager (chromium)
2014/06/11 05:48:22
It seems that we got lucky that the layout of the
Mads Ager (chromium)
2014/06/11 05:48:22
Yes, Ian's change to move all EventTargets to the
tkent
2014/06/12 10:12:49
Done.
| |
111 friend class Document; | 111 friend class Document; |
112 friend class TreeScope; | 112 friend class TreeScope; |
113 friend class TreeScopeAdopter; | 113 friend class TreeScopeAdopter; |
114 | 114 |
115 DEFINE_EVENT_TARGET_REFCOUNTING(TreeSharedWillBeRefCountedGarbageCollected<N ode>); | 115 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeSharedWillBeGarbageColle ctedFinalized<Node>); |
116 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Node); | 116 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Node); |
117 public: | 117 public: |
118 enum NodeType { | 118 enum NodeType { |
119 ELEMENT_NODE = 1, | 119 ELEMENT_NODE = 1, |
120 ATTRIBUTE_NODE = 2, | 120 ATTRIBUTE_NODE = 2, |
121 TEXT_NODE = 3, | 121 TEXT_NODE = 3, |
122 CDATA_SECTION_NODE = 4, | 122 CDATA_SECTION_NODE = 4, |
123 PROCESSING_INSTRUCTION_NODE = 7, | 123 PROCESSING_INSTRUCTION_NODE = 7, |
124 COMMENT_NODE = 8, | 124 COMMENT_NODE = 8, |
125 DOCUMENT_NODE = 9, | 125 DOCUMENT_NODE = 9, |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
896 // This requires isClassName(const Node&). | 896 // This requires isClassName(const Node&). |
897 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \ | 897 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \ |
898 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) { return to##thisType(node.get()); } \ | 898 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) { return to##thisType(node.get()); } \ |
899 DEFINE_TYPE_CASTS(thisType, Node, node, is##thisType(*node), is##thisType(no de)) | 899 DEFINE_TYPE_CASTS(thisType, Node, node, is##thisType(*node), is##thisType(no de)) |
900 | 900 |
901 #define DECLARE_NODE_FACTORY(T) \ | 901 #define DECLARE_NODE_FACTORY(T) \ |
902 static PassRefPtrWillBeRawPtr<T> create(Document&) | 902 static PassRefPtrWillBeRawPtr<T> create(Document&) |
903 #define DEFINE_NODE_FACTORY(T) \ | 903 #define DEFINE_NODE_FACTORY(T) \ |
904 PassRefPtrWillBeRawPtr<T> T::create(Document& document) \ | 904 PassRefPtrWillBeRawPtr<T> T::create(Document& document) \ |
905 { \ | 905 { \ |
906 return adoptRefWillBeRefCountedGarbageCollected(new T(document)); \ | 906 return adoptRefWillBeNoop(new T(document)); \ |
907 } | 907 } |
908 | 908 |
909 } // namespace WebCore | 909 } // namespace WebCore |
910 | 910 |
911 #ifndef NDEBUG | 911 #ifndef NDEBUG |
912 // Outside the WebCore namespace for ease of invocation from gdb. | 912 // Outside the WebCore namespace for ease of invocation from gdb. |
913 void showNode(const WebCore::Node*); | 913 void showNode(const WebCore::Node*); |
914 void showTree(const WebCore::Node*); | 914 void showTree(const WebCore::Node*); |
915 void showNodePath(const WebCore::Node*); | 915 void showNodePath(const WebCore::Node*); |
916 #endif | 916 #endif |
917 | 917 |
918 #endif | 918 #endif |
OLD | NEW |