Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/core/events/Event.cpp

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 m_handlingPassive = value; 282 m_handlingPassive = value;
283 m_preventDefaultCalledDuringPassive = false; 283 m_preventDefaultCalledDuringPassive = false;
284 } 284 }
285 285
286 HeapVector<Member<EventTarget>> Event::pathInternal(ScriptState* scriptState, Ev entPathMode mode) const 286 HeapVector<Member<EventTarget>> Event::pathInternal(ScriptState* scriptState, Ev entPathMode mode) const
287 { 287 {
288 if (m_target) 288 if (m_target)
289 HostsUsingFeatures::countHostOrIsolatedWorldHumanReadableName(scriptStat e, *m_target, HostsUsingFeatures::Feature::EventPath); 289 HostsUsingFeatures::countHostOrIsolatedWorldHumanReadableName(scriptStat e, *m_target, HostsUsingFeatures::Feature::EventPath);
290 290
291 if (!m_currentTarget) { 291 if (!m_currentTarget) {
292 ASSERT(m_eventPhase == Event::NONE); 292 DCHECK_EQ(Event::kNone, m_eventPhase);
293 if (!m_eventPath) { 293 if (!m_eventPath) {
294 // Before dispatching the event 294 // Before dispatching the event
295 return HeapVector<Member<EventTarget>>(); 295 return HeapVector<Member<EventTarget>>();
296 } 296 }
297 ASSERT(!m_eventPath->isEmpty()); 297 DCHECK(!m_eventPath->isEmpty());
298 // After dispatching the event 298 // After dispatching the event
299 if (mode == EmptyAfterDispatch) 299 if (mode == EmptyAfterDispatch)
300 return HeapVector<Member<EventTarget>>(); 300 return HeapVector<Member<EventTarget>>();
301 return m_eventPath->last().treeScopeEventContext().ensureEventPath(*m_ev entPath); 301 return m_eventPath->last().treeScopeEventContext().ensureEventPath(*m_ev entPath);
302 } 302 }
303 303
304 if (Node* node = m_currentTarget->toNode()) { 304 if (Node* node = m_currentTarget->toNode()) {
305 ASSERT(m_eventPath); 305 DCHECK(m_eventPath);
306 size_t eventPathSize = m_eventPath->size(); 306 size_t eventPathSize = m_eventPath->size();
307 for (size_t i = 0; i < eventPathSize; ++i) { 307 for (size_t i = 0; i < eventPathSize; ++i) {
308 if (node == (*m_eventPath)[i].node()) { 308 if (node == (*m_eventPath)[i].node()) {
309 return (*m_eventPath)[i].treeScopeEventContext().ensureEventPath (*m_eventPath); 309 return (*m_eventPath)[i].treeScopeEventContext().ensureEventPath (*m_eventPath);
310 } 310 }
311 } 311 }
312 ASSERT_NOT_REACHED(); 312 ASSERT_NOT_REACHED();
313 } 313 }
314 314
315 // Returns [window] for events that are directly dispatched to the window ob ject; 315 // Returns [window] for events that are directly dispatched to the window ob ject;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 DEFINE_TRACE(Event) 360 DEFINE_TRACE(Event)
361 { 361 {
362 visitor->trace(m_currentTarget); 362 visitor->trace(m_currentTarget);
363 visitor->trace(m_target); 363 visitor->trace(m_target);
364 visitor->trace(m_underlyingEvent); 364 visitor->trace(m_underlyingEvent);
365 visitor->trace(m_eventPath); 365 visitor->trace(m_eventPath);
366 } 366 }
367 367
368 } // namespace blink 368 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698