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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 // clears the text box. So it's important this happens after the event | 1679 // clears the text box. So it's important this happens after the event |
1680 // handlers have been fired. | 1680 // handlers have been fired. |
1681 if (mouseEvent.type() != PlatformEvent::MouseReleased) | 1681 if (mouseEvent.type() != PlatformEvent::MouseReleased) |
1682 return false; | 1682 return false; |
1683 | 1683 |
1684 if (!m_frame->page()) | 1684 if (!m_frame->page()) |
1685 return false; | 1685 return false; |
1686 Frame* focusFrame = m_frame->page()->focusController()->focusedOrMainFrame()
; | 1686 Frame* focusFrame = m_frame->page()->focusController()->focusedOrMainFrame()
; |
1687 // Do not paste here if the focus was moved somewhere else. | 1687 // Do not paste here if the focus was moved somewhere else. |
1688 if (m_frame == focusFrame && m_frame->editor()->client()->supportsGlobalSele
ction()) | 1688 if (m_frame == focusFrame && m_frame->editor()->client()->supportsGlobalSele
ction()) |
1689 return m_frame->editor()->command(ASCIILiteral("PasteGlobalSelection")).
execute(); | 1689 return m_frame->editor()->command("PasteGlobalSelection").execute(); |
1690 | 1690 |
1691 return false; | 1691 return false; |
1692 } | 1692 } |
1693 | 1693 |
1694 | 1694 |
1695 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
rget, const PlatformMouseEvent& event, Clipboard* clipboard) | 1695 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
rget, const PlatformMouseEvent& event, Clipboard* clipboard) |
1696 { | 1696 { |
1697 FrameView* view = m_frame->view(); | 1697 FrameView* view = m_frame->view(); |
1698 | 1698 |
1699 // FIXME: We might want to dispatch a dragleave even if the view is gone. | 1699 // FIXME: We might want to dispatch a dragleave even if the view is gone. |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3836 unsigned EventHandler::accessKeyModifiers() | 3836 unsigned EventHandler::accessKeyModifiers() |
3837 { | 3837 { |
3838 #if OS(DARWIN) | 3838 #if OS(DARWIN) |
3839 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3839 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3840 #else | 3840 #else |
3841 return PlatformEvent::AltKey; | 3841 return PlatformEvent::AltKey; |
3842 #endif | 3842 #endif |
3843 } | 3843 } |
3844 | 3844 |
3845 } // namespace WebCore | 3845 } // namespace WebCore |
OLD | NEW |