New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681883 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression: windows resized on signout/signin with "left" shelf position

Project Member Reported by warx@chromium.org, Jan 17 2017

Issue description

chrome: 56.0.2924.66

(1) shelf left
(2) browser window right snapped by pressing alt+]
(3) sign out
(5) sign in, shelf is still left, but browser window shrinks by a "shelf height".

This behavior is changed in tot (m57), which is:
(1) shelf left
(2) browser window right snapped by pressing alt+]
(3) sign out
(4) sign in, find that shelf is set to bottom, should be the same as  issue 679208  (two monitors there)

 

Comment 1 by warx@chromium.org, Jan 17 2017

Cc: bcmi...@google.com
So what's the behavior now in ToT after  issue 679208  was fixed?

Comment 3 Deleted

btw, in 55.0.2883.105 I don't see either of the problems in the description, so this regressed in 56

Comment 5 by warx@chromium.org, Feb 8 2017

Yeah, I should update it. Now the behavior is:

(1) shelf left
(2) browser window right snapped by pressing alt+]
(3) sign out
(4) sign in, shelf is still left, but browser window shrinks by a "shelf height".

sorry, it has to be snapped.

Comment 6 by warx@chromium.org, Feb 9 2017

Cc: warx@chromium.org
Owner: msw@chromium.org
Had a discussion with xiyuan@,

When SessionStateChanged to active, WmShell creates shelf view, where CreateShelfDelegate->ChromeLauncherController->AttachProfile->Set user's alignment pref is async through mojo.
https://cs.chromium.org/chromium/src/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc?l=97

WmShelf alignment_ is then firstly set to SHELF_ALIGNMENT_BOTTOM and then load profile's preferences.

ash/ could not know profile info, so we would better to change the logic of CreateShelfView?

+xiyuan in this thread

assigned to msw@, as he is more familiar with recent shelf code changes.
Labels: -Type-Bug Type-Bug-Regression
abodenha, is this bad enough we would want a backport to m57? That might affect how it gets fixed. Is this really a P3?

So the issue is that the window layout is restored before the shelf pref is available?

Comment 8 by warx@chromium.org, Feb 9 2017

Labels: -Pri-3 Pri-1
After active user session is started (pref should be ready, it is just called in an async way). Shelf is firstly created as bottom aligned, and then profile's prefs was loaded, which will fire two workarea bounds changed events for adjusting snapped bounds: https://cs.chromium.org/chromium/src/ash/common/wm/default_state.cc?q=adjustsnapp+package:%5Echromium$&l=520

Comment 9 by warx@chromium.org, Feb 9 2017

Cc: xiy...@chromium.org
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bc6a07e9b04a8885f9e206f035e7c2e011b132c

commit 0bc6a07e9b04a8885f9e206f035e7c2e011b132c
Author: msw <msw@chromium.org>
Date: Tue Feb 14 16:33:38 2017

Fix shelf alignment and auto-hide initialization.

Leave the shelf locked and hidden until user prefs are loaded.
(otherwise, a left/right shelf may be placed incorrectly on login)

Make TestShelfDelegate init the shelf prefs, like Chrome would.
Use TestShelfDelegate as the base class in shelf_view_unittest.cc.

To fix mash_unittests:
-Use a TestShellDelegate (and its test sub-delegates).
-Remove TestShelfDelegate's ShelfModel param (WmShell not ready).
-Fix an expectation in AcceleratorControllerTest.GlobalAccelerators.

BUG= 681883 
TEST=automated; snapped windows don't shrink across login w/left-shelf; no shelf behavior changes.
R=jamescook@chromium.org

Review-Url: https://codereview.chromium.org/2688353005
Cr-Commit-Position: refs/heads/master@{#450378}

[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/common/shelf/wm_shelf.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/common/shelf/wm_shelf.h
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/common/test/test_shelf_delegate.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/common/test/test_shelf_delegate.h
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/mus/accelerators/accelerator_controller_unittest.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/mus/shell_delegate_mus.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/mus/shell_delegate_mus.h
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/mus/test/wm_test_helper.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/mus/window_manager.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/mus/window_manager.h
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/shelf/shelf_view_unittest.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/shelf/shelf_widget_unittest.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/shell/shell_delegate_impl.cc
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/shell/shell_delegate_impl.h
[modify] https://crrev.com/0bc6a07e9b04a8885f9e206f035e7c2e011b132c/ash/test/test_shell_delegate.cc

Comment 11 by msw@chromium.org, Feb 14 2017

Status: Fixed (was: Assigned)
Fixed; please help verify, and lmk of any related issues.
I would not recommend merging this fix to any release branches.

Comment 12 by warx@chromium.org, Feb 21 2017

 Issue 679209  has been merged into this issue.
Status: Verified (was: Fixed)
ChromeOs:9304.0.0/Chrome:58.0.3015.0

Sign in to add a comment