Chromium Code Reviews| 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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1653 | 1653 |
| 1654 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa rget, const PlatformMouseEvent& event, DataTransfer* dataTransfer) | 1654 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa rget, const PlatformMouseEvent& event, DataTransfer* dataTransfer) |
| 1655 { | 1655 { |
| 1656 FrameView* view = m_frame->view(); | 1656 FrameView* view = m_frame->view(); |
| 1657 | 1657 |
| 1658 // FIXME: We might want to dispatch a dragleave even if the view is gone. | 1658 // FIXME: We might want to dispatch a dragleave even if the view is gone. |
| 1659 if (!view) | 1659 if (!view) |
| 1660 return false; | 1660 return false; |
| 1661 | 1661 |
| 1662 // FIXME: The drag event have to support for |buttons| attribute because | 1662 // FIXME: The drag event have to support for |buttons| attribute because |
| 1663 // the event is derived from mouse event. Please see crbug.com/276941. | 1663 // the event is derived from mouse event. Please see crbug.com/276941. |
|
Rick Byers
2015/02/04 11:42:34
you can remove this FIXME now!
zino
2015/02/06 07:00:40
Done.
| |
| 1664 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, | 1664 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, |
| 1665 true, true, m_frame->document()->domWindow(), | 1665 true, true, m_frame->document()->domWindow(), |
| 1666 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(), | 1666 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(), |
| 1667 event.movementDelta().x(), event.movementDelta().y(), | 1667 event.movementDelta().x(), event.movementDelta().y(), |
| 1668 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), | 1668 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), |
| 1669 0, 0, nullptr, dataTransfer); | 1669 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, d ataTransfer); |
| 1670 | 1670 |
| 1671 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION); | 1671 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION); |
| 1672 return me->defaultPrevented(); | 1672 return me->defaultPrevented(); |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 static bool targetIsFrame(Node* target, LocalFrame*& frame) | 1675 static bool targetIsFrame(Node* target, LocalFrame*& frame) |
| 1676 { | 1676 { |
| 1677 if (!isHTMLFrameElementBase(target)) | 1677 if (!isHTMLFrameElementBase(target)) |
| 1678 return false; | 1678 return false; |
| 1679 | 1679 |
| (...skipping 2226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3906 unsigned EventHandler::accessKeyModifiers() | 3906 unsigned EventHandler::accessKeyModifiers() |
| 3907 { | 3907 { |
| 3908 #if OS(MACOSX) | 3908 #if OS(MACOSX) |
| 3909 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3909 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3910 #else | 3910 #else |
| 3911 return PlatformEvent::AltKey; | 3911 return PlatformEvent::AltKey; |
| 3912 #endif | 3912 #endif |
| 3913 } | 3913 } |
| 3914 | 3914 |
| 3915 } // namespace blink | 3915 } // namespace blink |
| OLD | NEW |