| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 return mapKey ? keyPressCommandsMap->get(mapKey) : 0; | 533 return mapKey ? keyPressCommandsMap->get(mapKey) : 0; |
| 534 } | 534 } |
| 535 | 535 |
| 536 bool EditorClientImpl::handleEditingKeyboardEvent(KeyboardEvent* evt) | 536 bool EditorClientImpl::handleEditingKeyboardEvent(KeyboardEvent* evt) |
| 537 { | 537 { |
| 538 const PlatformKeyboardEvent* keyEvent = evt->keyEvent(); | 538 const PlatformKeyboardEvent* keyEvent = evt->keyEvent(); |
| 539 // do not treat this as text input if it's a system key event | 539 // do not treat this as text input if it's a system key event |
| 540 if (!keyEvent || keyEvent->isSystemKey()) | 540 if (!keyEvent || keyEvent->isSystemKey()) |
| 541 return false; | 541 return false; |
| 542 | 542 |
| 543 Frame* frame = evt->target()->toNode()->document()->frame(); | 543 Frame* frame = evt->target()->toNode()->document().frame(); |
| 544 if (!frame) | 544 if (!frame) |
| 545 return false; | 545 return false; |
| 546 | 546 |
| 547 String commandName = interpretKeyEvent(evt); | 547 String commandName = interpretKeyEvent(evt); |
| 548 Editor::Command command = frame->editor().command(commandName); | 548 Editor::Command command = frame->editor().command(commandName); |
| 549 | 549 |
| 550 if (keyEvent->type() == PlatformEvent::RawKeyDown) { | 550 if (keyEvent->type() == PlatformEvent::RawKeyDown) { |
| 551 // WebKit doesn't have enough information about mode to decide how | 551 // WebKit doesn't have enough information about mode to decide how |
| 552 // commands that just insert text if executed via Editor should be treat
ed, | 552 // commands that just insert text if executed via Editor should be treat
ed, |
| 553 // so we leave it upon WebCore to either handle them immediately | 553 // so we leave it upon WebCore to either handle them immediately |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 #endif | 776 #endif |
| 777 } | 777 } |
| 778 | 778 |
| 779 void EditorClientImpl::willSetInputMethodState() | 779 void EditorClientImpl::willSetInputMethodState() |
| 780 { | 780 { |
| 781 if (m_webView->client()) | 781 if (m_webView->client()) |
| 782 m_webView->client()->resetInputMethod(); | 782 m_webView->client()->resetInputMethod(); |
| 783 } | 783 } |
| 784 | 784 |
| 785 } // namesace WebKit | 785 } // namesace WebKit |
| OLD | NEW |