• Takashi Sakamoto's avatar
    Revert "Clamshell <-> tablet mode transition" · 76e330d6
    Takashi Sakamoto authored
    This reverts commit 87d6424d.
    
    Reason for revert: suspect causing ash_unittests failure on Linux Chromium OS ASan LSan Tests (1).
    https://ci.chromium.org/p/chromium/builders/ci/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20%281%29/34147
    deterministic failures:
    TabletModeWindowManagerWithClamshellSplitViewTest.ClamshellTabletTransitionTest
    
    ==23210==ERROR: AddressSanitizer: container-overflow on address 0x6020000e12b8 at pc 0x55b059128cb9 bp 0x7ffdb6f1b8d0 sp 0x7ffdb6f1b8c8
    READ of size 8 at 0x6020000e12b8 thread T0
        #0 0x55b059128cb8 in ash::SplitViewDivider::~SplitViewDivider() ./../../ash/wm/splitview/split_view_divider.cc:253:19
        #1 0x55b059128f4d in ash::SplitViewDivider::~SplitViewDivider() ./../../ash/wm/splitview/split_view_divider.cc:249:39
        #2 0x55b0591499fc in ash::TabletModeController::SetTabletModeEnabledInternal(bool) ./../../ash/wm/tablet_mode/tablet_mode_controller.cc:622:16
        #3 0x55b052f19119 in ash::TabletModeWindowManagerTest::DestroyTabletModeWindowManager() ./../../ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc:138:45
        #4 0x55b052f8060b in ash::TabletModeWindowManagerWithClamshellSplitViewTest_ClamshellTabletTransitionTest_Test::TestBody() ./../../ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc:1974:3
    
    https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8909703871929620480/+/steps/ash_unittests/0/logs/Deterministic_failure:_TabletModeWindowManagerWithClamshellSplitViewTest.ClamshellTabletTransitionTest__status_CRASH_/0
    
    Original change's description:
    > Clamshell <-> tablet mode transition
    > 
    > There are 3 cases in clamshell to tablet mode transition:
    > 1) overview is active but splitview is not: keep overview active during
    >    transition.
    > 2) overview and splitview are both active: keep them both active during
    >    transition.
    > 3) overview and splitview are both inactive: keep the current behavior.
    >    a) if the top window is a snapped window, put it in splitview
    >    b) if the second top window is also a snapped window that snaps to the
    >       opposite side of the screen, put it in splitview as well
    >    c) if the top window is not a snapped window, maximize or fullscreen
    >       all windows when entering tablet mode.
    > 
    > There are 4 cases in tablet to clamshell mode transition:
    > 1) overview is active but splitview is not: keep overview active during
    >    transition.
    > 2) overview and splitview are both active: keep them both active during
    >    transition.
    > 3) overview is inactive but splitview is active (i.e., two snapped windows),
    >    splitview will be no longer active after transition. But the two snapped
    >    window will still keep snapped in clamshell mode.
    > 4) overview and splitview are both inactive: keep the current behavior,
    >    i.e., restore all windows to its old window state before entering tablet
    >    mode.
    > 
    > 
    > Bug: 890029
    > Change-Id: I7769021f74c3e9d591b19258be2821992d780451
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658955
    > Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
    > Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#670678}
    
    TBR=oshima@chromium.org,xdai@chromium.org
    
    # Not skipping CQ checks because original CL landed > 1 day ago.
    
    Bug: 890029
    Change-Id: I518170a62a0cf82aff14748679e3a5f12f054f72
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1675924Reviewed-by: default avatarTakashi Sakamoto <tasak@google.com>
    Commit-Queue: Takashi Sakamoto <tasak@google.com>
    Cr-Commit-Position: refs/heads/master@{#671997}
    76e330d6
tablet_mode_window_manager.cc 24.5 KB