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

Side by Side Diff: Source/core/events/EventDispatcher.cpp

Issue 216523002: Oilpan: Replace most of RefPtrs for Event objects with oilpan's transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool EventDispatcher::dispatchEvent(Node* node, PassRefPtr<EventDispatchMediator > mediator) 42 bool EventDispatcher::dispatchEvent(Node* node, PassRefPtr<EventDispatchMediator > mediator)
43 { 43 {
44 TRACE_EVENT0("webkit", "EventDispatcher::dispatchEvent"); 44 TRACE_EVENT0("webkit", "EventDispatcher::dispatchEvent");
45 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 45 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
46 if (!mediator->event()) 46 if (!mediator->event())
47 return true; 47 return true;
48 EventDispatcher dispatcher(node, mediator->event()); 48 EventDispatcher dispatcher(node, mediator->event());
49 return mediator->dispatchEvent(&dispatcher); 49 return mediator->dispatchEvent(&dispatcher);
50 } 50 }
51 51
52 EventDispatcher::EventDispatcher(Node* node, PassRefPtr<Event> event) 52 EventDispatcher::EventDispatcher(Node* node, PassRefPtrWillBeRawPtr<Event> event )
53 : m_node(node) 53 : m_node(node)
54 , m_event(event) 54 , m_event(event)
55 #ifndef NDEBUG 55 #ifndef NDEBUG
56 , m_eventDispatched(false) 56 , m_eventDispatched(false)
57 #endif 57 #endif
58 { 58 {
59 ASSERT(node); 59 ASSERT(node);
60 ASSERT(m_event.get()); 60 ASSERT(m_event.get());
61 ASSERT(!m_event->type().isNull()); // JavaScript code can create an event wi th an empty name, but not null. 61 ASSERT(!m_event->type().isNull()); // JavaScript code can create an event wi th an empty name, but not null.
62 m_view = node->document().view(); 62 m_view = node->document().view();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 const NodeEventContext* EventDispatcher::topNodeEventContext() 223 const NodeEventContext* EventDispatcher::topNodeEventContext()
224 { 224 {
225 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); 225 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last();
226 } 226 }
227 227
228 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698