Fix issues with group drag revert
See bug for details on the issues. Issue #1: When dragging multiple tabs to the left, reverting doesn't return them to the correct position. Was happening even without groups. - Fixed by adjusting the target index of revert to account for unreverted tabs. Issue #2: Intermittent crashes. - Seems to be fixed by crrev.com/c/2020908 Issue #3: Header is not returned to the initial view position. - Fixed by adding a call to MoveTabGroup(), which is only needed when dragging within the same tabstrip (otherwise, a new group is being created and positioned correctly). Issue #4: Selection is not restored correctly. - Fixed by actively setting the index of group headers to kNoTab, so that checks in RestoreInitialSelection() correctly ignore group headers. Note: The change at line 657 is to work with line 1656, which is assuming that source_model_index is explicitly set to kNoTab. Bug: 1047761 Change-Id: I18af6a66d4e7788ed90c9be1f27556fc0018c6c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036362 Commit-Queue: Connie Wan <connily@chromium.org> Reviewed-by:Charlene Yan <cyan@chromium.org> Cr-Commit-Position: refs/heads/master@{#738296}
Showing
Please register or sign in to comment