| 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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 | 1628 |
| 1629 | 1629 |
| 1630 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
rget, const PlatformMouseEvent& event, DataTransfer* dataTransfer) | 1630 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
rget, const PlatformMouseEvent& event, DataTransfer* dataTransfer) |
| 1631 { | 1631 { |
| 1632 FrameView* view = m_frame->view(); | 1632 FrameView* view = m_frame->view(); |
| 1633 | 1633 |
| 1634 // FIXME: We might want to dispatch a dragleave even if the view is gone. | 1634 // FIXME: We might want to dispatch a dragleave even if the view is gone. |
| 1635 if (!view) | 1635 if (!view) |
| 1636 return false; | 1636 return false; |
| 1637 | 1637 |
| 1638 // FIXME: The drag event have to support for |buttons| attribute because |
| 1639 // the event is derived from mouse event. Please see crbug.com/276941. |
| 1638 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, | 1640 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, |
| 1639 true, true, m_frame->document()->domWindow(), | 1641 true, true, m_frame->document()->domWindow(), |
| 1640 0, event.globalPosition().x(), event.globalPosition().y(), event.positio
n().x(), event.position().y(), | 1642 0, event.globalPosition().x(), event.globalPosition().y(), event.positio
n().x(), event.position().y(), |
| 1641 event.movementDelta().x(), event.movementDelta().y(), | 1643 event.movementDelta().x(), event.movementDelta().y(), |
| 1642 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), | 1644 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), |
| 1643 0, nullptr, dataTransfer); | 1645 0, 0, nullptr, dataTransfer); |
| 1644 | 1646 |
| 1645 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION); | 1647 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION); |
| 1646 return me->defaultPrevented(); | 1648 return me->defaultPrevented(); |
| 1647 } | 1649 } |
| 1648 | 1650 |
| 1649 static bool targetIsFrame(Node* target, LocalFrame*& frame) | 1651 static bool targetIsFrame(Node* target, LocalFrame*& frame) |
| 1650 { | 1652 { |
| 1651 if (!isHTMLFrameElementBase(target)) | 1653 if (!isHTMLFrameElementBase(target)) |
| 1652 return false; | 1654 return false; |
| 1653 | 1655 |
| (...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3860 unsigned EventHandler::accessKeyModifiers() | 3862 unsigned EventHandler::accessKeyModifiers() |
| 3861 { | 3863 { |
| 3862 #if OS(MACOSX) | 3864 #if OS(MACOSX) |
| 3863 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3865 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3864 #else | 3866 #else |
| 3865 return PlatformEvent::AltKey; | 3867 return PlatformEvent::AltKey; |
| 3866 #endif | 3868 #endif |
| 3867 } | 3869 } |
| 3868 | 3870 |
| 3869 } // namespace blink | 3871 } // namespace blink |
| OLD | NEW |