Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2723963003: Remove renderer-to-renderer input event forwarding for OOPIFs (Closed)
Patch Set: Correct test expectation Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 if (m_pagePopup) { 1121 if (m_pagePopup) {
1122 m_pagePopup->handleKeyEvent(event); 1122 m_pagePopup->handleKeyEvent(event);
1123 // We need to ignore the next Char event after this otherwise pressing 1123 // We need to ignore the next Char event after this otherwise pressing
1124 // enter when selecting an item in the popup will go to the page. 1124 // enter when selecting an item in the popup will go to the page.
1125 if (WebInputEvent::RawKeyDown == event.type()) 1125 if (WebInputEvent::RawKeyDown == event.type())
1126 m_suppressNextKeypressEvent = true; 1126 m_suppressNextKeypressEvent = true;
1127 return WebInputEventResult::HandledSystem; 1127 return WebInputEventResult::HandledSystem;
1128 } 1128 }
1129 1129
1130 Frame* focusedFrame = focusedCoreFrame(); 1130 Frame* focusedFrame = focusedCoreFrame();
1131 if (focusedFrame && focusedFrame->isRemoteFrame()) {
1132 WebRemoteFrameImpl* webFrame =
1133 WebRemoteFrameImpl::fromFrame(*toRemoteFrame(focusedFrame));
1134 webFrame->client()->forwardInputEvent(&event);
1135 return WebInputEventResult::HandledSystem;
1136 }
1137
1138 if (!focusedFrame || !focusedFrame->isLocalFrame()) 1131 if (!focusedFrame || !focusedFrame->isLocalFrame())
1139 return WebInputEventResult::NotHandled; 1132 return WebInputEventResult::NotHandled;
1140 1133
1141 LocalFrame* frame = toLocalFrame(focusedFrame); 1134 LocalFrame* frame = toLocalFrame(focusedFrame);
1142 1135
1143 WebInputEventResult result = frame->eventHandler().keyEvent(event); 1136 WebInputEventResult result = frame->eventHandler().keyEvent(event);
1144 if (result != WebInputEventResult::NotHandled) { 1137 if (result != WebInputEventResult::NotHandled) {
1145 if (WebInputEvent::RawKeyDown == event.type()) { 1138 if (WebInputEvent::RawKeyDown == event.type()) {
1146 // Suppress the next keypress event unless the focused node is a plugin 1139 // Suppress the next keypress event unless the focused node is a plugin
1147 // node. (Flash needs these keypress events to handle non-US keyboards.) 1140 // node. (Flash needs these keypress events to handle non-US keyboards.)
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after
4173 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4174 return nullptr; 4167 return nullptr;
4175 return focusedFrame; 4168 return focusedFrame;
4176 } 4169 }
4177 4170
4178 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4179 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4180 } 4173 }
4181 4174
4182 } // namespace blink 4175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698