New issue
Advanced search Search tips

Issue 892221 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

tablet mode tab-dragging isn't working well

Project Member Reported by mukai@chromium.org, Oct 4

Issue description

ToT r596706

What steps will reproduce the problem?
(1) open chrome with --ash-debug-shortcuts
(2) ctrl-t to create a tab
(3) enter into the tablet mode
(4) drag a tab down to detach
(5) drag the tab down to the bottom half of the screen
(6) drop the tab

What is the expected result?
at 5: the whole background screen gets blurry
at 6: the dropped tab gets maximized

What happens instead?
neither of the expected behaviors happen


Please use labels and text to provide additional information.

If this is a regression (i.e., worked before), please consider using the
bisect tool (https://www.chromium.org/developers/bisect-builds-py) to help
us identify the root cause and more rapidly triage the issue.

For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.


 
Labels: Needs-Bisect
Owner: mukai@chromium.org
Status: Assigned (was: Available)
Started bisecting
5) is expected behavior, which is removed in https://chromium-review.googlesource.com/c/chromium/src/+/1257369.

But 6) is weird. I guess it might be a regression caused by my cl? :(
I just tested and seems the dragged tabs is still maximized at step 6)?
Labels: -Needs-Bisect
Glad to hear that (5) is expected. (6) could be due to my CL.
Status: Started (was: Assigned)
Confirmed my CL r596040 causes (6) -- reverting. Sorry for that.
Note that the tab gets maximized on normal (desktop) mode, but it doesn't in tablet-mode.
Ah. I guess the timing is very tricky... We probably should add a hundred more tests to guard various cases... :(
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 4

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

commit 66f2b045c8fbf0248069127963dfb203d359ebaa
Author: Jun Mukai <mukai@chromium.org>
Date: Thu Oct 04 18:49:13 2018

Revert "fix TabDragging snap on tablet mode with Mash"

This reverts commit c6b5fd715285b031a90fc1f56bdcb1c3fa3d2fb0.

Reason for revert: breaks tablet-mode tab-dragging

Original change's description:
> fix TabDragging snap on tablet mode with Mash
> 
> The reported bug (tab-dragging to snap to left/right on tablet
> mode with Mash) happens due to the timing of ClearTabDraggingInfo(),
> it clears ash::kTabDroppedWindowStateTypeKey but this property
> is used on IsSnapped() function.
> 
> To have this property, this CL moves invocation of
> ClearTabDraggingInfo() slightly later in EndDragImpl, so that
> CompleteDrag() can use the values.
> 
> BUG= 880635 
> TEST=existing test passes, assuming this break nothing
> 
> Change-Id: I8ba34c793dade6462fb1ee9470851cf8f066c4ad
> Reviewed-on: https://chromium-review.googlesource.com/c/1256006
> Commit-Queue: Jun Mukai <mukai@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#596040}

TBR=mukai@chromium.org,sky@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  880635 ,  892221 
Change-Id: Ib9dc6ee2f2e9c9572c770d70435b7d9d088f8dd9
Reviewed-on: https://chromium-review.googlesource.com/c/1261932
Reviewed-by: Jun Mukai <mukai@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596783}
[modify] https://crrev.com/66f2b045c8fbf0248069127963dfb203d359ebaa/chrome/browser/ui/views/tabs/tab_drag_controller.cc

Status: Fixed (was: Started)
For the record, here is the reason why timing of ClearTabDraggingInfo() (in r596040) causes this error:
- when tab-dragging finishes, it checks the original status of the tab-dragging -- and if it's maximized, TabDragController changes the dragged window back to maximized. This is done within CompleteDrag() method.
- in tablet mode, TabletModeWindowState gets this state change event and updates the bounds of the window
- however TabletModeWindowState does not update the bounds when kIsTabDraggingKey property is set (see https://chromium.googlesource.com/chromium/src/+/54f66a499b3e122639234a6850d0db47cca2f2be/ash/wm/tablet_mode/tablet_mode_window_state.cc#436)

So when ClearTabDraggingInfo() moves after CompleteDrag() as r596040 does, it means kIsTabDraggingKey isn't cleared yet. Hence TabletModeWindowState thinks it is still in tab-dragging session.

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 8

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

commit c20cccbebb87def5758d150a6caa34b3bd415565
Author: Jun Mukai <mukai@chromium.org>
Date: Mon Oct 08 18:20:23 2018

Fix of tab-dragging in tablet-mode with Mash

To process Left/Right snapping properly, CompleteDrag() in
TabDragController needs some properties, thus r596783 moves
ClearTabDraggingInfo() after CompleteDrag(). However
 https://crbug.com/892221  revealed that another propertly
kIsDraggingTabsKey needs to be cleared beforehand, otherwise
some bounds calculation goes wrong.

This CL moves ClearTabDraggingInfo() as my previous CL does,
but clears kIsDraggingTabsKey earlier so  issue 892221  won't
be affected.

BUG= 880635 ,  892221 
TEST=manually

Change-Id: Ib7edaab5e968e006bc919b027c138ad9f3d5827d
Reviewed-on: https://chromium-review.googlesource.com/c/1266495
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597616}
[modify] https://crrev.com/c20cccbebb87def5758d150a6caa34b3bd415565/chrome/browser/ui/views/tabs/tab_drag_controller.cc
[modify] https://crrev.com/c20cccbebb87def5758d150a6caa34b3bd415565/chrome/browser/ui/views/tabs/tab_drag_controller.h

Sign in to add a comment