Commit e7b48931 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Adds a feature flag to force an "unstacked" tabstrip mode.

This feature prevents tabs from stacking and constraining themselves to the width
of the tabstrip, instead allowing the tabstrip to scroll horizontally as a
normal scroll view would.  This is done in preparation for enabling this mode
when VoiceOver is on, to fix a bug where stacked tabs would not properly become
visible when focused by VoiceOver.

Tabs continue to be stacked by default.  A new feature flag is added to force
"unstacked" mode, and a second feature flag is added to enable unstacked mode
whenever VoiceOver is running.

BUG=979803

Change-Id: I4e4ad9f53cad1c43a0ad8d16917bd848ac2142fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1833741
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarRobbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#714452}
parent c447cff5
...@@ -566,6 +566,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -566,6 +566,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flag_descriptions::kEnablePersistentDownloadsName, flag_descriptions::kEnablePersistentDownloadsName,
flag_descriptions::kEnablePersistentDownloadsDescription, flags_ui::kOsIos, flag_descriptions::kEnablePersistentDownloadsDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(web::features::kEnablePersistentDownloads)}, FEATURE_VALUE_TYPE(web::features::kEnablePersistentDownloads)},
{"force-unstacked-tabstrip", flag_descriptions::kForceUnstackedTabstripName,
flag_descriptions::kForceUnstackedTabstripDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kForceUnstackedTabstrip)},
}; };
// Add all switches from experimental flags to |command_line|. // Add all switches from experimental flags to |command_line|.
......
...@@ -201,6 +201,10 @@ const char kFindInPageiFrameName[] = "Find in Page in iFrames."; ...@@ -201,6 +201,10 @@ const char kFindInPageiFrameName[] = "Find in Page in iFrames.";
const char kFindInPageiFrameDescription[] = const char kFindInPageiFrameDescription[] =
"When enabled, Find In Page will search in iFrames."; "When enabled, Find In Page will search in iFrames.";
const char kForceUnstackedTabstripName[] = "Force unstacked tabstrip.";
const char kForceUnstackedTabstripDescription[] =
"When enabled, the tabstrip will draw unstacked, without tab collapsing.";
const char kFullscreenSmoothScrollingName[] = "Fullscreen Smooth Scrolling"; const char kFullscreenSmoothScrollingName[] = "Fullscreen Smooth Scrolling";
const char kFullscreenSmoothScrollingDescription[] = const char kFullscreenSmoothScrollingDescription[] =
"When enabled, the web view's insets are updated for scoll events. If " "When enabled, the web view's insets are updated for scoll events. If "
......
...@@ -167,6 +167,10 @@ extern const char kEnableSyncUSSNigoriDescription[]; ...@@ -167,6 +167,10 @@ extern const char kEnableSyncUSSNigoriDescription[];
extern const char kFindInPageiFrameName[]; extern const char kFindInPageiFrameName[];
extern const char kFindInPageiFrameDescription[]; extern const char kFindInPageiFrameDescription[];
// Title and description for the flag to force an unstacked tabstrip.
extern const char kForceUnstackedTabstripName[];
extern const char kForceUnstackedTabstripDescription[];
// Title and description for the command line switch used to determine the // Title and description for the command line switch used to determine the
// active fullscreen viewport adjustment mode. // active fullscreen viewport adjustment mode.
extern const char kFullscreenSmoothScrollingName[]; extern const char kFullscreenSmoothScrollingName[];
......
...@@ -45,6 +45,7 @@ source_set("tabs") { ...@@ -45,6 +45,7 @@ source_set("tabs") {
"//ios/chrome/browser/browser_state", "//ios/chrome/browser/browser_state",
"//ios/chrome/browser/drag_and_drop", "//ios/chrome/browser/drag_and_drop",
"//ios/chrome/browser/snapshots", "//ios/chrome/browser/snapshots",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/bubble", "//ios/chrome/browser/ui/bubble",
"//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/colors",
"//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/commands",
......
...@@ -33,3 +33,9 @@ const base::Feature kEmbedderBlockRestoreUrl{"EmbedderBlockRestoreUrl", ...@@ -33,3 +33,9 @@ const base::Feature kEmbedderBlockRestoreUrl{"EmbedderBlockRestoreUrl",
const base::Feature kDisableAnimationOnLowBattery{ const base::Feature kDisableAnimationOnLowBattery{
"DisableAnimationOnLowBattery", base::FEATURE_DISABLED_BY_DEFAULT}; "DisableAnimationOnLowBattery", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kVoiceOverUnstackedTabstrip{
"VoiceOverUnstackedTabstrip", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kForceUnstackedTabstrip{"ForceUnstackedTabstrip",
base::FEATURE_DISABLED_BY_DEFAULT};
...@@ -37,4 +37,10 @@ extern const base::Feature kEmbedderBlockRestoreUrl; ...@@ -37,4 +37,10 @@ extern const base::Feature kEmbedderBlockRestoreUrl;
// Feature flag disabling animation on low battery. // Feature flag disabling animation on low battery.
extern const base::Feature kDisableAnimationOnLowBattery; extern const base::Feature kDisableAnimationOnLowBattery;
// Feature flag to use the unstacked tabstrip when voiceover is enabled.
extern const base::Feature kVoiceOverUnstackedTabstrip;
// Feature flag to always force an unstacked tabstrip.
extern const base::Feature kForceUnstackedTabstrip;
#endif // IOS_CHROME_BROWSER_UI_UI_FEATURE_FLAGS_H_ #endif // IOS_CHROME_BROWSER_UI_UI_FEATURE_FLAGS_H_
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