OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 WebKeyboardEventBuilder webEvent(*event); | 812 WebKeyboardEventBuilder webEvent(*event); |
813 if (webEvent.type == WebInputEvent::Undefined) | 813 if (webEvent.type == WebInputEvent::Undefined) |
814 return; | 814 return; |
815 | 815 |
816 if (webEvent.type == WebInputEvent::KeyDown) { | 816 if (webEvent.type == WebInputEvent::KeyDown) { |
817 #if OS(MACOSX) | 817 #if OS(MACOSX) |
818 if (webEvent.modifiers == WebInputEvent::MetaKey | 818 if (webEvent.modifiers == WebInputEvent::MetaKey |
819 #else | 819 #else |
820 if (webEvent.modifiers == WebInputEvent::ControlKey | 820 if (webEvent.modifiers == WebInputEvent::ControlKey |
821 #endif | 821 #endif |
822 && webEvent.windowsKeyCode == VKEY_C | 822 && (webEvent.windowsKeyCode == VKEY_C || webEvent.windowsKeyCode ==
VKEY_INSERT) |
823 // Only copy if there's a selection, so that we only ever do this | 823 // Only copy if there's a selection, so that we only ever do this |
824 // for Pepper plugins that support copying. Windowless NPAPI | 824 // for Pepper plugins that support copying. Windowless NPAPI |
825 // plugins will get the event as before. | 825 // plugins will get the event as before. |
826 && m_webPlugin->hasSelection()) { | 826 && m_webPlugin->hasSelection()) { |
827 copy(); | 827 copy(); |
828 event->setDefaultHandled(); | 828 event->setDefaultHandled(); |
829 return; | 829 return; |
830 } | 830 } |
831 } | 831 } |
832 | 832 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 | 962 |
963 return clipRect; | 963 return clipRect; |
964 } | 964 } |
965 | 965 |
966 bool WebPluginContainerImpl::pluginShouldPersist() const | 966 bool WebPluginContainerImpl::pluginShouldPersist() const |
967 { | 967 { |
968 return m_webPlugin->shouldPersist(); | 968 return m_webPlugin->shouldPersist(); |
969 } | 969 } |
970 | 970 |
971 } // namespace blink | 971 } // namespace blink |
OLD | NEW |