| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 nodesInPath.append(insertionPoint); | 126 nodesInPath.append(insertionPoint); |
| 127 } | 127 } |
| 128 current = insertionPoints.last(); | 128 current = insertionPoints.last(); |
| 129 continue; | 129 continue; |
| 130 } | 130 } |
| 131 if (current->isShadowRoot()) { | 131 if (current->isShadowRoot()) { |
| 132 if (m_event && shouldStopAtShadowRoot(*m_event, *toShadowRoot(curren
t), *m_node)) | 132 if (m_event && shouldStopAtShadowRoot(*m_event, *toShadowRoot(curren
t), *m_node)) |
| 133 break; | 133 break; |
| 134 current = current->shadowHost(); | 134 current = current->shadowHost(); |
| 135 #if !ENABLE(OILPAN) |
| 136 // TODO(kochi): crbug.com/507413 This check is necessary when some a
synchronous event |
| 137 // is queued while its shadow host is removed and the shadow root ge
ts the event |
| 138 // immediately after it. When Oilpan is enabled, this situation doe
s not happen. |
| 139 // Except this case, shadow root's host is assumed to be non-null. |
| 140 if (current) |
| 141 nodesInPath.append(current); |
| 142 #else |
| 135 nodesInPath.append(current); | 143 nodesInPath.append(current); |
| 144 #endif |
| 136 } else { | 145 } else { |
| 137 current = current->parentNode(); | 146 current = current->parentNode(); |
| 138 if (current) | 147 if (current) |
| 139 nodesInPath.append(current); | 148 nodesInPath.append(current); |
| 140 } | 149 } |
| 141 } | 150 } |
| 142 | 151 |
| 143 m_nodeEventContexts.reserveCapacity(nodesInPath.size()); | 152 m_nodeEventContexts.reserveCapacity(nodesInPath.size()); |
| 144 for (Node* nodeInPath : nodesInPath) { | 153 for (Node* nodeInPath : nodesInPath) { |
| 145 m_nodeEventContexts.append(NodeEventContext(nodeInPath, eventTargetRespe
ctingTargetRules(*nodeInPath))); | 154 m_nodeEventContexts.append(NodeEventContext(nodeInPath, eventTargetRespe
ctingTargetRules(*nodeInPath))); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 #if ENABLE(OILPAN) | 371 #if ENABLE(OILPAN) |
| 363 visitor->trace(m_nodeEventContexts); | 372 visitor->trace(m_nodeEventContexts); |
| 364 visitor->trace(m_node); | 373 visitor->trace(m_node); |
| 365 visitor->trace(m_event); | 374 visitor->trace(m_event); |
| 366 visitor->trace(m_treeScopeEventContexts); | 375 visitor->trace(m_treeScopeEventContexts); |
| 367 visitor->trace(m_windowEventContext); | 376 visitor->trace(m_windowEventContext); |
| 368 #endif | 377 #endif |
| 369 } | 378 } |
| 370 | 379 |
| 371 } // namespace | 380 } // namespace |
| OLD | NEW |