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

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

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CORE_EXPORT Created 5 years, 1 month 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
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(const TreeScope& ) const; 57 bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(const TreeScope& ) const;
58 58
59 Element* adjustedFocusedElement() const; 59 Element* adjustedFocusedElement() const;
60 Element* getElementById(const AtomicString&) const; 60 Element* getElementById(const AtomicString&) const;
61 const WillBeHeapVector<RawPtrWillBeMember<Element>>& getAllElementsById(cons t AtomicString&) const; 61 const WillBeHeapVector<RawPtrWillBeMember<Element>>& getAllElementsById(cons t AtomicString&) const;
62 bool hasElementWithId(const AtomicString& id) const; 62 bool hasElementWithId(const AtomicString& id) const;
63 bool containsMultipleElementsWithId(const AtomicString& id) const; 63 bool containsMultipleElementsWithId(const AtomicString& id) const;
64 void addElementById(const AtomicString& elementId, Element*); 64 void addElementById(const AtomicString& elementId, Element*);
65 void removeElementById(const AtomicString& elementId, Element*); 65 void removeElementById(const AtomicString& elementId, Element*);
66 66
67 Document& document() const 67 Document& document() const;
68 {
69 ASSERT(m_document);
70 return *m_document;
71 }
72 68
73 Node* ancestorInThisScope(Node*) const; 69 Node* ancestorInThisScope(Node*) const;
74 70
75 void addImageMap(HTMLMapElement*); 71 void addImageMap(HTMLMapElement*);
76 void removeImageMap(HTMLMapElement*); 72 void removeImageMap(HTMLMapElement*);
77 HTMLMapElement* getImageMap(const String& url) const; 73 HTMLMapElement* getImageMap(const String& url) const;
78 74
79 Element* elementFromPoint(int x, int y) const; 75 Element* elementFromPoint(int x, int y) const;
80 Element* hitTestPoint(int x, int y, const HitTestRequest&) const; 76 Element* hitTestPoint(int x, int y, const HitTestRequest&) const;
81 WillBeHeapVector<RawPtrWillBeMember<Element>> elementsFromPoint(int x, int y ) const; 77 WillBeHeapVector<RawPtrWillBeMember<Element>> elementsFromPoint(int x, int y ) const;
(...skipping 12 matching lines...) Expand all
94 // for an anchor with the given name. ID matching is always case sensitive, but 90 // for an anchor with the given name. ID matching is always case sensitive, but
95 // Anchor name matching is case sensitive in strict mode and not case sensit ive in 91 // Anchor name matching is case sensitive in strict mode and not case sensit ive in
96 // quirks mode for historical compatibility reasons. 92 // quirks mode for historical compatibility reasons.
97 Element* findAnchor(const String& name); 93 Element* findAnchor(const String& name);
98 94
99 // Used by the basic DOM mutation methods (e.g., appendChild()). 95 // Used by the basic DOM mutation methods (e.g., appendChild()).
100 void adoptIfNeeded(Node&); 96 void adoptIfNeeded(Node&);
101 97
102 ContainerNode& rootNode() const { return *m_rootNode; } 98 ContainerNode& rootNode() const { return *m_rootNode; }
103 99
104 IdTargetObserverRegistry& idTargetObserverRegistry() const { return *m_idTar getObserverRegistry.get(); } 100 IdTargetObserverRegistry& idTargetObserverRegistry() const;
105 101
106 #if !ENABLE(OILPAN) 102 #if !ENABLE(OILPAN)
107 // Nodes belonging to this scope hold guard references - 103 // Nodes belonging to this scope hold guard references -
108 // these are enough to keep the scope from being destroyed, but 104 // these are enough to keep the scope from being destroyed, but
109 // not enough to keep it from removing its children. This allows a 105 // not enough to keep it from removing its children. This allows a
110 // node that outlives its scope to still have a valid document 106 // node that outlives its scope to still have a valid document
111 // pointer without introducing reference cycles. 107 // pointer without introducing reference cycles.
112 void guardRef() 108 void guardRef()
113 { 109 {
114 ASSERT(!deletionHasBegun()); 110 ASSERT(!deletionHasBegun());
(...skipping 17 matching lines...) Expand all
132 bool isInclusiveAncestorOf(const TreeScope&) const; 128 bool isInclusiveAncestorOf(const TreeScope&) const;
133 unsigned short comparePosition(const TreeScope&) const; 129 unsigned short comparePosition(const TreeScope&) const;
134 130
135 const TreeScope* commonAncestorTreeScope(const TreeScope& other) const; 131 const TreeScope* commonAncestorTreeScope(const TreeScope& other) const;
136 TreeScope* commonAncestorTreeScope(TreeScope& other); 132 TreeScope* commonAncestorTreeScope(TreeScope& other);
137 133
138 Element* getElementByAccessKey(const String& key) const; 134 Element* getElementByAccessKey(const String& key) const;
139 135
140 DECLARE_VIRTUAL_TRACE(); 136 DECLARE_VIRTUAL_TRACE();
141 137
142 ScopedStyleResolver* scopedStyleResolver() const { return m_scopedStyleResol ver.get(); } 138 ScopedStyleResolver* scopedStyleResolver() const;
143 ScopedStyleResolver& ensureScopedStyleResolver(); 139 ScopedStyleResolver& ensureScopedStyleResolver();
144 void clearScopedStyleResolver(); 140 void clearScopedStyleResolver();
145 141
146 protected: 142 protected:
147 TreeScope(ContainerNode&, Document&); 143 TreeScope(ContainerNode&, Document&);
148 TreeScope(Document&); 144 TreeScope(Document&);
149 virtual ~TreeScope(); 145 virtual ~TreeScope();
150 146
151 #if !ENABLE(OILPAN) 147 #if !ENABLE(OILPAN)
152 void destroyTreeScopeData(); 148 void destroyTreeScopeData();
153 #endif 149 #endif
154 150
155 void setDocument(Document& document) { m_document = &document; } 151 void setDocument(Document&);
156 void setParentTreeScope(TreeScope&); 152 void setParentTreeScope(TreeScope&);
157 153
158 #if !ENABLE(OILPAN) 154 #if !ENABLE(OILPAN)
159 bool hasGuardRefCount() const { return m_guardRefCount; } 155 bool hasGuardRefCount() const { return m_guardRefCount; }
160 #endif 156 #endif
161 157
162 void setNeedsStyleRecalcForViewportUnits(); 158 void setNeedsStyleRecalcForViewportUnits();
163 159
164 private: 160 private:
165 #if !ENABLE(OILPAN) 161 #if !ENABLE(OILPAN)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 return m_elementsById && m_elementsById->containsMultiple(id); 204 return m_elementsById && m_elementsById->containsMultiple(id);
209 } 205 }
210 206
211 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope) 207 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope)
212 208
213 HitTestResult hitTestInDocument(const Document*, int x, int y, const HitTestRequ est& = HitTestRequest::ReadOnly | HitTestRequest::Active); 209 HitTestResult hitTestInDocument(const Document*, int x, int y, const HitTestRequ est& = HitTestRequest::ReadOnly | HitTestRequest::Active);
214 210
215 } // namespace blink 211 } // namespace blink
216 212
217 #endif // TreeScope_h 213 #endif // TreeScope_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | third_party/WebKit/Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698