Chromium Code Reviews

Issue 5009001: Fixed focus requesting for the findbar. (Closed)

Created:
10 years, 1 month ago by altimofeev
Modified:
9 years, 7 months ago
Reviewers:
Finnur, DaveMoore, Ben Goodger (Google)
CC:
chromium-reviews, ben+cc_chromium.org
Visibility:
Public.

Description

Fixed focus requesting for the findbar. BUG=chromium-os:8829 TEST=Run chromium. Use wrench menu to open 'Find' window. Notice that focus is inplace. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66427

Patch Set 1 #

Patch Set 2 : DCHECKs added #

Total comments: 8

Patch Set 3 : nits #

Total comments: 8

Patch Set 4 : nits + restoring #

Patch Set 5 : extra request #

Patch Set 6 : the nits #

Total comments: 8

Patch Set 7 : nits #

Patch Set 8 : merge #

Unified diffs Side-by-side diffs Stats (+18 lines, -0 lines)
M chrome/browser/ui/views/find_bar_view.cc View 2 chunks +18 lines, -0 lines 0 comments

Messages

Total messages: 15 (0 generated)
altimofeev
10 years, 1 month ago (2010-11-15 14:35:49 UTC) #1
Finnur
drive-by... http://codereview.chromium.org/5009001/diff/2001/chrome/browser/ui/views/find_bar_view.cc File chrome/browser/ui/views/find_bar_view.cc (right): http://codereview.chromium.org/5009001/diff/2001/chrome/browser/ui/views/find_bar_view.cc#newcode227 chrome/browser/ui/views/find_bar_view.cc:227: DCHECK(find_text_); This is redundant and just adds cruft ...
10 years, 1 month ago (2010-11-15 14:49:12 UTC) #2
altimofeev
Thanks for the comments. http://codereview.chromium.org/5009001/diff/2001/chrome/browser/ui/views/find_bar_view.cc File chrome/browser/ui/views/find_bar_view.cc (right): http://codereview.chromium.org/5009001/diff/2001/chrome/browser/ui/views/find_bar_view.cc#newcode227 chrome/browser/ui/views/find_bar_view.cc:227: DCHECK(find_text_); On 2010/11/15 14:49:12, Finnur ...
10 years, 1 month ago (2010-11-15 15:36:18 UTC) #3
Finnur
> I have tried your use case. The focus behaves as it should. Excellent. A ...
10 years, 1 month ago (2010-11-15 16:20:30 UTC) #4
Finnur
Also note that the try bots complained about TabsRememberFocusFindInPage crashing. On 2010/11/15 16:20:30, Finnur wrote: ...
10 years, 1 month ago (2010-11-16 13:30:21 UTC) #5
altimofeev
> Also note that the try bots complained about TabsRememberFocusFindInPage crashing. Also I have found ...
10 years, 1 month ago (2010-11-16 14:28:34 UTC) #6
DaveMoore
LGTM
10 years, 1 month ago (2010-11-16 16:57:34 UTC) #7
Finnur
http://codereview.chromium.org/5009001/diff/16001/chrome/browser/ui/views/find_bar_view.cc File chrome/browser/ui/views/find_bar_view.cc (right): http://codereview.chromium.org/5009001/diff/16001/chrome/browser/ui/views/find_bar_view.cc#newcode232 chrome/browser/ui/views/find_bar_view.cc:232: // Restore focus to allow the find bar's external ...
10 years, 1 month ago (2010-11-16 17:08:27 UTC) #8
altimofeev
http://codereview.chromium.org/5009001/diff/16001/chrome/browser/ui/views/find_bar_view.cc File chrome/browser/ui/views/find_bar_view.cc (right): http://codereview.chromium.org/5009001/diff/16001/chrome/browser/ui/views/find_bar_view.cc#newcode232 chrome/browser/ui/views/find_bar_view.cc:232: // Restore focus to allow the find bar's external ...
10 years, 1 month ago (2010-11-17 09:58:11 UTC) #9
Finnur
LGTM
10 years, 1 month ago (2010-11-17 10:04:16 UTC) #10
Ben Goodger (Google)
Was any attempt to understand the bug in views made before this workaround was inserted? ...
9 years, 10 months ago (2011-02-03 17:28:21 UTC) #11
altimofeev
1/ I tried to explain the reasons in the comments. Have you got any questions ...
9 years, 10 months ago (2011-02-04 09:45:36 UTC) #12
Ben Goodger (Google)
Your comment does not explain why this functionality differs between OS_WIN and OS_CHROMEOS. See my ...
9 years, 10 months ago (2011-02-04 15:26:24 UTC) #13
Ben Goodger (Google)
No further thoughts? -Ben On Fri, Feb 4, 2011 at 7:26 AM, Ben Goodger (Google) ...
9 years, 10 months ago (2011-02-08 15:38:20 UTC) #14
altimofeev
9 years, 10 months ago (2011-02-09 20:17:25 UTC) #15
> No further thoughts?

The following happens in CrOS:
1. user opens wrench menu, wrench menu is created
2. user clicks on the find menu item
3. code that shows find bar is invoked
4. gtk sends focus to the previously focused widget (my guess is that it is
related to asynchronous nature of gtk)

Probably, in Windows, 3-rd and 4-th actions are swapped or there is no 4-th
action at all.

Powered by Google App Engine