Commit 2e1aa687 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Remove -[CRWWebController dismissKeyboard].

Calling -setEditing:NO on Tab's view has the same effect as calling
-setEditing:NO on WKWebView (keyboard is dismissed). Also inlined
-dismissKeyboard call on CRWNativeContent.

Bug: 620489
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I2f77cbf168907ce2ad45300b16469f71b398bbfd
Reviewed-on: https://chromium-review.googlesource.com/1068257Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560669}
parent f223384c
......@@ -1456,7 +1456,10 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
// Keyboard shouldn't overlay the ecoutez window, so dismiss find in page and
// dismiss the keyboard.
[self closeFindInPage];
[[_model currentTab].webController dismissKeyboard];
[_model.currentTab.view endEditing:NO];
id nativeController = [self nativeControllerForTab:_model.currentTab];
if ([nativeController respondsToSelector:@selector(dismissKeyboard)])
[nativeController dismissKeyboard];
// Ensure that voice search objects are created.
[self ensureVoiceSearchControllerCreated];
......@@ -4948,7 +4951,10 @@ bubblePresenterForFeature:(const base::Feature&)feature
// Dismiss the omnibox (if open).
[self.dispatcher cancelOmniboxEdit];
// Dismiss the soft keyboard (if open).
[[_model currentTab].webController dismissKeyboard];
[_model.currentTab.view endEditing:NO];
id nativeController = [self nativeControllerForTab:_model.currentTab];
if ([nativeController respondsToSelector:@selector(dismissKeyboard)])
[nativeController dismissKeyboard];
// Dismiss Find in Page focus.
[self updateFindBar:NO shouldFocus:NO];
......
......@@ -172,9 +172,6 @@ class WebStateImpl;
- (void)executeUserJavaScript:(NSString*)script
completionHandler:(web::JavaScriptResultBlock)completion;
// Dismisses the soft keyboard.
- (void)dismissKeyboard;
// Requires that the next load rebuild the web view. This is expensive, and
// should be used only in the case where something has changed that the web view
// only checks on creation, such that the whole object needs to be rebuilt.
......
......@@ -1000,12 +1000,6 @@ GURL URLEscapedForHistory(const GURL& url) {
DCHECK(!_webView);
}
- (void)dismissKeyboard {
[_webView endEditing:YES];
if ([self.nativeController respondsToSelector:@selector(dismissKeyboard)])
[self.nativeController dismissKeyboard];
}
- (id<CRWNativeContent>)nativeController {
return [_containerView nativeController];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment