| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50 class TreeScope : public WillBeGarbageCollectedMixin { | 50 class TreeScope : public WillBeGarbageCollectedMixin { | 
| 51 public: | 51 public: | 
| 52     TreeScope* parentTreeScope() const { return m_parentTreeScope; } | 52     TreeScope* parentTreeScope() const { return m_parentTreeScope; } | 
| 53 | 53 | 
| 54     TreeScope* olderShadowRootOrParentTreeScope() const; | 54     TreeScope* olderShadowRootOrParentTreeScope() const; | 
| 55     bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(const TreeScope&
     ) const; | 55     bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(const TreeScope&
     ) const; | 
| 56 | 56 | 
| 57     Element* adjustedFocusedElement() const; | 57     Element* adjustedFocusedElement() const; | 
| 58     Element* getElementById(const AtomicString&) const; | 58     Element* getElementById(const AtomicString&) const; | 
| 59     const WillBeHeapVector<RawPtrWillBeMember<Element> >& getAllElementsById(con
     st AtomicString&) const; | 59     const WillBeHeapVector<RawPtrWillBeMember<Element> >& getAllElementsById(con
     st AtomicString&) const; | 
| 60     bool hasElementWithId(StringImpl* id) const; | 60     bool hasElementWithId(const AtomicString& id) const; | 
| 61     bool containsMultipleElementsWithId(const AtomicString& id) const; | 61     bool containsMultipleElementsWithId(const AtomicString& id) const; | 
| 62     void addElementById(const AtomicString& elementId, Element*); | 62     void addElementById(const AtomicString& elementId, Element*); | 
| 63     void removeElementById(const AtomicString& elementId, Element*); | 63     void removeElementById(const AtomicString& elementId, Element*); | 
| 64 | 64 | 
| 65     Document& document() const | 65     Document& document() const | 
| 66     { | 66     { | 
| 67         ASSERT(m_document); | 67         ASSERT(m_document); | 
| 68         return *m_document; | 68         return *m_document; | 
| 69     } | 69     } | 
| 70 | 70 | 
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 188     OwnPtrWillBeMember<DocumentOrderedMap> m_imageMapsByName; | 188     OwnPtrWillBeMember<DocumentOrderedMap> m_imageMapsByName; | 
| 189     OwnPtrWillBeMember<DocumentOrderedMap> m_labelsByForAttribute; | 189     OwnPtrWillBeMember<DocumentOrderedMap> m_labelsByForAttribute; | 
| 190 | 190 | 
| 191     OwnPtrWillBeMember<IdTargetObserverRegistry> m_idTargetObserverRegistry; | 191     OwnPtrWillBeMember<IdTargetObserverRegistry> m_idTargetObserverRegistry; | 
| 192 | 192 | 
| 193     OwnPtrWillBeMember<ScopedStyleResolver> m_scopedStyleResolver; | 193     OwnPtrWillBeMember<ScopedStyleResolver> m_scopedStyleResolver; | 
| 194 | 194 | 
| 195     mutable RefPtrWillBeMember<DOMSelection> m_selection; | 195     mutable RefPtrWillBeMember<DOMSelection> m_selection; | 
| 196 }; | 196 }; | 
| 197 | 197 | 
| 198 inline bool TreeScope::hasElementWithId(StringImpl* id) const | 198 inline bool TreeScope::hasElementWithId(const AtomicString& id) const | 
| 199 { | 199 { | 
| 200     ASSERT(id); | 200     ASSERT(!id.isNull()); | 
| 201     return m_elementsById && m_elementsById->contains(id); | 201     return m_elementsById && m_elementsById->contains(id); | 
| 202 } | 202 } | 
| 203 | 203 | 
| 204 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co
     nst | 204 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co
     nst | 
| 205 { | 205 { | 
| 206     return m_elementsById && m_elementsById->containsMultiple(id.impl()); | 206     return m_elementsById && m_elementsById->containsMultiple(id); | 
| 207 } | 207 } | 
| 208 | 208 | 
| 209 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope) | 209 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope) | 
| 210 | 210 | 
| 211 HitTestResult hitTestInDocument(const Document*, int x, int y); | 211 HitTestResult hitTestInDocument(const Document*, int x, int y); | 
| 212 TreeScope* commonTreeScope(Node*, Node*); | 212 TreeScope* commonTreeScope(Node*, Node*); | 
| 213 | 213 | 
| 214 } // namespace blink | 214 } // namespace blink | 
| 215 | 215 | 
| 216 #endif // TreeScope_h | 216 #endif // TreeScope_h | 
| OLD | NEW | 
|---|