OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 // for an anchor with the given name. ID matching is always case sensitive, but | 91 // for an anchor with the given name. ID matching is always case sensitive, but |
92 // Anchor name matching is case sensitive in strict mode and not case sensit ive in | 92 // Anchor name matching is case sensitive in strict mode and not case sensit ive in |
93 // quirks mode for historical compatibility reasons. | 93 // quirks mode for historical compatibility reasons. |
94 Element* findAnchor(const String& name); | 94 Element* findAnchor(const String& name); |
95 | 95 |
96 bool applyAuthorStyles() const; | 96 bool applyAuthorStyles() const; |
97 | 97 |
98 // Used by the basic DOM mutation methods (e.g., appendChild()). | 98 // Used by the basic DOM mutation methods (e.g., appendChild()). |
99 void adoptIfNeeded(Node&); | 99 void adoptIfNeeded(Node&); |
100 | 100 |
101 Node& rootNode() const { return m_rootNode; } | 101 Node& rootNode() const { return *m_rootNode; } |
102 | 102 |
103 IdTargetObserverRegistry& idTargetObserverRegistry() const { return *m_idTar getObserverRegistry.get(); } | 103 IdTargetObserverRegistry& idTargetObserverRegistry() const { return *m_idTar getObserverRegistry.get(); } |
104 | 104 |
105 | 105 |
106 #if !ENABLE(OILPAN) | 106 #if !ENABLE(OILPAN) |
107 // Nodes belonging to this scope hold guard references - | 107 // Nodes belonging to this scope hold guard references - |
108 // these are enough to keep the scope from being destroyed, but | 108 // these are enough to keep the scope from being destroyed, but |
109 // not enough to keep it from removing its children. This allows a | 109 // not enough to keep it from removing its children. This allows a |
110 // node that outlives its scope to still have a valid document | 110 // node that outlives its scope to still have a valid document |
111 // pointer without introducing reference cycles. | 111 // pointer without introducing reference cycles. |
(...skipping 25 matching lines...) Expand all Loading... | |
137 | 137 |
138 Element* getElementByAccessKey(const String& key) const; | 138 Element* getElementByAccessKey(const String& key) const; |
139 | 139 |
140 virtual void trace(Visitor*); | 140 virtual void trace(Visitor*); |
141 | 141 |
142 protected: | 142 protected: |
143 TreeScope(ContainerNode&, Document&); | 143 TreeScope(ContainerNode&, Document&); |
144 TreeScope(Document&); | 144 TreeScope(Document&); |
145 virtual ~TreeScope(); | 145 virtual ~TreeScope(); |
146 | 146 |
147 void destroyTreeScopeData(); | 147 void destroyTreeScopeData(); |
haraken
2014/05/06 15:59:42
You can add #if !ENABLE(OILPAN) to this method.
Mads Ager (chromium)
2014/05/07 12:13:16
Done.
| |
148 void setDocument(Document& document) { m_document = &document; } | 148 void setDocument(Document& document) { m_document = &document; } |
149 void setParentTreeScope(TreeScope&); | 149 void setParentTreeScope(TreeScope&); |
150 | 150 |
151 #if !ENABLE(OILPAN) | 151 #if !ENABLE(OILPAN) |
152 bool hasGuardRefCount() const { return m_guardRefCount; } | 152 bool hasGuardRefCount() const { return m_guardRefCount; } |
153 #endif | 153 #endif |
154 | 154 |
155 void setNeedsStyleRecalcForViewportUnits(); | 155 void setNeedsStyleRecalcForViewportUnits(); |
156 | 156 |
157 private: | 157 private: |
158 virtual void dispose() { } | 158 virtual void dispose() { } |
haraken
2014/05/06 15:59:42
You can add #if !ENABLE(OILPAN) to this method and
Mads Ager (chromium)
2014/05/07 12:13:16
I left this one in so I don't have to change the d
| |
159 | 159 |
160 #if !ENABLE(OILPAN) | |
160 int refCount() const; | 161 int refCount() const; |
161 #if SECURITY_ASSERT_ENABLED | 162 #endif |
163 | |
164 #if SECURITY_ASSERT_ENABLED && !ENABLE(OILPAN) | |
haraken
2014/05/06 15:59:42
This should be:
#if !ENABLE(OILPAN)
int refCount(
Mads Ager (chromium)
2014/05/07 12:13:16
Done.
| |
162 bool deletionHasBegun(); | 165 bool deletionHasBegun(); |
163 void beginDeletion(); | 166 void beginDeletion(); |
164 #else | 167 #else |
165 bool deletionHasBegun() { return false; } | 168 bool deletionHasBegun() { return false; } |
166 void beginDeletion() { } | 169 void beginDeletion() { } |
167 #endif | 170 #endif |
168 | 171 |
169 bool rootNodeHasTreeSharedParent() const; | 172 bool rootNodeHasTreeSharedParent() const; |
170 | 173 |
171 Node& m_rootNode; | 174 RawPtrWillBeMember<Node> m_rootNode; |
172 Document* m_document; | 175 RawPtrWillBeMember<Document> m_document; |
173 RawPtrWillBeMember<TreeScope> m_parentTreeScope; | 176 RawPtrWillBeMember<TreeScope> m_parentTreeScope; |
174 | 177 |
175 #if !ENABLE(OILPAN) | 178 #if !ENABLE(OILPAN) |
176 int m_guardRefCount; | 179 int m_guardRefCount; |
177 #endif | 180 #endif |
178 | 181 |
179 OwnPtr<DocumentOrderedMap> m_elementsById; | 182 OwnPtr<DocumentOrderedMap> m_elementsById; |
180 OwnPtr<DocumentOrderedMap> m_imageMapsByName; | 183 OwnPtr<DocumentOrderedMap> m_imageMapsByName; |
181 OwnPtr<DocumentOrderedMap> m_labelsByForAttribute; | 184 OwnPtr<DocumentOrderedMap> m_labelsByForAttribute; |
182 | 185 |
(...skipping 19 matching lines...) Expand all Loading... | |
202 inline bool operator!=(const TreeScope& a, const TreeScope& b) { return !(a == b ); } | 205 inline bool operator!=(const TreeScope& a, const TreeScope& b) { return !(a == b ); } |
203 inline bool operator!=(const TreeScope& a, const TreeScope* b) { return !(a == b ); } | 206 inline bool operator!=(const TreeScope& a, const TreeScope* b) { return !(a == b ); } |
204 inline bool operator!=(const TreeScope* a, const TreeScope& b) { return !(a == b ); } | 207 inline bool operator!=(const TreeScope* a, const TreeScope& b) { return !(a == b ); } |
205 | 208 |
206 HitTestResult hitTestInDocument(const Document*, int x, int y); | 209 HitTestResult hitTestInDocument(const Document*, int x, int y); |
207 TreeScope* commonTreeScope(Node*, Node*); | 210 TreeScope* commonTreeScope(Node*, Node*); |
208 | 211 |
209 } // namespace WebCore | 212 } // namespace WebCore |
210 | 213 |
211 #endif // TreeScope_h | 214 #endif // TreeScope_h |
OLD | NEW |