DescriptionRevise NativeWidgetWin focus hack; force focus on restore.
Remove NativeWidgetWin::RestoreFocusOnActivate's built-in hack.
Always use kReasonFocusRestore in FocusManager::RestoreFocusedView().
Always run FocusManager::SetFocusedViewWithReason with kReasonFocusRestore.
(this clears and resets child HWND focus, needed for the hack)
Fixes initial omnibox focus on Win with --enable-views-textfield; plus:
interactive_ui_tests.exe --gtest_filter=BrowserFocusTest.ClickingMovesFocus --enable-views-textfield
views_unittests.exe --gtest_filter=BubbleDelegateTest.InitiallyFocusedView --enable-views-textfield
(test updated to have the proper expectation, removing a non-Aura Win hack)
Doesn't regress child HWND focus like the previous attempt: http://crrev.com/186235
Remove SearchTextfieldView Textfield subclass; make RequestFocus non-virtual.
TODO(followup): Polish find-bar focus behavior as needed in followups.
BUG=125976, 131660, 224591, 225963
TEST=View and web-contents focus restoration on minimize/restore; repro steps in bugs. Find bar works as expected (may need attention in followups). Tests pass with --enable-views-textfield.
R=ben@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192493
Patch Set 1 : ClearNativeFocus in NativeWidgetWin hack; force focus change with kReasonFocusRestore. #Patch Set 2 : Remove unnecessary SearchTextfieldView; make RequestFocus non-virtual. #Patch Set 3 : Restore the intent of the focusable view check. #Patch Set 4 : Sync and rebase, keep BubbleDelegateTest fix. #Patch Set 5 : Remove IsAccessibilityFocusable check; WebView is not focusable. #Patch Set 6 : Remove ClearNativeFocus call; move comment; refactor RestoreFocusedView. #Patch Set 7 : Re-enable BrowserFocusTest.BrowsersRememberFocus. #Patch Set 8 : Add ChromeOS exception for BrowserFocusTest.BrowsersRememberFocus #Patch Set 9 : Restore FocusManager::RestoreFocusedView return values. #
Total comments: 2
Patch Set 10 : Update test comment. #
Total comments: 2
Patch Set 11 : Keep BrowserFocusTest.BrowsersRememberFocus disabled. #
Total comments: 2
Messages
Total messages: 28 (0 generated)
|