Commit 2a59e28b authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

Remove FirstResponderKeyWindow flag.

Disabling this feature is no longer a valid working state as it breaks
the autofill keyboard accessory.

Bug: None
Change-Id: Ic5bb57e420567c690aff36245cb47b2c508a15e0
Reviewed-on: https://chromium-review.googlesource.com/c/1305239
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611221}
parent 19105678
......@@ -4,9 +4,6 @@
#include "ios/chrome/browser/ui/ui_feature_flags.h"
const base::Feature kFirstResponderKeyWindow{"FirstResponderKeyWindow",
base::FEATURE_ENABLED_BY_DEFAULT};
// TODO(crbug.com/893314) : Remove this flag.
const base::Feature kClosingLastIncognitoTab{"ClosingLastIncognitoTab",
base::FEATURE_ENABLED_BY_DEFAULT};
......
......@@ -7,11 +7,6 @@
#include "base/feature_list.h"
// Avoid the crash in https://crbug.com/816427 by getting the first responder by
// navigating the key window, rather than using -sendAction to find the first
// responder.
extern const base::Feature kFirstResponderKeyWindow;
// Feature to automatically switch to the regular tabs panel in tab grid after
// closing the last incognito tab.
extern const base::Feature kClosingLastIncognitoTab;
......
......@@ -65,19 +65,8 @@ void GetRGBA(UIColor* color, CGFloat* r, CGFloat* g, CGFloat* b, CGFloat* a) {
}
}
// Store a reference to the current first responder.
UIResponder* gFirstResponder = nil;
} // namespace
@implementation UIResponder (FirstResponder)
- (void)cr_markSelfCurrentFirstResponder {
gFirstResponder = self;
}
@end
void SetA11yLabelAndUiAutomationName(UIView* element,
int idsAccessibilityLabel,
NSString* englishUiAutomationName) {
......@@ -642,19 +631,7 @@ UIView* GetFirstResponderSubview(UIView* view) {
UIResponder* GetFirstResponder() {
DCHECK_CURRENTLY_ON(web::WebThread::UI);
UIApplication* application = [UIApplication sharedApplication];
if (base::FeatureList::IsEnabled(kFirstResponderKeyWindow)) {
return GetFirstResponderSubview(application.keyWindow);
}
DCHECK(!gFirstResponder);
[application sendAction:@selector(cr_markSelfCurrentFirstResponder)
to:nil
from:nil
forEvent:nil];
UIResponder* firstResponder = gFirstResponder;
gFirstResponder = nil;
return firstResponder;
return GetFirstResponderSubview([UIApplication sharedApplication].keyWindow);
}
// Trigger a haptic vibration for the user selecting an action. This is a no-op
......
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