Commit df7f3d1c authored by Malay Keshav's avatar Malay Keshav Committed by Commit Bot

Remove force stacking when touchable chrome is enabled

This patch removes the force stacking of tabs when touch optimized
chrome is enabled and restores the old approach.

Bug: 844193
Change-Id: Icf591860d06afe4698817291f70d619343237a82
Component: Touchable chrome, tabstrip, tab stacking
Reviewed-on: https://chromium-review.googlesource.com/1066864
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560292}
parent 0f7c5244
...@@ -66,9 +66,7 @@ bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) { ...@@ -66,9 +66,7 @@ bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {
// For ash, always allow entering stacked mode. // For ash, always allow entering stacked mode.
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
*adjust_layout = true; *adjust_layout = true;
// Stacked layout is always enabled in touch optimized UI design. return prefs->GetBoolean(prefs::kTabStripStackedLayout);
return ui::MaterialDesignController::IsTouchOptimizedUiEnabled() ||
prefs->GetBoolean(prefs::kTabStripStackedLayout);
#else #else
return base::CommandLine::ForCurrentProcess()->HasSwitch( return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kForceStackedTabStripLayout); switches::kForceStackedTabStripLayout);
......
...@@ -2389,9 +2389,8 @@ bool TabStrip::NeedsTouchLayout() const { ...@@ -2389,9 +2389,8 @@ bool TabStrip::NeedsTouchLayout() const {
} }
void TabStrip::SetResetToShrinkOnExit(bool value) { void TabStrip::SetResetToShrinkOnExit(bool value) {
if (!adjust_layout_ || MD::IsTouchOptimizedUiEnabled()) { if (!adjust_layout_)
return; return;
}
// We have to be using stacked layout to reset out of it. // We have to be using stacked layout to reset out of it.
value &= stacked_layout_; value &= stacked_layout_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment