| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 m_handlingPassive = value; | 283 m_handlingPassive = value; |
| 284 m_preventDefaultCalledDuringPassive = false; | 284 m_preventDefaultCalledDuringPassive = false; |
| 285 } | 285 } |
| 286 | 286 |
| 287 HeapVector<Member<EventTarget>> Event::pathInternal(ScriptState* scriptState, Ev
entPathMode mode) const | 287 HeapVector<Member<EventTarget>> Event::pathInternal(ScriptState* scriptState, Ev
entPathMode mode) const |
| 288 { | 288 { |
| 289 if (m_target) | 289 if (m_target) |
| 290 HostsUsingFeatures::countHostOrIsolatedWorldHumanReadableName(scriptStat
e, *m_target, HostsUsingFeatures::Feature::EventPath); | 290 HostsUsingFeatures::countHostOrIsolatedWorldHumanReadableName(scriptStat
e, *m_target, HostsUsingFeatures::Feature::EventPath); |
| 291 | 291 |
| 292 if (!m_currentTarget) { | 292 if (!m_currentTarget) { |
| 293 ASSERT(m_eventPhase == Event::NONE); | 293 DCHECK_EQ(Event::kNone, m_eventPhase); |
| 294 if (!m_eventPath) { | 294 if (!m_eventPath) { |
| 295 // Before dispatching the event | 295 // Before dispatching the event |
| 296 return HeapVector<Member<EventTarget>>(); | 296 return HeapVector<Member<EventTarget>>(); |
| 297 } | 297 } |
| 298 ASSERT(!m_eventPath->isEmpty()); | 298 DCHECK(!m_eventPath->isEmpty()); |
| 299 // After dispatching the event | 299 // After dispatching the event |
| 300 if (mode == EmptyAfterDispatch) | 300 if (mode == EmptyAfterDispatch) |
| 301 return HeapVector<Member<EventTarget>>(); | 301 return HeapVector<Member<EventTarget>>(); |
| 302 return m_eventPath->last().treeScopeEventContext().ensureEventPath(*m_ev
entPath); | 302 return m_eventPath->last().treeScopeEventContext().ensureEventPath(*m_ev
entPath); |
| 303 } | 303 } |
| 304 | 304 |
| 305 if (Node* node = m_currentTarget->toNode()) { | 305 if (Node* node = m_currentTarget->toNode()) { |
| 306 ASSERT(m_eventPath); | 306 DCHECK(m_eventPath); |
| 307 size_t eventPathSize = m_eventPath->size(); | 307 size_t eventPathSize = m_eventPath->size(); |
| 308 for (size_t i = 0; i < eventPathSize; ++i) { | 308 for (size_t i = 0; i < eventPathSize; ++i) { |
| 309 if (node == (*m_eventPath)[i].node()) { | 309 if (node == (*m_eventPath)[i].node()) { |
| 310 return (*m_eventPath)[i].treeScopeEventContext().ensureEventPath
(*m_eventPath); | 310 return (*m_eventPath)[i].treeScopeEventContext().ensureEventPath
(*m_eventPath); |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 ASSERT_NOT_REACHED(); | 313 ASSERT_NOT_REACHED(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 // Returns [window] for events that are directly dispatched to the window ob
ject; | 316 // Returns [window] for events that are directly dispatched to the window ob
ject; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 367 |
| 368 DEFINE_TRACE(Event) | 368 DEFINE_TRACE(Event) |
| 369 { | 369 { |
| 370 visitor->trace(m_currentTarget); | 370 visitor->trace(m_currentTarget); |
| 371 visitor->trace(m_target); | 371 visitor->trace(m_target); |
| 372 visitor->trace(m_underlyingEvent); | 372 visitor->trace(m_underlyingEvent); |
| 373 visitor->trace(m_eventPath); | 373 visitor->trace(m_eventPath); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace blink | 376 } // namespace blink |
| OLD | NEW |