| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2014 Google Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 TouchEventContext* ensureTouchEventContext(); | 65 TouchEventContext* ensureTouchEventContext(); |
| 66 | 66 |
| 67 HeapVector<Member<EventTarget>>& ensureEventPath(EventPath&); | 67 HeapVector<Member<EventTarget>>& ensureEventPath(EventPath&); |
| 68 | 68 |
| 69 bool isInclusiveAncestorOf(const TreeScopeEventContext&) const; | 69 bool isInclusiveAncestorOf(const TreeScopeEventContext&) const; |
| 70 bool isDescendantOf(const TreeScopeEventContext&) const; | 70 bool isDescendantOf(const TreeScopeEventContext&) const; |
| 71 #if DCHECK_IS_ON() | 71 #if DCHECK_IS_ON() |
| 72 bool isExclusivePartOf(const TreeScopeEventContext&) const; | 72 bool isExclusivePartOf(const TreeScopeEventContext&) const; |
| 73 #endif | 73 #endif |
| 74 void addChild(TreeScopeEventContext& child) { m_children.append(&child); } | 74 void addChild(TreeScopeEventContext& child) { m_children.push_back(&child); } |
| 75 | 75 |
| 76 // For ancestor-descendant relationship check in O(1). | 76 // For ancestor-descendant relationship check in O(1). |
| 77 // Preprocessing takes O(N). | 77 // Preprocessing takes O(N). |
| 78 int calculateTreeOrderAndSetNearestAncestorClosedTree( | 78 int calculateTreeOrderAndSetNearestAncestorClosedTree( |
| 79 int orderNumber, | 79 int orderNumber, |
| 80 TreeScopeEventContext* nearestAncestorClosedTreeScopeEventContext); | 80 TreeScopeEventContext* nearestAncestorClosedTreeScopeEventContext); |
| 81 | 81 |
| 82 TreeScopeEventContext* containingClosedShadowTree() const { | 82 TreeScopeEventContext* containingClosedShadowTree() const { |
| 83 return m_containingClosedShadowTree.get(); | 83 return m_containingClosedShadowTree.get(); |
| 84 } | 84 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 DCHECK_NE(other.m_preOrder, -1); | 157 DCHECK_NE(other.m_preOrder, -1); |
| 158 DCHECK_NE(other.m_postOrder, -1); | 158 DCHECK_NE(other.m_postOrder, -1); |
| 159 return (m_preOrder < other.m_preOrder && m_postOrder < other.m_preOrder) || | 159 return (m_preOrder < other.m_preOrder && m_postOrder < other.m_preOrder) || |
| 160 (m_preOrder > other.m_preOrder && m_preOrder > other.m_postOrder); | 160 (m_preOrder > other.m_preOrder && m_preOrder > other.m_postOrder); |
| 161 } | 161 } |
| 162 #endif | 162 #endif |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| 165 | 165 |
| 166 #endif // TreeScopeEventContext_h | 166 #endif // TreeScopeEventContext_h |
| OLD | NEW |