| 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 28 matching lines...) Expand all Loading... |
| 39 class ContainerNode; | 39 class ContainerNode; |
| 40 class DOMSelection; | 40 class DOMSelection; |
| 41 class Document; | 41 class Document; |
| 42 class Element; | 42 class Element; |
| 43 class HTMLMapElement; | 43 class HTMLMapElement; |
| 44 class HitTestResult; | 44 class HitTestResult; |
| 45 class IdTargetObserverRegistry; | 45 class IdTargetObserverRegistry; |
| 46 class ScopedStyleResolver; | 46 class ScopedStyleResolver; |
| 47 class Node; | 47 class Node; |
| 48 | 48 |
| 49 // A class which inherits both Node and TreeScope must call clearRareData() in i
ts destructor | 49 // A class which inherits both Node and TreeScope must call clearRareData() in |
| 50 // so that the Node destructor no longer does problematic NodeList cache manipul
ation in | 50 // its destructor so that the Node destructor no longer does problematic |
| 51 // the destructor. | 51 // NodeList cache manipulation in the destructor. |
| 52 class CORE_EXPORT TreeScope : public GarbageCollectedMixin { | 52 class CORE_EXPORT TreeScope : public GarbageCollectedMixin { |
| 53 public: | 53 public: |
| 54 TreeScope* parentTreeScope() const { return m_parentTreeScope; } | 54 TreeScope* parentTreeScope() const { return m_parentTreeScope; } |
| 55 | 55 |
| 56 TreeScope* olderShadowRootOrParentTreeScope() const; | 56 TreeScope* olderShadowRootOrParentTreeScope() const; |
| 57 bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( | 57 bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( |
| 58 const TreeScope&) const; | 58 const TreeScope&) const; |
| 59 | 59 |
| 60 Element* adjustedFocusedElement() const; | 60 Element* adjustedFocusedElement() const; |
| 61 // Finds a retargeted element to the given argument, when the retargetd elemen
t is in this | 61 // Finds a retargeted element to the given argument, when the retargeted |
| 62 // TreeScope. Returns null otherwise. | 62 // element is in this TreeScope. Returns null otherwise. |
| 63 // TODO(kochi): once this algorithm is named in the spec, rename the method na
me. | 63 // TODO(kochi): once this algorithm is named in the spec, rename the method |
| 64 // name. |
| 64 Element* adjustedElement(const Element&) const; | 65 Element* adjustedElement(const Element&) const; |
| 65 Element* getElementById(const AtomicString&) const; | 66 Element* getElementById(const AtomicString&) const; |
| 66 const HeapVector<Member<Element>>& getAllElementsById( | 67 const HeapVector<Member<Element>>& getAllElementsById( |
| 67 const AtomicString&) const; | 68 const AtomicString&) const; |
| 68 bool hasElementWithId(const AtomicString& id) const; | 69 bool hasElementWithId(const AtomicString& id) const; |
| 69 bool containsMultipleElementsWithId(const AtomicString& id) const; | 70 bool containsMultipleElementsWithId(const AtomicString& id) const; |
| 70 void addElementById(const AtomicString& elementId, Element*); | 71 void addElementById(const AtomicString& elementId, Element*); |
| 71 void removeElementById(const AtomicString& elementId, Element*); | 72 void removeElementById(const AtomicString& elementId, Element*); |
| 72 | 73 |
| 73 Document& document() const { | 74 Document& document() const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 84 Element* elementFromPoint(int x, int y) const; | 85 Element* elementFromPoint(int x, int y) const; |
| 85 Element* hitTestPoint(int x, int y, const HitTestRequest&) const; | 86 Element* hitTestPoint(int x, int y, const HitTestRequest&) const; |
| 86 HeapVector<Member<Element>> elementsFromPoint(int x, int y) const; | 87 HeapVector<Member<Element>> elementsFromPoint(int x, int y) const; |
| 87 HeapVector<Member<Element>> elementsFromHitTestResult(HitTestResult&) const; | 88 HeapVector<Member<Element>> elementsFromHitTestResult(HitTestResult&) const; |
| 88 | 89 |
| 89 DOMSelection* getSelection() const; | 90 DOMSelection* getSelection() const; |
| 90 | 91 |
| 91 Element* retarget(const Element& target) const; | 92 Element* retarget(const Element& target) const; |
| 92 | 93 |
| 93 // Find first anchor with the given name. | 94 // Find first anchor with the given name. |
| 94 // First searches for an element with the given ID, but if that fails, then lo
oks | 95 // First searches for an element with the given ID, but if that fails, then |
| 95 // for an anchor with the given name. ID matching is always case sensitive, bu
t | 96 // looks for an anchor with the given name. ID matching is always case |
| 96 // Anchor name matching is case sensitive in strict mode and not case sensitiv
e in | 97 // sensitive, but Anchor name matching is case sensitive in strict mode and |
| 97 // quirks mode for historical compatibility reasons. | 98 // not case sensitive in quirks mode for historical compatibility reasons. |
| 98 Element* findAnchor(const String& name); | 99 Element* findAnchor(const String& name); |
| 99 | 100 |
| 100 // Used by the basic DOM mutation methods (e.g., appendChild()). | 101 // Used by the basic DOM mutation methods (e.g., appendChild()). |
| 101 void adoptIfNeeded(Node&); | 102 void adoptIfNeeded(Node&); |
| 102 | 103 |
| 103 ContainerNode& rootNode() const { return *m_rootNode; } | 104 ContainerNode& rootNode() const { return *m_rootNode; } |
| 104 | 105 |
| 105 IdTargetObserverRegistry& idTargetObserverRegistry() const { | 106 IdTargetObserverRegistry& idTargetObserverRegistry() const { |
| 106 return *m_idTargetObserverRegistry.get(); | 107 return *m_idTargetObserverRegistry.get(); |
| 107 } | 108 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 167 |
| 167 HitTestResult hitTestInDocument( | 168 HitTestResult hitTestInDocument( |
| 168 const Document*, | 169 const Document*, |
| 169 int x, | 170 int x, |
| 170 int y, | 171 int y, |
| 171 const HitTestRequest& = HitTestRequest::ReadOnly | HitTestRequest::Active); | 172 const HitTestRequest& = HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 172 | 173 |
| 173 } // namespace blink | 174 } // namespace blink |
| 174 | 175 |
| 175 #endif // TreeScope_h | 176 #endif // TreeScope_h |
| OLD | NEW |