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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/StyleSheetCollections.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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ASSERT(!deletionHasBegun()); 117 ASSERT(!deletionHasBegun());
118 --m_guardRefCount; 118 --m_guardRefCount;
119 if (!m_guardRefCount && !refCount() && this != noDocumentInstance() && ! rootNodeHasTreeSharedParent()) { 119 if (!m_guardRefCount && !refCount() && this != noDocumentInstance() && ! rootNodeHasTreeSharedParent()) {
120 beginDeletion(); 120 beginDeletion();
121 delete this; 121 delete this;
122 } 122 }
123 } 123 }
124 124
125 void removedLastRefToScope(); 125 void removedLastRefToScope();
126 126
127 bool isInclusiveAncestorOf(const TreeScope&) const; 127 bool isInclusiveAncestorOf(NonNullPtr<const TreeScope>) const;
128 unsigned short comparePosition(const TreeScope&) const; 128 unsigned short comparePosition(NonNullPtr<const TreeScope>) const;
129 129
130 Element* getElementByAccessKey(const String& key) const; 130 Element* getElementByAccessKey(const String& key) const;
131 131
132 protected: 132 protected:
133 TreeScope(ContainerNode*, Document*); 133 TreeScope(ContainerNode*, Document*);
134 TreeScope(Document*); 134 TreeScope(Document*);
135 virtual ~TreeScope(); 135 virtual ~TreeScope();
136 136
137 void destroyTreeScopeData(); 137 void destroyTreeScopeData();
138 void clearDocumentScope(); 138 void clearDocumentScope();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 { 185 {
186 return m_elementsById && m_elementsById->containsMultiple(id.impl()); 186 return m_elementsById && m_elementsById->containsMultiple(id.impl());
187 } 187 }
188 188
189 Node* nodeFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0); 189 Node* nodeFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0);
190 TreeScope* commonTreeScope(Node*, Node*); 190 TreeScope* commonTreeScope(Node*, Node*);
191 191
192 } // namespace WebCore 192 } // namespace WebCore
193 193
194 #endif // TreeScope_h 194 #endif // TreeScope_h
OLDNEW
« no previous file with comments | « Source/core/dom/StyleSheetCollections.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698