Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: Source/core/dom/TreeScope.h

Issue 1134173002: Get rid of TreeBoundaryCrossingRules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing important UA rules. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 TreeScope* commonAncestorTreeScope(TreeScope& other); 134 TreeScope* commonAncestorTreeScope(TreeScope& other);
135 135
136 Element* getElementByAccessKey(const String& key) const; 136 Element* getElementByAccessKey(const String& key) const;
137 137
138 DECLARE_VIRTUAL_TRACE(); 138 DECLARE_VIRTUAL_TRACE();
139 139
140 ScopedStyleResolver* scopedStyleResolver() const { return m_scopedStyleResol ver.get(); } 140 ScopedStyleResolver* scopedStyleResolver() const { return m_scopedStyleResol ver.get(); }
141 ScopedStyleResolver& ensureScopedStyleResolver(); 141 ScopedStyleResolver& ensureScopedStyleResolver();
142 void clearScopedStyleResolver(); 142 void clearScopedStyleResolver();
143 143
144 TreeScope* composedParent();
145
146 static TreeScope* treeScopeInComposedTree(const Node&);
147
144 protected: 148 protected:
145 TreeScope(ContainerNode&, Document&); 149 TreeScope(ContainerNode&, Document&);
146 TreeScope(Document&); 150 TreeScope(Document&);
147 virtual ~TreeScope(); 151 virtual ~TreeScope();
148 152
149 #if !ENABLE(OILPAN) 153 #if !ENABLE(OILPAN)
150 void destroyTreeScopeData(); 154 void destroyTreeScopeData();
151 #endif 155 #endif
152 156
153 void setDocument(Document& document) { m_document = &document; } 157 void setDocument(Document& document) { m_document = &document; }
154 void setParentTreeScope(TreeScope&); 158 void setParentTreeScope(TreeScope&);
159 void clearComposedParent() { m_composedParent = nullptr; }
155 160
156 #if !ENABLE(OILPAN) 161 #if !ENABLE(OILPAN)
157 bool hasGuardRefCount() const { return m_guardRefCount; } 162 bool hasGuardRefCount() const { return m_guardRefCount; }
158 #endif 163 #endif
159 164
160 void setNeedsStyleRecalcForViewportUnits(); 165 void setNeedsStyleRecalcForViewportUnits();
161 166
162 private: 167 private:
163 #if !ENABLE(OILPAN) 168 #if !ENABLE(OILPAN)
164 virtual void dispose() { } 169 virtual void dispose() { }
165 170
166 int refCount() const; 171 int refCount() const;
167 172
168 #if ENABLE(SECURITY_ASSERT) 173 #if ENABLE(SECURITY_ASSERT)
169 bool deletionHasBegun(); 174 bool deletionHasBegun();
170 void beginDeletion(); 175 void beginDeletion();
171 #else 176 #else
172 bool deletionHasBegun() { return false; } 177 bool deletionHasBegun() { return false; }
173 void beginDeletion() { } 178 void beginDeletion() { }
174 #endif 179 #endif
175 #endif 180 #endif
176 181
177 bool rootNodeHasTreeSharedParent() const; 182 bool rootNodeHasTreeSharedParent() const;
178 183
179 RawPtrWillBeMember<ContainerNode> m_rootNode; 184 RawPtrWillBeMember<ContainerNode> m_rootNode;
180 RawPtrWillBeMember<Document> m_document; 185 RawPtrWillBeMember<Document> m_document;
181 RawPtrWillBeMember<TreeScope> m_parentTreeScope; 186 RawPtrWillBeMember<TreeScope> m_parentTreeScope;
187 RawPtrWillBeMember<TreeScope> m_composedParent;
182 188
183 #if !ENABLE(OILPAN) 189 #if !ENABLE(OILPAN)
184 int m_guardRefCount; 190 int m_guardRefCount;
185 #endif 191 #endif
186 192
187 OwnPtrWillBeMember<DocumentOrderedMap> m_elementsById; 193 OwnPtrWillBeMember<DocumentOrderedMap> m_elementsById;
188 OwnPtrWillBeMember<DocumentOrderedMap> m_imageMapsByName; 194 OwnPtrWillBeMember<DocumentOrderedMap> m_imageMapsByName;
189 OwnPtrWillBeMember<DocumentOrderedMap> m_labelsByForAttribute; 195 OwnPtrWillBeMember<DocumentOrderedMap> m_labelsByForAttribute;
190 196
191 OwnPtrWillBeMember<IdTargetObserverRegistry> m_idTargetObserverRegistry; 197 OwnPtrWillBeMember<IdTargetObserverRegistry> m_idTargetObserverRegistry;
(...skipping 14 matching lines...) Expand all
206 return m_elementsById && m_elementsById->containsMultiple(id); 212 return m_elementsById && m_elementsById->containsMultiple(id);
207 } 213 }
208 214
209 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope) 215 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope)
210 216
211 HitTestResult hitTestInDocument(const Document*, int x, int y); 217 HitTestResult hitTestInDocument(const Document*, int x, int y);
212 218
213 } // namespace blink 219 } // namespace blink
214 220
215 #endif // TreeScope_h 221 #endif // TreeScope_h
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698