| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #if ENABLE(ASSERT) | 76 #if ENABLE(ASSERT) |
| 77 bool isUnreachableNode(EventTarget&); | 77 bool isUnreachableNode(EventTarget&); |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 RawPtrWillBeMember<TreeScope> m_treeScope; | 80 RawPtrWillBeMember<TreeScope> m_treeScope; |
| 81 RefPtrWillBeMember<EventTarget> m_target; | 81 RefPtrWillBeMember<EventTarget> m_target; |
| 82 RefPtrWillBeMember<EventTarget> m_relatedTarget; | 82 RefPtrWillBeMember<EventTarget> m_relatedTarget; |
| 83 RefPtrWillBeMember<StaticNodeList> m_eventPath; | 83 RefPtrWillBeMember<StaticNodeList> m_eventPath; |
| 84 RefPtrWillBeMember<TouchEventContext> m_touchEventContext; | 84 RefPtrWillBeMember<TouchEventContext> m_touchEventContext; |
| 85 | 85 |
| 86 WillBeHeapVector<RawPtrWillBeMember<TreeScopeEventContext> > m_children; | 86 WillBeHeapVector<RawPtrWillBeMember<TreeScopeEventContext>> m_children; |
| 87 int m_preOrder; | 87 int m_preOrder; |
| 88 int m_postOrder; | 88 int m_postOrder; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #if ENABLE(ASSERT) | 91 #if ENABLE(ASSERT) |
| 92 inline bool TreeScopeEventContext::isUnreachableNode(EventTarget& target) | 92 inline bool TreeScopeEventContext::isUnreachableNode(EventTarget& target) |
| 93 { | 93 { |
| 94 // FIXME: Checks also for SVG elements. | 94 // FIXME: Checks also for SVG elements. |
| 95 return target.toNode() && !target.toNode()->isSVGElement() && !target.toNode
()->treeScope().isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(treeScope
()); | 95 return target.toNode() && !target.toNode()->isSVGElement() && !target.toNode
()->treeScope().isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(treeScope
()); |
| 96 } | 96 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 112 | 112 |
| 113 inline bool TreeScopeEventContext::isInclusiveAncestorOf(const TreeScopeEventCon
text& other) | 113 inline bool TreeScopeEventContext::isInclusiveAncestorOf(const TreeScopeEventCon
text& other) |
| 114 { | 114 { |
| 115 ASSERT(m_preOrder != -1 && m_postOrder != -1 && other.m_preOrder != -1 && ot
her.m_postOrder != -1); | 115 ASSERT(m_preOrder != -1 && m_postOrder != -1 && other.m_preOrder != -1 && ot
her.m_postOrder != -1); |
| 116 return m_preOrder <= other.m_preOrder && other.m_postOrder <= m_postOrder; | 116 return m_preOrder <= other.m_preOrder && other.m_postOrder <= m_postOrder; |
| 117 } | 117 } |
| 118 | 118 |
| 119 } | 119 } |
| 120 | 120 |
| 121 #endif // TreeScopeEventContext_h | 121 #endif // TreeScopeEventContext_h |
| OLD | NEW |