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

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: Rebase Created 5 years, 6 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) 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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 1686
1687 // FIXME: We might want to dispatch a dragleave even if the view is gone. 1687 // FIXME: We might want to dispatch a dragleave even if the view is gone.
1688 if (!view) 1688 if (!view)
1689 return false; 1689 return false;
1690 1690
1691 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, 1691 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType,
1692 true, true, m_frame->document()->domWindow(), 1692 true, true, m_frame->document()->domWindow(),
1693 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(), 1693 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(),
1694 event.movementDelta().x(), event.movementDelta().y(), 1694 event.movementDelta().x(), event.movementDelta().y(),
1695 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 1695 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
1696 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d ataTransfer); 1696 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d ataTransfer, false, event.syntheticEventType(), event.timestamp());
1697 1697
1698 dragTarget->dispatchMouseEvent(me.get()); 1698 dragTarget->dispatchMouseEvent(me.get());
1699 1699
1700 return me->defaultPrevented(); 1700 return me->defaultPrevented();
1701 } 1701 }
1702 1702
1703 static bool targetIsFrame(Node* target, LocalFrame*& frame) 1703 static bool targetIsFrame(Node* target, LocalFrame*& frame)
1704 { 1704 {
1705 if (!isHTMLFrameElementBase(target)) 1705 if (!isHTMLFrameElementBase(target))
1706 return false; 1706 return false;
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after
4204 unsigned EventHandler::accessKeyModifiers() 4204 unsigned EventHandler::accessKeyModifiers()
4205 { 4205 {
4206 #if OS(MACOSX) 4206 #if OS(MACOSX)
4207 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4207 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4208 #else 4208 #else
4209 return PlatformEvent::AltKey; 4209 return PlatformEvent::AltKey;
4210 #endif 4210 #endif
4211 } 4211 }
4212 4212
4213 } // namespace blink 4213 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698