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

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

Issue 1184693003: Revert 196987 "Don't invoke default actions for MouseEvents gene..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/events/MouseEvent.cpp ('k') | trunk/Source/platform/PlatformMouseEvent.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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
1697 1697
1698 dragTarget->dispatchMouseEvent(me.get()); 1698 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION);
1699
1700 return me->defaultPrevented(); 1699 return me->defaultPrevented();
1701 } 1700 }
1702 1701
1703 static bool targetIsFrame(Node* target, LocalFrame*& frame) 1702 static bool targetIsFrame(Node* target, LocalFrame*& frame)
1704 { 1703 {
1705 if (!isHTMLFrameElementBase(target)) 1704 if (!isHTMLFrameElementBase(target))
1706 return false; 1705 return false;
1707 1706
1708 // Cross-process drag and drop is not yet supported. 1707 // Cross-process drag and drop is not yet supported.
1709 if (toHTMLFrameElementBase(target)->contentFrame() && !toHTMLFrameElementBas e(target)->contentFrame()->isLocalFrame()) 1708 if (toHTMLFrameElementBase(target)->contentFrame() && !toHTMLFrameElementBas e(target)->contentFrame()->isLocalFrame())
(...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after
4204 unsigned EventHandler::accessKeyModifiers() 4203 unsigned EventHandler::accessKeyModifiers()
4205 { 4204 {
4206 #if OS(MACOSX) 4205 #if OS(MACOSX)
4207 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4206 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4208 #else 4207 #else
4209 return PlatformEvent::AltKey; 4208 return PlatformEvent::AltKey;
4210 #endif 4209 #endif
4211 } 4210 }
4212 4211
4213 } // namespace blink 4212 } // namespace blink
OLDNEW
« no previous file with comments | « trunk/Source/core/events/MouseEvent.cpp ('k') | trunk/Source/platform/PlatformMouseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698