| OLD | NEW |
| 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 22 matching lines...) Expand all Loading... |
| 33 #include "core/InputTypeNames.h" | 33 #include "core/InputTypeNames.h" |
| 34 #include "core/clipboard/DataObject.h" | 34 #include "core/clipboard/DataObject.h" |
| 35 #include "core/clipboard/DataTransfer.h" | 35 #include "core/clipboard/DataTransfer.h" |
| 36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
| 37 #include "core/dom/TouchList.h" | 37 #include "core/dom/TouchList.h" |
| 38 #include "core/dom/shadow/ComposedTreeTraversal.h" | 38 #include "core/dom/shadow/ComposedTreeTraversal.h" |
| 39 #include "core/dom/shadow/ShadowRoot.h" | 39 #include "core/dom/shadow/ShadowRoot.h" |
| 40 #include "core/editing/Editor.h" | 40 #include "core/editing/Editor.h" |
| 41 #include "core/editing/FrameSelection.h" | 41 #include "core/editing/FrameSelection.h" |
| 42 #include "core/editing/SelectionController.h" | 42 #include "core/editing/SelectionController.h" |
| 43 #include "core/events/DragEvent.h" |
| 43 #include "core/events/EventPath.h" | 44 #include "core/events/EventPath.h" |
| 44 #include "core/events/KeyboardEvent.h" | 45 #include "core/events/KeyboardEvent.h" |
| 45 #include "core/events/MouseEvent.h" | 46 #include "core/events/MouseEvent.h" |
| 46 #include "core/events/PointerEvent.h" | 47 #include "core/events/PointerEvent.h" |
| 47 #include "core/events/TextEvent.h" | 48 #include "core/events/TextEvent.h" |
| 48 #include "core/events/TouchEvent.h" | 49 #include "core/events/TouchEvent.h" |
| 49 #include "core/events/WheelEvent.h" | 50 #include "core/events/WheelEvent.h" |
| 50 #include "core/fetch/ImageResource.h" | 51 #include "core/fetch/ImageResource.h" |
| 51 #include "core/frame/EventHandlerRegistry.h" | 52 #include "core/frame/EventHandlerRegistry.h" |
| 52 #include "core/frame/FrameHost.h" | 53 #include "core/frame/FrameHost.h" |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 } | 1272 } |
| 1272 | 1273 |
| 1273 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
rget, const PlatformMouseEvent& event, DataTransfer* dataTransfer) | 1274 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
rget, const PlatformMouseEvent& event, DataTransfer* dataTransfer) |
| 1274 { | 1275 { |
| 1275 FrameView* view = m_frame->view(); | 1276 FrameView* view = m_frame->view(); |
| 1276 | 1277 |
| 1277 // FIXME: We might want to dispatch a dragleave even if the view is gone. | 1278 // FIXME: We might want to dispatch a dragleave even if the view is gone. |
| 1278 if (!view) | 1279 if (!view) |
| 1279 return false; | 1280 return false; |
| 1280 | 1281 |
| 1281 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, | 1282 RefPtrWillBeRawPtr<DragEvent> me = DragEvent::create(eventType, |
| 1282 true, true, m_frame->document()->domWindow(), | 1283 true, true, m_frame->document()->domWindow(), |
| 1283 0, event.globalPosition().x(), event.globalPosition().y(), event.positio
n().x(), event.position().y(), | 1284 0, event.globalPosition().x(), event.globalPosition().y(), event.positio
n().x(), event.position().y(), |
| 1284 event.movementDelta().x(), event.movementDelta().y(), | 1285 event.movementDelta().x(), event.movementDelta().y(), |
| 1285 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), | 1286 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), |
| 1286 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d
ataTransfer, false, event.syntheticEventType(), event.timestamp()); | 1287 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d
ataTransfer, false, event.syntheticEventType(), event.timestamp()); |
| 1287 | 1288 |
| 1288 dragTarget->dispatchEvent(me.get()); | 1289 dragTarget->dispatchEvent(me.get()); |
| 1289 return me->defaultPrevented(); | 1290 return me->defaultPrevented(); |
| 1290 } | 1291 } |
| 1291 | 1292 |
| (...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3995 unsigned EventHandler::accessKeyModifiers() | 3996 unsigned EventHandler::accessKeyModifiers() |
| 3996 { | 3997 { |
| 3997 #if OS(MACOSX) | 3998 #if OS(MACOSX) |
| 3998 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3999 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3999 #else | 4000 #else |
| 4000 return PlatformEvent::AltKey; | 4001 return PlatformEvent::AltKey; |
| 4001 #endif | 4002 #endif |
| 4002 } | 4003 } |
| 4003 | 4004 |
| 4004 } // namespace blink | 4005 } // namespace blink |
| OLD | NEW |