| 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/events/EventPath.h" | 27 #include "core/events/EventPath.h" |
| 28 | 28 |
| 29 #include "core/EventNames.h" | 29 #include "core/EventNames.h" |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/dom/Touch.h" | 31 #include "core/dom/Touch.h" |
| 32 #include "core/dom/TouchList.h" | 32 #include "core/dom/TouchList.h" |
| 33 #include "core/dom/shadow/InsertionPoint.h" | 33 #include "core/dom/shadow/InsertionPoint.h" |
| 34 #include "core/dom/shadow/ShadowRoot.h" | 34 #include "core/dom/shadow/ShadowRoot.h" |
| 35 #include "core/events/TouchEvent.h" | 35 #include "core/events/TouchEvent.h" |
| 36 #include "core/events/TouchEventContext.h" | 36 #include "core/events/TouchEventContext.h" |
| 37 #include "core/html/HTMLSlotElement.h" |
| 37 | 38 |
| 38 namespace blink { | 39 namespace blink { |
| 39 | 40 |
| 40 EventTarget* EventPath::eventTargetRespectingTargetRules(Node& referenceNode) | 41 EventTarget* EventPath::eventTargetRespectingTargetRules(Node& referenceNode) |
| 41 { | 42 { |
| 42 if (referenceNode.isPseudoElement()) { | 43 if (referenceNode.isPseudoElement()) { |
| 43 ASSERT(referenceNode.parentNode()); | 44 ASSERT(referenceNode.parentNode()); |
| 44 return referenceNode.parentNode(); | 45 return referenceNode.parentNode(); |
| 45 } | 46 } |
| 46 | 47 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 ShadowRoot* containingShadowRoot = insertionPoint->containin
gShadowRoot(); | 121 ShadowRoot* containingShadowRoot = insertionPoint->containin
gShadowRoot(); |
| 121 ASSERT(containingShadowRoot); | 122 ASSERT(containingShadowRoot); |
| 122 if (!containingShadowRoot->isOldest()) | 123 if (!containingShadowRoot->isOldest()) |
| 123 nodesInPath.append(containingShadowRoot->olderShadowRoot
()); | 124 nodesInPath.append(containingShadowRoot->olderShadowRoot
()); |
| 124 } | 125 } |
| 125 nodesInPath.append(insertionPoint); | 126 nodesInPath.append(insertionPoint); |
| 126 } | 127 } |
| 127 current = insertionPoints.last(); | 128 current = insertionPoints.last(); |
| 128 continue; | 129 continue; |
| 129 } | 130 } |
| 131 if (current->isChildOfV1ShadowHost()) { |
| 132 if (HTMLSlotElement* slot = current->assignedSlot()) { |
| 133 current = slot; |
| 134 nodesInPath.append(current); |
| 135 continue; |
| 136 } |
| 137 } |
| 130 if (current->isShadowRoot()) { | 138 if (current->isShadowRoot()) { |
| 131 if (m_event && shouldStopAtShadowRoot(*m_event, *toShadowRoot(curren
t), *m_node)) | 139 if (m_event && shouldStopAtShadowRoot(*m_event, *toShadowRoot(curren
t), *m_node)) |
| 132 break; | 140 break; |
| 133 current = current->shadowHost(); | 141 current = current->shadowHost(); |
| 134 #if !ENABLE(OILPAN) | 142 #if !ENABLE(OILPAN) |
| 135 // TODO(kochi): crbug.com/507413 This check is necessary when some a
synchronous event | 143 // TODO(kochi): crbug.com/507413 This check is necessary when some a
synchronous event |
| 136 // is queued while its shadow host is removed and the shadow root ge
ts the event | 144 // is queued while its shadow host is removed and the shadow root ge
ts the event |
| 137 // immediately after it. When Oilpan is enabled, this situation doe
s not happen. | 145 // immediately after it. When Oilpan is enabled, this situation doe
s not happen. |
| 138 // Except this case, shadow root's host is assumed to be non-null. | 146 // Except this case, shadow root's host is assumed to be non-null. |
| 139 if (current) | 147 if (current) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 #if ENABLE(OILPAN) | 387 #if ENABLE(OILPAN) |
| 380 visitor->trace(m_nodeEventContexts); | 388 visitor->trace(m_nodeEventContexts); |
| 381 visitor->trace(m_node); | 389 visitor->trace(m_node); |
| 382 visitor->trace(m_event); | 390 visitor->trace(m_event); |
| 383 visitor->trace(m_treeScopeEventContexts); | 391 visitor->trace(m_treeScopeEventContexts); |
| 384 visitor->trace(m_windowEventContext); | 392 visitor->trace(m_windowEventContext); |
| 385 #endif | 393 #endif |
| 386 } | 394 } |
| 387 | 395 |
| 388 } // namespace | 396 } // namespace |
| OLD | NEW |