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

Side by Side Diff: Source/core/input/EventHandler.cpp

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add initinternal Created 5 years, 5 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
« no previous file with comments | « Source/core/events/TouchEvent.cpp ('k') | Source/core/input/InputDevice.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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 1280
1281 // FIXME: We might want to dispatch a dragleave even if the view is gone. 1281 // FIXME: We might want to dispatch a dragleave even if the view is gone.
1282 if (!view) 1282 if (!view)
1283 return false; 1283 return false;
1284 1284
1285 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, 1285 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType,
1286 true, true, m_frame->document()->domWindow(), 1286 true, true, m_frame->document()->domWindow(),
1287 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(), 1287 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(),
1288 event.movementDelta().x(), event.movementDelta().y(), 1288 event.movementDelta().x(), event.movementDelta().y(),
1289 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 1289 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
1290 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d ataTransfer); 1290 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d ataTransfer, false, event.syntheticEventType(), event.timestamp());
1291 1291
1292 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION); 1292 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION);
1293 return me->defaultPrevented(); 1293 return me->defaultPrevented();
1294 } 1294 }
1295 1295
1296 static bool targetIsFrame(Node* target, LocalFrame*& frame) 1296 static bool targetIsFrame(Node* target, LocalFrame*& frame)
1297 { 1297 {
1298 if (!isHTMLFrameElementBase(target)) 1298 if (!isHTMLFrameElementBase(target))
1299 return false; 1299 return false;
1300 1300
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after
3761 unsigned EventHandler::accessKeyModifiers() 3761 unsigned EventHandler::accessKeyModifiers()
3762 { 3762 {
3763 #if OS(MACOSX) 3763 #if OS(MACOSX)
3764 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3764 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3765 #else 3765 #else
3766 return PlatformEvent::AltKey; 3766 return PlatformEvent::AltKey;
3767 #endif 3767 #endif
3768 } 3768 }
3769 3769
3770 } // namespace blink 3770 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/TouchEvent.cpp ('k') | Source/core/input/InputDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698