OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 event->setDefaultHandled(); | 741 event->setDefaultHandled(); |
742 } | 742 } |
743 | 743 |
744 void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) | 744 void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) |
745 { | 745 { |
746 WebKeyboardEventBuilder webEvent(*event); | 746 WebKeyboardEventBuilder webEvent(*event); |
747 if (webEvent.type == WebInputEvent::Undefined) | 747 if (webEvent.type == WebInputEvent::Undefined) |
748 return; | 748 return; |
749 | 749 |
750 if (webEvent.type == WebInputEvent::KeyDown) { | 750 if (webEvent.type == WebInputEvent::KeyDown) { |
751 #if OS(DARWIN) | 751 #if OS(MACOSX) |
752 if (webEvent.modifiers == WebInputEvent::MetaKey | 752 if (webEvent.modifiers == WebInputEvent::MetaKey |
753 #else | 753 #else |
754 if (webEvent.modifiers == WebInputEvent::ControlKey | 754 if (webEvent.modifiers == WebInputEvent::ControlKey |
755 #endif | 755 #endif |
756 && webEvent.windowsKeyCode == VKEY_C | 756 && webEvent.windowsKeyCode == VKEY_C |
757 // Only copy if there's a selection, so that we only ever do this | 757 // Only copy if there's a selection, so that we only ever do this |
758 // for Pepper plugins that support copying. Windowless NPAPI | 758 // for Pepper plugins that support copying. Windowless NPAPI |
759 // plugins will get the event as before. | 759 // plugins will get the event as before. |
760 && m_webPlugin->hasSelection()) { | 760 && m_webPlugin->hasSelection()) { |
761 copy(); | 761 copy(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 // Take our element and get the clip rect from the enclosing layer and | 888 // Take our element and get the clip rect from the enclosing layer and |
889 // frame view. | 889 // frame view. |
890 clipRect.intersect( | 890 clipRect.intersect( |
891 m_element->document().view()->windowClipRectForFrameOwner(m_element,
true)); | 891 m_element->document().view()->windowClipRectForFrameOwner(m_element,
true)); |
892 } | 892 } |
893 | 893 |
894 return clipRect; | 894 return clipRect; |
895 } | 895 } |
896 | 896 |
897 } // namespace WebKit | 897 } // namespace WebKit |
OLD | NEW |