| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 for (size_t i = 0; i < path.size(); ++i) { | 69 for (size_t i = 0; i < path.size(); ++i) { |
| 70 if (path[i].treeScopeEventContext().isUnclosedTreeOf(*this)) | 70 if (path[i].treeScopeEventContext().isUnclosedTreeOf(*this)) |
| 71 m_eventPath->append(path[i].node()); | 71 m_eventPath->append(path[i].node()); |
| 72 } | 72 } |
| 73 if (window) | 73 if (window) |
| 74 m_eventPath->append(window); | 74 m_eventPath->append(window); |
| 75 return *m_eventPath; | 75 return *m_eventPath; |
| 76 } | 76 } |
| 77 | 77 |
| 78 TouchEventContext* TreeScopeEventContext::touchEventContext() const | |
| 79 { | |
| 80 return m_touchEventContext.get(); | |
| 81 } | |
| 82 | |
| 83 TouchEventContext* TreeScopeEventContext::ensureTouchEventContext() | 78 TouchEventContext* TreeScopeEventContext::ensureTouchEventContext() |
| 84 { | 79 { |
| 85 if (!m_touchEventContext) | 80 if (!m_touchEventContext) |
| 86 m_touchEventContext = TouchEventContext::create(); | 81 m_touchEventContext = TouchEventContext::create(); |
| 87 return m_touchEventContext.get(); | 82 return m_touchEventContext.get(); |
| 88 } | 83 } |
| 89 | 84 |
| 90 PassRefPtrWillBeRawPtr<TreeScopeEventContext> TreeScopeEventContext::create(Tree
Scope& treeScope) | 85 PassRefPtrWillBeRawPtr<TreeScopeEventContext> TreeScopeEventContext::create(Tree
Scope& treeScope) |
| 91 { | 86 { |
| 92 return adoptRefWillBeNoop(new TreeScopeEventContext(treeScope)); | 87 return adoptRefWillBeNoop(new TreeScopeEventContext(treeScope)); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 122 m_preOrder = orderNumber; | 117 m_preOrder = orderNumber; |
| 123 m_containingClosedShadowTree = (rootNode().isShadowRoot() && !toShadowRoot(r
ootNode()).isOpen()) ? this : nearestAncestorClosedTreeScopeEventContext; | 118 m_containingClosedShadowTree = (rootNode().isShadowRoot() && !toShadowRoot(r
ootNode()).isOpen()) ? this : nearestAncestorClosedTreeScopeEventContext; |
| 124 for (size_t i = 0; i < m_children.size(); ++i) | 119 for (size_t i = 0; i < m_children.size(); ++i) |
| 125 orderNumber = m_children[i]->calculateTreeOrderAndSetNearestAncestorClos
edTree(orderNumber + 1, containingClosedShadowTree()); | 120 orderNumber = m_children[i]->calculateTreeOrderAndSetNearestAncestorClos
edTree(orderNumber + 1, containingClosedShadowTree()); |
| 126 m_postOrder = orderNumber + 1; | 121 m_postOrder = orderNumber + 1; |
| 127 | 122 |
| 128 return orderNumber + 1; | 123 return orderNumber + 1; |
| 129 } | 124 } |
| 130 | 125 |
| 131 } // namespace blink | 126 } // namespace blink |
| OLD | NEW |