| 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 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3267 clearDragDataTransfer(); | 3267 clearDragDataTransfer(); |
| 3268 dragState().m_dragSrc = nullptr; | 3268 dragState().m_dragSrc = nullptr; |
| 3269 // In case the drag was ended due to an escape key press we need to ensure | 3269 // In case the drag was ended due to an escape key press we need to ensure |
| 3270 // that consecutive mousemove events don't reinitiate the drag and drop. | 3270 // that consecutive mousemove events don't reinitiate the drag and drop. |
| 3271 m_mouseDownMayStartDrag = false; | 3271 m_mouseDownMayStartDrag = false; |
| 3272 } | 3272 } |
| 3273 | 3273 |
| 3274 void EventHandler::updateDragStateAfterEditDragIfNeeded(Element* rootEditableEle
ment) | 3274 void EventHandler::updateDragStateAfterEditDragIfNeeded(Element* rootEditableEle
ment) |
| 3275 { | 3275 { |
| 3276 // If inserting the dragged contents removed the drag source, we still want
to fire dragend at the root editble element. | 3276 // If inserting the dragged contents removed the drag source, we still want
to fire dragend at the root editble element. |
| 3277 if (dragState().m_dragSrc && !dragState().m_dragSrc->inDocument()) | 3277 if (dragState().m_dragSrc && !dragState().m_dragSrc->inShadowIncludingDocume
nt()) |
| 3278 dragState().m_dragSrc = rootEditableElement; | 3278 dragState().m_dragSrc = rootEditableElement; |
| 3279 } | 3279 } |
| 3280 | 3280 |
| 3281 // returns if we should continue "default processing", i.e., whether eventhandle
r canceled | 3281 // returns if we should continue "default processing", i.e., whether eventhandle
r canceled |
| 3282 WebInputEventResult EventHandler::dispatchDragSrcEvent(const AtomicString& event
Type, const PlatformMouseEvent& event) | 3282 WebInputEventResult EventHandler::dispatchDragSrcEvent(const AtomicString& event
Type, const PlatformMouseEvent& event) |
| 3283 { | 3283 { |
| 3284 return dispatchDragEvent(eventType, dragState().m_dragSrc.get(), event, drag
State().m_dragDataTransfer.get()); | 3284 return dispatchDragEvent(eventType, dragState().m_dragSrc.get(), event, drag
State().m_dragDataTransfer.get()); |
| 3285 } | 3285 } |
| 3286 | 3286 |
| 3287 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni
tiator initiator) | 3287 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni
tiator initiator) |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3992 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 3992 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 3993 { | 3993 { |
| 3994 #if OS(MACOSX) | 3994 #if OS(MACOSX) |
| 3995 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 3995 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
| 3996 #else | 3996 #else |
| 3997 return PlatformEvent::AltKey; | 3997 return PlatformEvent::AltKey; |
| 3998 #endif | 3998 #endif |
| 3999 } | 3999 } |
| 4000 | 4000 |
| 4001 } // namespace blink | 4001 } // namespace blink |
| OLD | NEW |