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

Side by Side Diff: WebCore/dom/EventContext.cpp

Issue 5605003: Merge 73270 - 2010-12-03 Dimitri Glazkov <dglazkov@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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
« no previous file with comments | « WebCore/dom/EventContext.h ('k') | WebCore/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 23 matching lines...) Expand all
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 EventContext::EventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget> curren tTarget, PassRefPtr<EventTarget> target) 37 EventContext::EventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget> curren tTarget, PassRefPtr<EventTarget> target)
38 : m_node(node) 38 : m_node(node)
39 , m_currentTarget(currentTarget) 39 , m_currentTarget(currentTarget)
40 , m_target(target) 40 , m_target(target)
41 { 41 {
42 } 42 }
43 43
44 void EventContext::defaultEventHandler(Event* event) const
45 {
46 event->setTarget(m_target.get());
47 event->setCurrentTarget(m_currentTarget.get());
48 m_node->defaultEventHandler(event);
49 }
50
51 void EventContext::handleLocalEvents(Event* event) const 44 void EventContext::handleLocalEvents(Event* event) const
52 { 45 {
53 event->setTarget(m_target.get()); 46 event->setTarget(m_target.get());
54 event->setCurrentTarget(m_currentTarget.get()); 47 event->setCurrentTarget(m_currentTarget.get());
55 m_node->handleLocalEvents(event); 48 m_node->handleLocalEvents(event);
56 } 49 }
57 50
58 } 51 }
OLDNEW
« no previous file with comments | « WebCore/dom/EventContext.h ('k') | WebCore/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698