Fix crash with list tab switcher

This commit is contained in:
Carmelo Messina
2023-06-05 20:48:48 +02:00
parent cccc426c8a
commit ffb6d94fcc
@@ -509,9 +509,9 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
}
registerLayoutChangeListener();
mRecyclerView.prepareTabSwitcherView();
+ GridLayoutManager glm = (GridLayoutManager) mRecyclerView.getLayoutManager();
+ if (glm instanceof GridLayoutManagerDockBottom)
+ ((GridLayoutManagerDockBottom)glm).ResetTopPosition();
+ if (mRecyclerView.getLayoutManager() instanceof GridLayoutManagerDockBottom) {
+ ((GridLayoutManagerDockBottom)mRecyclerView.getLayoutManager()).ResetTopPosition();
+ }
mMediator.prepareTabSwitcherView();
mMediator.registerOnScrolledListener(mRecyclerView);
}
@@ -1617,7 +1617,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/system/Statu
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -7629,6 +7629,11 @@ const FeatureEntry kFeatureEntries[] = {
@@ -7633,6 +7633,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWindowsScrollingPersonalityDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kWindowsScrollingPersonality)},