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

Issue 2924873007: Don't activate aura::Window on creation from DesktopNativeWidgetAura if NativeWidgetDelegate prohib… (Closed)

Created:
3 years, 6 months ago by vasilii
Modified:
3 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't activate aura::Window on creation from DesktopNativeWidgetAura if NativeWidgetDelegate prohibits it. The bug was found during PasswordGenerationInteractiveTest.PopupShownAndPasswordSelected flakiness investigation. The autofill drop-down was unexpectedly closed due to focus change event. It happened when StatusBubbleViews disappeared. It turned out that StatusBubbleViews actually was opened as an active window despite it shouldn't. The bug is in DesktopNativeWidgetAura. Lines #503 and #540 are duplicates. Thus, #503 is presumably redundant. Lines #542 and 540 are in the wrong order. The window is focused before the ActivationDelegate is set. Therefore, wm::FocusController had no chance to know that the window can't be activated. BUG=407998 Review-Url: https://codereview.chromium.org/2924873007 Cr-Commit-Position: refs/heads/master@{#478316} Committed: https://chromium.googlesource.com/chromium/src/+/1dd3ea2f36d5ad5da756bb3e296357f67232bbef

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -6 lines) Patch
M ui/views/widget/desktop_aura/desktop_native_widget_aura.cc View 1 2 chunks +2 lines, -6 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc View 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (13 generated)
vasilii
Hi Scott, please review.
3 years, 6 months ago (2017-06-08 13:43:01 UTC) #7
sky
https://codereview.chromium.org/2924873007/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (left): https://codereview.chromium.org/2924873007/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#oldcode503 ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:503: static_cast<aura::client::FocusClient*>(focus_client_.get())-> Shouldn't this code still focus the window for ...
3 years, 6 months ago (2017-06-08 19:45:32 UTC) #8
vasilii
https://codereview.chromium.org/2924873007/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (left): https://codereview.chromium.org/2924873007/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#oldcode503 ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:503: static_cast<aura::client::FocusClient*>(focus_client_.get())-> On 2017/06/08 19:45:32, sky wrote: > Shouldn't this ...
3 years, 6 months ago (2017-06-09 12:36:46 UTC) #11
sky
LGTM
3 years, 6 months ago (2017-06-09 15:28:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2924873007/20001
3 years, 6 months ago (2017-06-09 17:19:29 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/1dd3ea2f36d5ad5da756bb3e296357f67232bbef
3 years, 6 months ago (2017-06-09 17:23:22 UTC) #19
sky
Vasilii, I'm moderately worried there was a reason for adding the later call. Could you ...
3 years, 6 months ago (2017-06-09 18:19:48 UTC) #20
vasilii
The second call was historically first. See https://chromiumcodereview.appspot.com/12342028. Even though I don't know what desktop_root_window_host_->InitFocus(window_) ...
3 years, 6 months ago (2017-06-09 19:40:08 UTC) #21
sky
3 years, 6 months ago (2017-06-09 19:53:39 UTC) #22
Message was sent while issue was closed.
Thanks for investigating.

On Fri, Jun 9, 2017 at 12:40 PM, <vasilii@chromium.org> wrote:

> The second call was historically first. See
> https://chromiumcodereview.appspot.com/12342028. Even though I don't know
> what
> desktop_root_window_host_->InitFocus(window_) did, it seems that the bug
> originated from that CL. Later it was transformed into the current form
> (https://codereview.chromium.org/29983002) but it looks like a mechanical
> change.
>
> The first line comes from https://codereview.chromium.org/31043006. It was
> moving a chunk of code from the platform specifics to
> DesktopNativeWidgetAura.
> However, that particular line isn't a copy/paste. Nothing in the
> comments/description explains why it's needed. Maybe you overlooked the
> second
> call below.
>
> Given that line 540 was introduced as the only Focus call, I think we are
> safe
> to remove it now as redundant.
>
> https://codereview.chromium.org/2924873007/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698