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

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

Issue 19804005: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/IdTargetObserverRegistry.h ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class TreeScope { 49 class TreeScope {
50 friend class Document; 50 friend class Document;
51 friend class TreeScopeAdopter; 51 friend class TreeScopeAdopter;
52 52
53 public: 53 public:
54 TreeScope* parentTreeScope() const { return m_parentTreeScope; } 54 TreeScope* parentTreeScope() const { return m_parentTreeScope; }
55 void setParentTreeScope(TreeScope*); 55 void setParentTreeScope(TreeScope*);
56 56
57 Element* adjustedFocusedElement(); 57 Element* adjustedFocusedElement();
58 Element* getElementById(const AtomicString&) const; 58 Element* getElementById(const AtomicString&) const;
59 bool hasElementWithId(AtomicStringImpl* id) const; 59 bool hasElementWithId(StringImpl* id) const;
60 bool containsMultipleElementsWithId(const AtomicString& id) const; 60 bool containsMultipleElementsWithId(const AtomicString& id) const;
61 void addElementById(const AtomicString& elementId, Element*); 61 void addElementById(const AtomicString& elementId, Element*);
62 void removeElementById(const AtomicString& elementId, Element*); 62 void removeElementById(const AtomicString& elementId, Element*);
63 63
64 Document* documentScope() const { return m_documentScope; } 64 Document* documentScope() const { return m_documentScope; }
65 65
66 Node* ancestorInThisScope(Node*) const; 66 Node* ancestorInThisScope(Node*) const;
67 67
68 void addImageMap(HTMLMapElement*); 68 void addImageMap(HTMLMapElement*);
69 void removeImageMap(HTMLMapElement*); 69 void removeImageMap(HTMLMapElement*);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 OwnPtr<DocumentOrderedMap> m_elementsById; 168 OwnPtr<DocumentOrderedMap> m_elementsById;
169 OwnPtr<DocumentOrderedMap> m_imageMapsByName; 169 OwnPtr<DocumentOrderedMap> m_imageMapsByName;
170 OwnPtr<DocumentOrderedMap> m_labelsByForAttribute; 170 OwnPtr<DocumentOrderedMap> m_labelsByForAttribute;
171 171
172 OwnPtr<IdTargetObserverRegistry> m_idTargetObserverRegistry; 172 OwnPtr<IdTargetObserverRegistry> m_idTargetObserverRegistry;
173 173
174 mutable RefPtr<DOMSelection> m_selection; 174 mutable RefPtr<DOMSelection> m_selection;
175 }; 175 };
176 176
177 inline bool TreeScope::hasElementWithId(AtomicStringImpl* id) const 177 inline bool TreeScope::hasElementWithId(StringImpl* id) const
178 { 178 {
179 ASSERT(id); 179 ASSERT(id);
180 return m_elementsById && m_elementsById->contains(id); 180 return m_elementsById && m_elementsById->contains(id);
181 } 181 }
182 182
183 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co nst 183 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co nst
184 { 184 {
185 return m_elementsById && m_elementsById->containsMultiple(id.impl()); 185 return m_elementsById && m_elementsById->containsMultiple(id.impl());
186 } 186 }
187 187
188 Node* nodeFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0); 188 Node* nodeFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0);
189 TreeScope* commonTreeScope(Node*, Node*); 189 TreeScope* commonTreeScope(Node*, Node*);
190 190
191 } // namespace WebCore 191 } // namespace WebCore
192 192
193 #endif // TreeScope_h 193 #endif // TreeScope_h
OLDNEW
« no previous file with comments | « Source/core/dom/IdTargetObserverRegistry.h ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698