Reland "Make tab strip auto scroll to position of the selected tab"
This reverts commit e3a03f83. Reason for revert: Try to fix the compile failure. Original change's description: > Revert "Make tab strip auto scroll to position of the selected tab" > > This reverts commit 7767aa96. > > Reason for revert: suspect causing compile failure on android-archive-rel > > Sample build: https://ci.chromium.org/p/chromium/builders/ci/android-archive-rel/9648 > > Sample log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8887341380366474896/+/steps/compile/0/stdout?format=raw > ---- > ../../chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiTest.java:70: error: cannot find symbol > CachedFeatureFlags.setGridTabSwitcherEnabledForTesting(true); > ^ > symbol: method setGridTabSwitcherEnabledForTesting(boolean) > location: class CachedFeatureFlags > ../../chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiTest.java:71: error: cannot find symbol > CachedFeatureFlags.setTabGroupsAndroidEnabledForTesting(true); > ^ > symbol: method setTabGroupsAndroidEnabledForTesting(boolean) > location: class CachedFeatureFlags > ../../chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiTest.java:83: error: cannot find symbol > CachedFeatureFlags.setGridTabSwitcherEnabledForTesting(null); > ^ > symbol: method setGridTabSwitcherEnabledForTesting(<null>) > location: class CachedFeatureFlags > ../../chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiTest.java:84: error: cannot find symbol > CachedFeatureFlags.setTabGroupsAndroidEnabledForTesting(null); > ^ > symbol: method setTabGroupsAndroidEnabledForTesting(<null>) > location: class CachedFeatureFlags > 4 errors > ---- > > Original change's description: > > Make tab strip auto scroll to position of the selected tab > > > > Currently, when a tab in group is selected or a new tab is created > > within group, the tab strip doesn't scroll to the position of the > > currently selected tab. This could lead to a state where user needs to > > scroll by themselves to find their selected tab in strip. This CL fixes > > this issue by making following changes: > > * Always scroll the strip to the last position when new tab is added > > in group. > > * When selected a tab in group (through tab grid dialog etc), try to > > scroll to a state where the selected tab is in the middle of the > > strip, if possible, > > > > Bug: 1054079 > > Change-Id: Ic6921225d744a7b5df1853aa78e14a8f9249f2c8 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2068888 > > Commit-Queue: Yue Zhang <yuezhanggg@chromium.org> > > Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#744892} > > TBR=yusufo@chromium.org,wychen@chromium.org,yuezhanggg@chromium.org > > Change-Id: I8db970a5e6c2338ce19c8870964b96c48e66eb44 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 1054079 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076219 > Reviewed-by: Takashi Sakamoto <tasak@google.com> > Commit-Queue: Takashi Sakamoto <tasak@google.com> > Cr-Commit-Position: refs/heads/master@{#744908} TBR=tasak@google.com,yusufo@chromium.org,wychen@chromium.org,yuezhanggg@chromium.org Change-Id: If473ca1321615dd4d2972287274f53be6e0bb574 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1054079 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078415 Commit-Queue: Yue Zhang <yuezhanggg@chromium.org> Reviewed-by:Yue Zhang <yuezhanggg@chromium.org> Cr-Commit-Position: refs/heads/master@{#745086}
Showing
Please register or sign in to comment