| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 | 866 |
| 867 // Please refer to the comments explaining the m_suppressNextKeypressEvent | 867 // Please refer to the comments explaining the m_suppressNextKeypressEvent |
| 868 // member. | 868 // member. |
| 869 // The m_suppressNextKeypressEvent is set if the KeyDown is handled by | 869 // The m_suppressNextKeypressEvent is set if the KeyDown is handled by |
| 870 // Webkit. A keyDown event is typically associated with a keyPress(char) | 870 // Webkit. A keyDown event is typically associated with a keyPress(char) |
| 871 // event and a keyUp event. We reset this flag here as this is a new keyDown | 871 // event and a keyUp event. We reset this flag here as this is a new keyDown |
| 872 // event. | 872 // event. |
| 873 m_suppressNextKeypressEvent = false; | 873 m_suppressNextKeypressEvent = false; |
| 874 | 874 |
| 875 Frame* focusedFrame = focusedCoreFrame(); | 875 Frame* focusedFrame = focusedCoreFrame(); |
| 876 if (focusedFrame && focusedFrame->isRemoteFrame()) { | |
| 877 WebRemoteFrameImpl* webFrame = | |
| 878 WebRemoteFrameImpl::fromFrame(*toRemoteFrame(focusedFrame)); | |
| 879 webFrame->client()->forwardInputEvent(&event); | |
| 880 return WebInputEventResult::HandledSystem; | |
| 881 } | |
| 882 | |
| 883 if (!focusedFrame || !focusedFrame->isLocalFrame()) | 876 if (!focusedFrame || !focusedFrame->isLocalFrame()) |
| 884 return WebInputEventResult::NotHandled; | 877 return WebInputEventResult::NotHandled; |
| 885 | 878 |
| 886 LocalFrame* frame = toLocalFrame(focusedFrame); | 879 LocalFrame* frame = toLocalFrame(focusedFrame); |
| 887 | 880 |
| 888 WebInputEventResult result = frame->eventHandler().keyEvent(event); | 881 WebInputEventResult result = frame->eventHandler().keyEvent(event); |
| 889 if (result != WebInputEventResult::NotHandled) { | 882 if (result != WebInputEventResult::NotHandled) { |
| 890 if (WebInputEvent::RawKeyDown == event.type()) { | 883 if (WebInputEvent::RawKeyDown == event.type()) { |
| 891 // Suppress the next keypress event unless the focused node is a plugin | 884 // Suppress the next keypress event unless the focused node is a plugin |
| 892 // node. (Flash needs these keypress events to handle non-US keyboards.) | 885 // node. (Flash needs these keypress events to handle non-US keyboards.) |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 return nullptr; | 1131 return nullptr; |
| 1139 } | 1132 } |
| 1140 | 1133 |
| 1141 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1134 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1142 if (!m_imeAcceptEvents) | 1135 if (!m_imeAcceptEvents) |
| 1143 return nullptr; | 1136 return nullptr; |
| 1144 return focusedLocalFrameInWidget(); | 1137 return focusedLocalFrameInWidget(); |
| 1145 } | 1138 } |
| 1146 | 1139 |
| 1147 } // namespace blink | 1140 } // namespace blink |
| OLD | NEW |