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

Issue 2919973002: desktop_aura: do not restore focused view if it has modal transient child (Closed)

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

Description

desktop_aura: do not restore focused view if it has modal transient child Changes: RestoreFocusedView on DesktopNativeWidgetAura::HandleActivationChanged is added to process Linux desktop native widget asynchronous activation. This works when all the child widgets are managed by top level's FocusManager. However, this is not true for modal transient child, whose FocusManager is not the same as top level's FocusManager. In this case on activation, we shall not restore focused view on top level's FocusManager. Instead, the modal transient child window will get activated and restore focused view through its own NativeWidgetAura::OnWindowActivated. BUG=727641 TEST=emulator test saw bug fixed and added test coverage Review-Url: https://codereview.chromium.org/2919973002 Cr-Commit-Position: refs/heads/master@{#476835} Committed: https://chromium.googlesource.com/chromium/src/+/81ead2ab2380d5f624b9ce63df050a76de134f06

Patch Set 1 #

Total comments: 4

Patch Set 2 : comments #

Patch Set 3 : added test coverage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -5 lines) Patch
M ui/views/widget/desktop_aura/desktop_native_widget_aura.cc View 1 1 chunk +12 lines, -5 lines 0 comments Download
M ui/views/widget/widget_interactive_uitest.cc View 1 2 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (15 generated)
Qiang(Joe) Xu
Hi sky, PTAL thanks
3 years, 6 months ago (2017-06-02 16:36:47 UTC) #8
sky
Please add test coverage. https://codereview.chromium.org/2919973002/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (right): https://codereview.chromium.org/2919973002/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode80 ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:80: ui::ModalType type = Widget::GetWidgetForNativeView(window) Are ...
3 years, 6 months ago (2017-06-02 17:34:11 UTC) #9
Qiang(Joe) Xu
Hi sky, comments addressed and test coverage added, ptal thanks https://codereview.chromium.org/2919973002/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (right): https://codereview.chromium.org/2919973002/diff/1/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc#newcode80 ...
3 years, 6 months ago (2017-06-02 21:37:08 UTC) #13
sky
LGTM
3 years, 6 months ago (2017-06-02 23:31:14 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/2919973002/40001
3 years, 6 months ago (2017-06-02 23:48:38 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/81ead2ab2380d5f624b9ce63df050a76de134f06
3 years, 6 months ago (2017-06-02 23:54:07 UTC) #21
blundell
3 years, 6 months ago (2017-06-05 09:57:50 UTC) #22
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2921253002/ by blundell@chromium.org.

The reason for reverting is: The newly-added test is flaky:

https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9...

Reverting the CL rather than disabling the test as it's not clear where the
flake is coming from: is it a problem in the test or in the production code
added in this CL?.

Powered by Google App Engine
This is Rietveld 408576698