| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2007 Apple, Inc.  All rights reserved. | 2  * Copyright (C) 2006, 2007 Apple, Inc.  All rights reserved. | 
| 3  * Copyright (C) 2012 Google, Inc.  All rights reserved. | 3  * Copyright (C) 2012 Google, Inc.  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 | 6  * modification, are permitted provided that the following conditions | 
| 7  * are met: | 7  * are met: | 
| 8  * 1. Redistributions of source code must retain the above copyright | 8  * 1. 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  * 2. Redistributions in binary form must reproduce the above copyright | 10  * 2. Redistributions in binary form must reproduce the above copyright | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| 24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 25  */ | 25  */ | 
| 26 | 26 | 
| 27 #include "config.h" | 27 #include "config.h" | 
| 28 #include "core/editing/Editor.h" | 28 #include "core/editing/Editor.h" | 
| 29 | 29 | 
| 30 #include "core/events/KeyboardEvent.h" | 30 #include "core/events/KeyboardEvent.h" | 
| 31 #include "core/frame/Frame.h" | 31 #include "core/frame/Frame.h" | 
| 32 #include "core/page/EditorClient.h" | 32 #include "core/page/EditorClient.h" | 
| 33 #include "core/platform/chromium/KeyboardCodes.h" | 33 #include "platform/KeyboardCodes.h" | 
| 34 #include "platform/PlatformKeyboardEvent.h" | 34 #include "platform/PlatformKeyboardEvent.h" | 
| 35 | 35 | 
| 36 namespace WebCore { | 36 namespace WebCore { | 
| 37 | 37 | 
| 38 // | 38 // | 
| 39 // The below code was adapted from the WebKit file webview.cpp | 39 // The below code was adapted from the WebKit file webview.cpp | 
| 40 // | 40 // | 
| 41 | 41 | 
| 42 static const unsigned CtrlKey = 1 << 0; | 42 static const unsigned CtrlKey = 1 << 0; | 
| 43 static const unsigned AltKey = 1 << 1; | 43 static const unsigned AltKey = 1 << 1; | 
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 298 } | 298 } | 
| 299 | 299 | 
| 300 void Editor::handleKeyboardEvent(KeyboardEvent* evt) | 300 void Editor::handleKeyboardEvent(KeyboardEvent* evt) | 
| 301 { | 301 { | 
| 302     // Give the embedder a chance to handle the keyboard event. | 302     // Give the embedder a chance to handle the keyboard event. | 
| 303     if (client().handleKeyboardEvent() || handleEditingKeyboardEvent(evt)) | 303     if (client().handleKeyboardEvent() || handleEditingKeyboardEvent(evt)) | 
| 304         evt->setDefaultHandled(); | 304         evt->setDefaultHandled(); | 
| 305 } | 305 } | 
| 306 | 306 | 
| 307 } // namesace WebCore | 307 } // namesace WebCore | 
| OLD | NEW | 
|---|