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

Issue 418093005: Do not save and restore View focus on aura::Window focus changes. (Closed)

Created:
6 years, 5 months ago by msw
Modified:
6 years, 4 months ago
CC:
chromium-reviews, tfarina, ben+views_chromium.org, tdanderson+views_chromium.org, sky
Visibility:
Public.

Description

Do not save and restore View focus on aura::Window focus changes. My http://crrev.com/271312 was wrong; see http://crbug.com/391376#c16 This resolves the following defects: 1) 394661 - print preview focus is restored on tab switch. 2) 391376 - print preview gets focused from CrOS photo editor. 3) 398766 - saving and restoring focus on bubbles/dialogs. This reintroduces the following defects fixed by r271312: 1) 368691 - can't re-type in omnibox after focusing print preview 2) omnibox retains focus when re-focusing print preview. (shows selection/cursor and leaves dropdown window open) TODO(msw): Fix 368691 again... (web dialog focus issue) BUG=391376, 394661, 398766, 368691 TEST=Issues 391376, 394661, and 398766 are fixed; 368691 regresses (for now). R=ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286589

Patch Set 1 #

Patch Set 2 : Focus the dialog's views::WebView when its content::WebContents is focused. #

Total comments: 3

Patch Set 3 : Focus the WebContents in WebContentsViewAura instead of WebDialogWebContentsDelegate. #

Total comments: 3

Patch Set 4 : Just revert the OnWindowFocused save/restore. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -16 lines) Patch
M ui/views/widget/desktop_aura/desktop_native_widget_aura.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.cc View 2 chunks +2 lines, -12 lines 0 comments Download
M ui/views/widget/native_widget_aura.cc View 2 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
msw
Hey Ben, what's the right way to fix the original defects? (we can land this ...
6 years, 5 months ago (2014-07-25 19:56:27 UTC) #1
Ben Goodger (Google)
lgtm for the revert. can you come by at some point so we can discuss ...
6 years, 5 months ago (2014-07-25 20:03:00 UTC) #2
msw
Hey Ben, please take another look. I found a simpler solution than the one we ...
6 years, 4 months ago (2014-07-29 23:10:24 UTC) #3
Ben Goodger (Google)
https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc#newcode2006 content/browser/web_contents/web_contents_impl.cc:2006: FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasFocused()); So you should be able to ...
6 years, 4 months ago (2014-07-30 02:57:26 UTC) #4
msw
https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc#newcode2006 content/browser/web_contents/web_contents_impl.cc:2006: FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasFocused()); On 2014/07/30 02:57:26, Ben Goodger (Google) ...
6 years, 4 months ago (2014-07-30 03:18:13 UTC) #5
msw
Since I'll need to merge to M-37, maybe I'll just do the revert in this ...
6 years, 4 months ago (2014-07-30 14:53:04 UTC) #6
msw
The CQ bit was checked by msw@chromium.org
6 years, 4 months ago (2014-07-30 15:29:28 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/418093005/60001
6 years, 4 months ago (2014-07-30 15:30:06 UTC) #8
Ben Goodger (Google)
https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc#newcode2006 content/browser/web_contents/web_contents_impl.cc:2006: FOR_EACH_OBSERVER(WebContentsObserver, observers_, WasFocused()); Not the WebView... view_->Focus() sets focus ...
6 years, 4 months ago (2014-07-30 15:44:03 UTC) #9
msw
On 2014/07/30 15:44:03, Ben Goodger (Google) wrote: > https://codereview.chromium.org/418093005/diff/20001/content/browser/web_contents/web_contents_impl.cc > File content/browser/web_contents/web_contents_impl.cc (right): > > ...
6 years, 4 months ago (2014-07-30 15:53:12 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-07-30 17:32:07 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-30 17:37:22 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel/builds/1505)
6 years, 4 months ago (2014-07-30 17:37:23 UTC) #13
msw
The CQ bit was checked by msw@chromium.org
6 years, 4 months ago (2014-07-30 17:41:17 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/418093005/60001
6 years, 4 months ago (2014-07-30 17:42:00 UTC) #15
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 20:22:26 UTC) #16
Message was sent while issue was closed.
Change committed as 286589

Powered by Google App Engine
This is Rietveld 408576698