OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 ASSERT(m_nodeEventContexts.isEmpty()); | 138 ASSERT(m_nodeEventContexts.isEmpty()); |
139 m_node->document().updateDistributionForNodeIfNeeded(const_cast<Node*>(m_nod
e)); | 139 m_node->document().updateDistributionForNodeIfNeeded(const_cast<Node*>(m_nod
e)); |
140 | 140 |
141 Node* current = m_node; | 141 Node* current = m_node; |
142 addNodeEventContext(current); | 142 addNodeEventContext(current); |
143 if (!m_node->inDocument()) | 143 if (!m_node->inDocument()) |
144 return; | 144 return; |
145 while (current) { | 145 while (current) { |
146 if (current->isShadowRoot() && m_event && determineDispatchBehavior(m_ev
ent, toShadowRoot(current), m_node) == StayInsideShadowDOM) | 146 if (current->isShadowRoot() && m_event && determineDispatchBehavior(m_ev
ent, toShadowRoot(current), m_node) == StayInsideShadowDOM) |
147 break; | 147 break; |
148 Vector<InsertionPoint*, 8> insertionPoints; | 148 WillBeHeapVector<RawPtrWillBeMember<InsertionPoint>, 8> insertionPoints; |
149 collectDestinationInsertionPoints(*current, insertionPoints); | 149 collectDestinationInsertionPoints(*current, insertionPoints); |
150 if (!insertionPoints.isEmpty()) { | 150 if (!insertionPoints.isEmpty()) { |
151 for (size_t i = 0; i < insertionPoints.size(); ++i) { | 151 for (size_t i = 0; i < insertionPoints.size(); ++i) { |
152 InsertionPoint* insertionPoint = insertionPoints[i]; | 152 InsertionPoint* insertionPoint = insertionPoints[i]; |
153 if (insertionPoint->isShadowInsertionPoint()) { | 153 if (insertionPoint->isShadowInsertionPoint()) { |
154 ShadowRoot* containingShadowRoot = insertionPoint->containin
gShadowRoot(); | 154 ShadowRoot* containingShadowRoot = insertionPoint->containin
gShadowRoot(); |
155 ASSERT(containingShadowRoot); | 155 ASSERT(containingShadowRoot); |
156 if (!containingShadowRoot->isOldest()) | 156 if (!containingShadowRoot->isOldest()) |
157 addNodeEventContext(containingShadowRoot->olderShadowRoo
t()); | 157 addNodeEventContext(containingShadowRoot->olderShadowRoo
t()); |
158 } | 158 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 ASSERT(touchList.item(i)->target()->toNode()->treeScope().isInclusiveOld
erSiblingShadowRootOrAncestorTreeScopeOf(treeScope)); | 378 ASSERT(touchList.item(i)->target()->toNode()->treeScope().isInclusiveOld
erSiblingShadowRootOrAncestorTreeScopeOf(treeScope)); |
379 } | 379 } |
380 #endif | 380 #endif |
381 | 381 |
382 void EventPath::trace(Visitor* visitor) | 382 void EventPath::trace(Visitor* visitor) |
383 { | 383 { |
384 visitor->trace(m_event); | 384 visitor->trace(m_event); |
385 } | 385 } |
386 | 386 |
387 } // namespace | 387 } // namespace |
OLD | NEW |