thorium-mirror/other/thorium-2024-ui.patch
2024-10-03 14:13:49 -05:00

1813 lines
94 KiB
Diff

diff --git a/chrome/browser/resources/downloads/item.html b/chrome/browser/resources/downloads/item.html
index eb515155212c9..1bc09f08c8717 100644
--- a/chrome/browser/resources/downloads/item.html
+++ b/chrome/browser/resources/downloads/item.html
@@ -427,6 +427,14 @@
--></div>
</div>
<div class="more-options">
+ <div role="gridcell">
+ <cr-icon-button class="icon-clear"
+ style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]"
+ id="remove-old" title="$i18n{controlDeleteFromHistory}"
+ aria-label$="$i18n{controlDeleteFromHistory}"
+ on-click="onRemoveClick_" focus-row-control focus-type="remove">
+ </cr-icon-button>
+ </div>
<!-- Menu and/or quick action(s). -->
<div role="gridcell" id="action-icon-buttons">
<cr-icon-button id="more-actions" iron-icon="cr:more-vert"
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 916e1c043f3e5..9bc0ea94e459a 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -95,17 +95,6 @@ enum NewTabURLState {
NEW_TAB_URL_MAX
};
-const TemplateURL* GetDefaultSearchProviderTemplateURL(Profile* profile) {
- if (profile) {
- TemplateURLService* template_url_service =
- TemplateURLServiceFactory::GetForProfile(profile);
- if (template_url_service) {
- return template_url_service->GetDefaultSearchProvider();
- }
- }
- return nullptr;
-}
-
bool IsMatchingServiceWorker(const GURL& my_url, const GURL& document_url) {
// The origin should match.
if (!MatchesOrigin(my_url, document_url)) {
@@ -142,21 +131,6 @@ bool IsNTPOrRelatedURLHelper(const GURL& url, Profile* profile) {
IsMatchingServiceWorker(url, new_tab_url));
}
-bool IsURLAllowedForSupervisedUser(const GURL& url, Profile& profile) {
- if (!supervised_user::IsSubjectToParentalControls(*profile.GetPrefs())) {
- return true;
- }
- supervised_user::SupervisedUserService* supervised_user_service =
- SupervisedUserServiceFactory::GetForProfile(&profile);
- supervised_user::SupervisedUserURLFilter* url_filter =
- supervised_user_service->GetURLFilter();
- if (url_filter->GetFilteringBehaviorForURL(url) ==
- supervised_user::FilteringBehavior::kBlock) {
- return false;
- }
- return true;
-}
-
// Used to look up the URL to use for the New Tab page. Also tracks how we
// arrived at that URL so it can be logged with UMA.
struct NewTabURLDetails {
@@ -179,33 +153,9 @@ struct NewTabURLDetails {
const GURL local_url(default_is_google
? chrome::kChromeUINewTabPageURL
: chrome::kChromeUINewTabPageThirdPartyURL);
- if (default_is_google) {
- return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
- }
#endif
- const TemplateURL* template_url =
- GetDefaultSearchProviderTemplateURL(profile);
- if (!profile || !template_url) {
- return NewTabURLDetails(local_url, NEW_TAB_URL_BAD);
- }
-
- GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms(
- TemplateURLRef::SearchTermsArgs(std::u16string()),
- UIThreadSearchTermsData()));
-
- if (!search_provider_url.is_valid()) {
- return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET);
- }
- if (!search_provider_url.SchemeIsCryptographic()) {
- return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE);
- }
- if (!IsURLAllowedForSupervisedUser(search_provider_url,
- CHECK_DEREF(profile))) {
- return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED);
- }
-
- return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID);
+ return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
}
const GURL url;
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index e7858be996ca8..c0b2695b6e00b 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -318,8 +318,35 @@ ui::ImageModel GetBookmarkFolderIcon(
absl::variant<ui::ColorId, SkColor> color,
const ui::ColorProvider* color_provider) {
gfx::ImageSkia folder;
- folder =
- GetBookmarkFolderImageFromVectorIcon(icon_type, color, color_provider);
+ if (features::IsThorium2024()) {
+#if BUILDFLAG(IS_WIN)
+ // TODO(bsep): vectorize the Windows versions: crbug.com/564112
+ folder = *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ default_id);
+#elif BUILDFLAG(IS_MAC)
+ SkColor sk_color;
+ if (absl::holds_alternative<SkColor>(color)) {
+ sk_color = absl::get<SkColor>(color);
+ } else {
+ DCHECK(color_provider);
+ sk_color = color_provider->GetColor(absl::get<ui::ColorId>(color));
+ }
+ const int white_id = (icon_type == BookmarkFolderIconType::kNormal)
+ ? IDR_FOLDER_CLOSED_WHITE
+ : IDR_BOOKMARK_BAR_FOLDER_MANAGED_WHITE;
+ const int resource_id =
+ color_utils::IsDark(sk_color) ? default_id : white_id;
+ folder = *ui::ResourceBundle::GetSharedInstance()
+ .GetNativeImageNamed(resource_id)
+ .ToImageSkia();
+#else
+ folder = GetBookmarkFolderImageFromVectorIcon(icon_type, color,
+ color_provider);
+#endif
+ } else {
+ folder =
+ GetBookmarkFolderImageFromVectorIcon(icon_type, color, color_provider);
+ }
return gfx::ImageSkia(std::make_unique<RTLFlipSource>(folder),
folder.size());
};
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc b/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc
index 64948595a4bc6..a568c893736ca 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc
@@ -47,7 +47,7 @@ using bookmarks::BookmarkNode;
namespace chrome {
-size_t kNumBookmarkUrlsBeforePrompting = 15;
+size_t kNumBookmarkUrlsBeforePrompting = 50;
static BookmarkNavigationWrapper* g_nav_wrapper_test_instance = nullptr;
diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
index 71f9d6ad07da0..246532a09797a 100644
--- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
+++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
@@ -133,10 +133,6 @@ std::optional<size_t> RecentlyUsedFoldersComboModel::GetDefaultIndex() const {
// TODO(pbos): Look at returning -1 here if there's no default index. Right
// now a lot of code in Combobox assumes an index within `items_` bounds.
auto it = base::ranges::find(items_, Item(parent_node_, Item::TYPE_NODE));
- if (it == items_.end()) {
- it = base::ranges::find(items_,
- Item(parent_node_, Item::TYPE_ALL_BOOKMARKS_NODE));
- }
return it == items_.end() ? 0 : static_cast<int>(it - items_.begin());
}
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 8837e8baf3025..1d95a1a3ddf46 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1433,7 +1433,8 @@ void BrowserCommandController::InitCommandState() {
command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
normal_window);
- const bool enable_tab_search_commands = browser_->is_type_normal();
+ const bool enable_tab_search_commands = browser_->is_type_normal() &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button");
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH,
enable_tab_search_commands);
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
diff --git a/chrome/browser/ui/layout_constants.cc b/chrome/browser/ui/layout_constants.cc
index ea5c2c05f5fa9..5db2dac1b2fa2 100644
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -7,6 +7,7 @@
#include "base/feature_list.h"
#include "base/notreached.h"
#include "build/build_config.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "chrome/browser/ui/tabs/features.h"
#include "chrome/browser/ui/ui_features.h"
#include "components/omnibox/common/omnibox_features.h"
@@ -22,20 +23,25 @@ int GetLayoutConstant(LayoutConstant constant) {
const bool touch_ui = ui::TouchUiController::Get()->touch_ui();
switch (constant) {
case APP_MENU_PROFILE_ROW_AVATAR_ICON_SIZE:
- return 24;
+ return features::IsThorium2024() ? 18 : 24;
case APP_MENU_MAXIMUM_CHARACTER_LENGTH:
return 30;
case BOOKMARK_BAR_HEIGHT: {
// The fixed margin ensures the bookmark buttons appear centered relative
// to the white space above and below.
- const int bookmark_bar_attached_vertical_margin = 6;
+ const int bookmark_bar_attached_vertical_margin = features::IsThorium2024() ? 3 : 6;
return GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT) +
bookmark_bar_attached_vertical_margin;
}
- case BOOKMARK_BAR_BUTTON_HEIGHT:
- return touch_ui ? 36 : 28;
+ case BOOKMARK_BAR_BUTTON_HEIGHT: {
+ if (features::IsThorium2024()) {
+ return touch_ui ? 34 : 26;
+ } else {
+ return touch_ui ? 36 : 28;
+ }
+ }
case BOOKMARK_BAR_BUTTON_PADDING:
- return GetLayoutConstant(TOOLBAR_ELEMENT_PADDING);
+ return features::IsThorium2024() ? 2 : GetLayoutConstant(TOOLBAR_ELEMENT_PADDING);
case BOOKMARK_BAR_BUTTON_IMAGE_LABEL_PADDING:
return 6;
case WEB_APP_MENU_BUTTON_SIZE:
@@ -85,6 +91,8 @@ int GetLayoutConstant(LayoutConstant constant) {
return 16;
case TAB_ALERT_INDICATOR_ICON_WIDTH:
return touch_ui ? 12 : 16;
+ case TAB_BUTTON_OFFSET:
+ return features::IsThorium2024() ? -1 : 0;
case TAB_CLOSE_BUTTON_SIZE:
return touch_ui ? 24 : 16;
case TAB_HEIGHT:
@@ -93,7 +101,13 @@ int GetLayoutConstant(LayoutConstant constant) {
return GetLayoutConstant(TAB_HEIGHT) +
GetLayoutConstant(TAB_STRIP_PADDING);
case TAB_STRIP_PADDING:
- return 6;
+ return features::IsThorium2024() ? 0 : 6;
+ case TAB_MARGIN:
+ return features::IsThorium2024() ? 6 : 6;
+ case TAB_INACTIVE_PADDING:
+ return features::IsThorium2024() ? 3 : 6;
+ case TAB_SEARCH_PADDING:
+ return features::IsThorium2024() ? 3 : 6;
case TAB_SEPARATOR_HEIGHT:
return touch_ui ? 24 : 20;
case TAB_PRE_TITLE_PADDING:
@@ -112,9 +126,13 @@ int GetLayoutConstant(LayoutConstant constant) {
case TOOLBAR_DIVIDER_CORNER_RADIUS:
return 1;
case TOOLBAR_DIVIDER_HEIGHT:
- return touch_ui ? 20 : 16;
+ if (features::IsThorium2024()) {
+ return 18;
+ } else {
+ return touch_ui ? 20 : 16;
+ }
case TOOLBAR_DIVIDER_SPACING:
- return 9;
+ return features::IsThorium2024() ? 6 : 9;
case TOOLBAR_DIVIDER_WIDTH:
return 2;
case TOOLBAR_ELEMENT_PADDING:
@@ -122,13 +140,17 @@ int GetLayoutConstant(LayoutConstant constant) {
case TOOLBAR_ICON_DEFAULT_MARGIN:
return touch_ui ? 0 : 2;
case TOOLBAR_STANDARD_SPACING:
- return touch_ui ? 12 : 9;
+ if (features::IsThorium2024()) {
+ return touch_ui ? 12 : 6;
+ } else {
+ return touch_ui ? 12 : 9;
+ }
case PAGE_INFO_ICON_SIZE:
return 20;
case DOWNLOAD_ICON_SIZE:
return 20;
case TOOLBAR_CORNER_RADIUS:
- return 8;
+ return 0;
default:
break;
}
@@ -146,7 +168,11 @@ gfx::Insets GetLayoutInsets(LayoutInset inset) {
return gfx::Insets::VH(8, 20);
case LOCATION_BAR_ICON_INTERIOR_PADDING:
- return gfx::Insets::VH(2, 2);
+ if (features::IsThorium2024()) {
+ return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(4, 8);
+ } else {
+ return gfx::Insets::VH(2, 2);
+ }
case LOCATION_BAR_PAGE_INFO_ICON_PADDING:
return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(4, 4);
@@ -161,7 +187,8 @@ gfx::Insets GetLayoutInsets(LayoutInset inset) {
}
case TOOLBAR_BUTTON:
- return gfx::Insets(touch_ui ? 12 : 7);
+ return gfx::Insets(touch_ui ? 12
+ : (features::IsThorium2024() ? 6 : 7));
case BROWSER_APP_MENU_CHIP_PADDING:
if (touch_ui) {
@@ -178,10 +205,18 @@ gfx::Insets GetLayoutInsets(LayoutInset inset) {
}
case TOOLBAR_INTERIOR_MARGIN:
- return touch_ui ? gfx::Insets() : gfx::Insets::VH(6, 5);
+ if (features::IsThorium2024()) {
+ return touch_ui ? gfx::Insets() : gfx::Insets::VH(4, 6);
+ } else {
+ return touch_ui ? gfx::Insets() : gfx::Insets::VH(6, 5);
+ }
case WEBUI_TAB_STRIP_TOOLBAR_INTERIOR_MARGIN:
- return gfx::Insets::VH(4, 0);
+ if (features::IsThorium2024()) {
+ return gfx::Insets::VH(4, 6);
+ } else {
+ return gfx::Insets::VH(4, 0);
+ }
}
NOTREACHED_IN_MIGRATION();
return gfx::Insets();
diff --git a/chrome/browser/ui/layout_constants.h b/chrome/browser/ui/layout_constants.h
index a35795ee8cc11..60577ba01a5fd 100644
--- a/chrome/browser/ui/layout_constants.h
+++ b/chrome/browser/ui/layout_constants.h
@@ -123,9 +123,21 @@ enum LayoutConstant {
// detached tab, and on all sides of the controls padding.
TAB_STRIP_PADDING,
+ // For the tab margins
+ TAB_MARGIN,
+
+ // For inactive tab padding
+ TAB_INACTIVE_PADDING,
+
// The height of a separator in the tabstrip.
TAB_SEPARATOR_HEIGHT,
+ // Padding for the tab search button
+ TAB_SEARCH_PADDING,
+
+ // Offset y for new tab button
+ TAB_BUTTON_OFFSET,
+
// Padding before the tab title.
TAB_PRE_TITLE_PADDING,
diff --git a/chrome/browser/ui/status_bubble.h b/chrome/browser/ui/status_bubble.h
index 74a00df155806..00945e93c0afa 100644
--- a/chrome/browser/ui/status_bubble.h
+++ b/chrome/browser/ui/status_bubble.h
@@ -18,7 +18,7 @@ class GURL;
class StatusBubble {
public:
// On hover, expand status bubble to fit long URL after this delay.
- static const int kExpandHoverDelayMS = 1600;
+ static const int kExpandHoverDelayMS = 0;
virtual ~StatusBubble() {}
diff --git a/chrome/browser/ui/tabs/tab_menu_model.cc b/chrome/browser/ui/tabs/tab_menu_model.cc
index d2aae6af7306b..da6152848c9e4 100644
--- a/chrome/browser/ui/tabs/tab_menu_model.cc
+++ b/chrome/browser/ui/tabs/tab_menu_model.cc
@@ -105,6 +105,10 @@ void TabMenuModel::Build(TabStripModel* tab_strip, int index) {
AddItemWithStringId(TabStripModel::CommandNewTabToRight,
base::i18n::IsRTL() ? IDS_TAB_CXMENU_NEWTABTOLEFT
: IDS_TAB_CXMENU_NEWTABTORIGHT);
+ AddItemWithStringId(TabStripModel::CommandNewTabToLeft,
+ base::i18n::IsRTL() ? IDS_TAB_CXMENU_NEWTABTORIGHT
+ : IDS_TAB_CXMENU_NEWTABTOLEFT);
+ //AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB);
if (tab_strip->delegate()->SupportsReadLater()) {
AddItem(
TabStripModel::CommandAddToReadLater,
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 89df9a7f7a805..d52782a295e31 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1296,6 +1296,7 @@ bool TabStripModel::IsContextMenuCommandEnabled(
ContextMenuCommand command_id) const {
DCHECK(command_id > CommandFirst && command_id < CommandLast);
switch (command_id) {
+ case CommandNewTabToLeft:
case CommandNewTabToRight:
case CommandCloseTab:
return true;
@@ -1397,6 +1398,16 @@ void TabStripModel::ExecuteContextMenuCommand(int context_index,
if (!ContainsIndex(context_index))
return;
switch (command_id) {
+
+ case CommandNewTabToLeft: {
+ base::RecordAction(UserMetricsAction("TabContextMenu_NewTab"));
+ UMA_HISTOGRAM_ENUMERATION("Tab.NewTab", NewTabTypes::NEW_TAB_CONTEXT_MENU,
+ NewTabTypes::NEW_TAB_ENUM_COUNT);
+ delegate()->AddTabAt(GURL(), context_index, true,
+ GetTabGroupForTab(context_index));
+ break;
+ }
+
case CommandNewTabToRight: {
base::RecordAction(UserMetricsAction("TabContextMenu_NewTab"));
UMA_HISTOGRAM_ENUMERATION("Tab.NewTab", NewTabTypes::NEW_TAB_CONTEXT_MENU,
diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h
index 7f2f57facf152..3638494eb0dbf 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.h
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -547,6 +547,7 @@ class TabStripModel : public TabGroupController {
// for entries in the 'Add to existing group' submenu.
enum ContextMenuCommand {
CommandFirst,
+ CommandNewTabToLeft,
CommandNewTabToRight,
CommandReload,
CommandDuplicate,
diff --git a/chrome/browser/ui/tabs/tab_style.cc b/chrome/browser/ui/tabs/tab_style.cc
index b32265fa04597..b278d70b78188 100644
--- a/chrome/browser/ui/tabs/tab_style.cc
+++ b/chrome/browser/ui/tabs/tab_style.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/features.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "chrome/browser/ui/ui_features.h"
#include "ui/base/ui_base_features.h"
#include "ui/color/color_provider.h"
@@ -16,13 +17,18 @@ namespace {
// Thickness in DIPs of the separator painted on the left and right edges of
// the tab.
+constexpr int kThoriumSeparatorThickness = 1;
constexpr int kChromeRefreshSeparatorThickness = 2;
+constexpr int kThoriumSeparatorHorizontalMargin = 1;
constexpr int kChromeRefreshSeparatorHorizontalMargin = 2;
// TODO (crbug.com/1451400): This constant should be in LayoutConstants.
+constexpr int kThoriumSeparatorHeight = 20;
constexpr int kChromeRefreshSeparatorHeight = 16;
// The padding from the top of the tab to the content area.
+constexpr int kThoriumTabVerticalPadding = 9;
constexpr int kChromeRefreshTabVerticalPadding = 6;
+constexpr int kThoriumTabHorizontalPadding = 6;
constexpr int kChromeRefreshTabHorizontalPadding = 8;
class ChromeRefresh2023TabStyle : public TabStyle {
@@ -54,8 +60,28 @@ class ChromeRefresh2023TabStyle : public TabStyle {
TabStyle::~TabStyle() = default;
int ChromeRefresh2023TabStyle::GetStandardWidth() const {
+
+ const std::string custom_tab_width = base::CommandLine::ForCurrentProcess()->
+ GetSwitchValueASCII("custom-tab-width");
+ int kTabWidthValue = 240;
+ if (custom_tab_width == "60") {
+ kTabWidthValue = 60;
+ } else if (custom_tab_width == "120") {
+ kTabWidthValue = 120;
+ } else if (custom_tab_width == "180") {
+ kTabWidthValue = 180;
+ } else if (custom_tab_width == "240") {
+ kTabWidthValue = 240;
+ } else if (custom_tab_width == "300") {
+ kTabWidthValue = 300;
+ } else if (custom_tab_width == "400") {
+ kTabWidthValue = 400;
+ } else {
+ kTabWidthValue = 240;
+ }
+
// The standard tab width is 240 DIP including both separators.
- constexpr int kTabWidth = 240;
+ const int kTabWidth = kTabWidthValue;
// The overlap includes one separator, so subtract it here.
return kTabWidth + GetTabOverlap() - GetSeparatorSize().width();
}
@@ -102,19 +128,42 @@ int ChromeRefresh2023TabStyle::GetMinimumInactiveWidth() const {
}
int ChromeRefresh2023TabStyle::GetTopCornerRadius() const {
- return 10;
+ static const bool rectangular_tabs =
+ base::CommandLine::ForCurrentProcess()->HasSwitch("rectangular-tabs");
+ if (features::IsThorium2024() && !rectangular_tabs) {
+ return 8;
+ } else if ((rectangular_tabs && features::IsThorium2024()) || (rectangular_tabs && !features::IsThorium2024())) {
+ return 3;
+ } else {
+ return 10;
+ }
}
int ChromeRefresh2023TabStyle::GetBottomCornerRadius() const {
- return 12;
+ static const bool rectangular_tabs =
+ base::CommandLine::ForCurrentProcess()->HasSwitch("rectangular-tabs");
+ if (features::IsThorium2024() && !rectangular_tabs) {
+ return 10;
+ } else if ((rectangular_tabs && features::IsThorium2024()) || (rectangular_tabs && !features::IsThorium2024())) {
+ return 3;
+ } else {
+ return 12;
+ }
}
int ChromeRefresh2023TabStyle::GetTabOverlap() const {
// The overlap removes the width and the margins of the separator.
- const float total_separator_width = GetSeparatorMargins().left() +
- GetSeparatorSize().width() +
- GetSeparatorMargins().right();
- return 2 * GetBottomCornerRadius() - total_separator_width;
+ if (features::IsThorium2024()) {
+ const float total_separator_width = GetSeparatorMargins().left() +
+ GetSeparatorSize().width() +
+ GetSeparatorMargins().right();
+ return 2 * GetBottomCornerRadius() - total_separator_width;
+ } else {
+ const float total_separator_width = GetSeparatorMargins().left() +
+ GetSeparatorSize().width() +
+ GetSeparatorMargins().right();
+ return 2 * GetBottomCornerRadius() - total_separator_width;
+ }
}
gfx::Size ChromeRefresh2023TabStyle::GetPreviewImageSize() const {
@@ -124,23 +173,43 @@ gfx::Size ChromeRefresh2023TabStyle::GetPreviewImageSize() const {
}
gfx::Size ChromeRefresh2023TabStyle::GetSeparatorSize() const {
- return gfx::Size(kChromeRefreshSeparatorThickness,
- kChromeRefreshSeparatorHeight);
+ if (features::IsThorium2024()) {
+ return gfx::Size(kThoriumSeparatorThickness,
+ kThoriumSeparatorHeight);
+ } else {
+ return gfx::Size(kChromeRefreshSeparatorThickness,
+ kChromeRefreshSeparatorHeight);
+ }
}
gfx::Insets ChromeRefresh2023TabStyle::GetSeparatorMargins() const {
- return gfx::Insets::TLBR(GetLayoutConstant(TAB_STRIP_PADDING),
- kChromeRefreshSeparatorHorizontalMargin,
- GetLayoutConstant(TAB_STRIP_PADDING),
- kChromeRefreshSeparatorHorizontalMargin);
+ if (features::IsThorium2024()) {
+ return gfx::Insets::TLBR(GetLayoutConstant(TAB_INACTIVE_PADDING),
+ kThoriumSeparatorHorizontalMargin,
+ GetLayoutConstant(TAB_INACTIVE_PADDING),
+ kThoriumSeparatorHorizontalMargin);
+ } else {
+ return gfx::Insets::TLBR(GetLayoutConstant(TAB_STRIP_PADDING),
+ kChromeRefreshSeparatorHorizontalMargin,
+ GetLayoutConstant(TAB_STRIP_PADDING),
+ kChromeRefreshSeparatorHorizontalMargin);
+ }
}
int ChromeRefresh2023TabStyle::GetSeparatorCornerRadius() const {
- return GetSeparatorSize().width() / 2;
+ if (features::IsThorium2024()) {
+ return 0;
+ } else {
+ return GetSeparatorSize().width() / 2;
+ }
}
int ChromeRefresh2023TabStyle::GetDragHandleExtension(int height) const {
- return 6;
+ if (features::IsThorium2024()) {
+ return (height - GetSeparatorSize().height()) / 2 - 1;
+ } else {
+ return 6;
+ }
}
SkColor ChromeRefresh2023TabStyle::GetTabBackgroundColor(
@@ -177,11 +246,19 @@ SkColor ChromeRefresh2023TabStyle::GetTabBackgroundColor(
}
gfx::Insets ChromeRefresh2023TabStyle::GetContentsInsets() const {
- return gfx::Insets::TLBR(
- kChromeRefreshTabVerticalPadding + GetLayoutConstant(TAB_STRIP_PADDING),
- GetBottomCornerRadius() + kChromeRefreshTabHorizontalPadding,
- kChromeRefreshTabVerticalPadding + GetLayoutConstant(TAB_STRIP_PADDING),
- GetBottomCornerRadius() + kChromeRefreshTabHorizontalPadding);
+ if (features::IsThorium2024()) {
+ return gfx::Insets::TLBR(
+ kThoriumTabVerticalPadding + GetLayoutConstant(TAB_STRIP_PADDING),
+ GetBottomCornerRadius() + kThoriumTabHorizontalPadding,
+ kThoriumTabVerticalPadding + GetLayoutConstant(TAB_STRIP_PADDING),
+ GetBottomCornerRadius() + kThoriumTabHorizontalPadding);
+ } else {
+ return gfx::Insets::TLBR(
+ kChromeRefreshTabVerticalPadding + GetLayoutConstant(TAB_STRIP_PADDING),
+ GetBottomCornerRadius() + kChromeRefreshTabHorizontalPadding,
+ kChromeRefreshTabVerticalPadding + GetLayoutConstant(TAB_STRIP_PADDING),
+ GetBottomCornerRadius() + kChromeRefreshTabHorizontalPadding);
+ }
}
float ChromeRefresh2023TabStyle::GetSelectedTabOpacity() const {
diff --git a/chrome/browser/ui/thorium_2024.h b/chrome/browser/ui/thorium_2024.h
new file mode 100644
index 0000000000000..de40b42fcc722
--- /dev/null
+++ b/chrome/browser/ui/thorium_2024.h
@@ -0,0 +1,14 @@
+// Copyright 2024 Alex313031
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_THORIUM_2024_UI_H_
+#define CHROME_BROWSER_UI_THORIUM_2024_UI_H_
+
+#include "base/command_line.h"
+#include "ui/base/ui_base_features.h"
+
+// Blanking out until moving file to //ui/base
+//static const bool thor24 = features::IsThorium2024();
+
+#endif // CHROME_BROWSER_UI_THORIUM_2024_UI_H_
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index fd011f8983a1d..8000a05951f9b 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -54,6 +54,7 @@
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_observer.h"
@@ -343,8 +344,8 @@ class BookmarkBarView::ButtonSeparatorView : public views::Separator {
public:
ButtonSeparatorView() {
- const int leading_padding = 8;
- const int trailing_padding = 8;
+ const int leading_padding = features::IsThorium2024() ? 4 : 8;
+ const int trailing_padding = features::IsThorium2024() ? 3 : 8;
separator_thickness_ = kBookmarkBarSeparatorThickness;
const gfx::Insets border_insets =
gfx::Insets::TLBR(0, leading_padding, 0, trailing_padding);
@@ -694,7 +695,7 @@ void BookmarkBarView::Layout(PassKey) {
}
int x = GetLeadingMargin();
- static constexpr int kBookmarkBarTrailingMargin = 8;
+ static const int kBookmarkBarTrailingMargin = features::IsThorium2024() ? 0 : 8;
int width = View::width() - x - kBookmarkBarTrailingMargin;
const int button_height = GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT);
diff --git a/chrome/browser/ui/views/chrome_layout_provider.cc b/chrome/browser/ui/views/chrome_layout_provider.cc
index 5291d09d2154f..c8cf8e0ad6037 100644
--- a/chrome/browser/ui/views/chrome_layout_provider.cc
+++ b/chrome/browser/ui/views/chrome_layout_provider.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/feature_list.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "components/omnibox/common/omnibox_features.h"
#include "ui/base/pointer/touch_ui_controller.h"
@@ -161,7 +162,7 @@ int ChromeLayoutProvider::GetDistanceMetric(int metric) const {
case DISTANCE_INFOBAR_HEIGHT:
// Spec says height of button should be 36dp, vertical padding on both
// top and bottom should be 8dp.
- return 36 + 2 * 8;
+ return features::IsThorium2024() ? 42 : 36 + 2 * 8;
case DISTANCE_PERMISSION_PROMPT_HORIZONTAL_ICON_LABEL_PADDING:
return 8;
case DISTANCE_RICH_HOVER_BUTTON_ICON_HORIZONTAL:
diff --git a/chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc b/chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc
index af21424e93618..7ab9cd6819469 100644
--- a/chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc
@@ -73,5 +73,5 @@ gfx::Insets BrowserFrameViewLayoutLinux::RestoredFrameEdgeInsets() const {
}
int BrowserFrameViewLayoutLinux::NonClientExtraTopThickness() const {
- return delegate_->IsTabStripVisible() ? 0 : kExtraTopBorder;
+ return (!features::IsThorium2024() && delegate_->IsTabStripVisible()) ? 0 : kExtraTopBorder;
}
diff --git a/chrome/browser/ui/views/frame/browser_frame_view_win.cc b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
index b57fb5baa52a7..4fc9467f16b6c 100644
--- a/chrome/browser/ui/views/frame/browser_frame_view_win.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
@@ -315,7 +315,9 @@ int BrowserFrameViewWin::NonClientHitTest(const gfx::Point& point) {
// pixels at the end of the top and bottom edges trigger diagonal resizing.
constexpr int kResizeCornerWidth = 16;
- const int top_border_thickness = GetLayoutConstant(TAB_STRIP_PADDING);
+ const int top_border_thickness = features::IsThorium2024()
+ ? GetLayoutConstant(TAB_INACTIVE_PADDING)
+ : FrameTopBorderThickness(false);
const int window_component = GetHTComponentForFrame(
point, gfx::Insets::TLBR(top_border_thickness, 0, 0, 0),
@@ -495,7 +497,7 @@ int BrowserFrameViewWin::FrameTopBorderThickness(bool restored) const {
// default. When maximized, the OS sizes the window such that the border
// extends beyond the screen edges. In that case, we must return the
// default value.
- const int kTopResizeFrameArea = 0;
+ const int kTopResizeFrameArea = features::IsThorium2024() ? 7 : 0;
return kTopResizeFrameArea;
}
@@ -555,6 +557,22 @@ int BrowserFrameViewWin::TopAreaHeight(bool restored) const {
return top;
}
+ // In maximized mode, we do not add any additional thickness to the grab
+ // handle above the tabs; just return the frame thickness.
+ if (maximized) {
+ return top;
+ }
+
+ // Besides the frame border, there's empty space atop the window in restored
+ // mode, to use to drag the window around.
+ constexpr int kNonClientRestoredExtraThickness = 6;
+ int thickness = kNonClientRestoredExtraThickness;
+ if (EverHasVisibleBackgroundTabShapes() && features::IsThorium2024()) {
+ thickness =
+ std::max(thickness, BrowserNonClientFrameView::kMinimumDragHeight);
+ return top + thickness;
+ }
+
// The tabstrip controls its own top padding.
return top;
}
@@ -803,17 +821,30 @@ void BrowserFrameViewWin::LayoutCaptionButtons() {
const gfx::Size preferred_size =
caption_button_container_->GetPreferredSize();
+ int height = preferred_size.height();
+ // We use the standard caption bar height when maximized in tablet mode, which
+ // is smaller than our preferred button size.
+ if (IsWebUITabStrip() && IsMaximized()) {
+ height = std::min(height, TitlebarMaximizedVisualHeight());
+ }
+ if (!browser_view()->GetWebAppFrameToolbarPreferredSize().IsEmpty()) {
+ height = IsMaximized() ? TitlebarMaximizedVisualHeight()
+ : TitlebarHeight(false) - WindowTopY();
+ }
const int system_caption_buttons_width =
ShouldBrowserCustomDrawTitlebar(browser_view())
? 0
: width() - frame()->GetMinimizeButtonOffset();
+ height = features::IsThorium2024() ? std::min(GetFrameHeight(), height)
+ : GetFrameHeight();
+
caption_button_container_->SetBounds(
CaptionButtonsOnLeadingEdge()
? system_caption_buttons_width
: width() - system_caption_buttons_width - preferred_size.width(),
- WindowTopY(), preferred_size.width(), GetFrameHeight());
+ WindowTopY(), preferred_size.width(), height);
}
void BrowserFrameViewWin::LayoutClientView() {
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos.cc
index 480b5be6b3f5e..de3c389d5bdf9 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_chromeos.cc
@@ -280,7 +280,11 @@ int BrowserNonClientFrameViewChromeOS::GetTopInset(bool restored) const {
}
if (browser_view()->GetTabStripVisible()) {
- return 0;
+ if (features::IsThorium2024()) {
+ return header_height - browser_view()->GetTabStripHeight();
+ } else {
+ return 0;
+ }
}
Browser* browser = browser_view()->browser();
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
index 263261b1c8204..93335609f27da 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
@@ -105,6 +105,8 @@ class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView,
const gfx::Rect& frame,
const gfx::Insets& caption_button_insets);
+ CGFloat FullscreenBackingBarHeight() const;
+
// Calculate the y offset the top UI needs to shift down due to showing the
// slide down menu bar at the very top in full screen.
int TopUIFullscreenYOffset() const;
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm
index 73592431e1d6c..e55efc19bfd88 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm
@@ -50,6 +50,8 @@ namespace {
// Keep in sync with web_app_frame_toolbar_browsertest.cc
constexpr double kTitlePaddingWidthFraction = 0.1;
+constexpr int kResizeHandleHeight = 1;
+
// Empirical measurements of the traffic lights.
constexpr int kCaptionButtonsWidth = 52;
constexpr int kCaptionButtonsInsetsCatalinaOrOlder = 70;
@@ -225,7 +227,46 @@ void BrowserNonClientFrameViewMac::LayoutWebAppWindowTitle(
}
int BrowserNonClientFrameViewMac::GetTopInset(bool restored) const {
- return 0;
+ if (features::IsThorium2024()) {
+ if (!browser_view()->ShouldDrawTabStrip()) {
+ return 0;
+ }
+
+ // Mac seems to reserve 1 DIP of the top inset as a resize handle.
+ const int kTabstripTopInset = 8;
+ int top_inset = kTabstripTopInset;
+ if (EverHasVisibleBackgroundTabShapes()) {
+ top_inset =
+ std::max(top_inset, BrowserNonClientFrameView::kMinimumDragHeight +
+ kResizeHandleHeight);
+ }
+
+ // Immersive fullscreen attaches the tab strip to the title bar, no need to
+ // calculate the y_offset below.
+ if (browser_view()->UsesImmersiveFullscreenMode()) {
+ return top_inset;
+ }
+
+ // Calculate the y offset for the tab strip because in fullscreen mode the tab
+ // strip may need to move under the slide down menu bar.
+ CGFloat y_offset = TopUIFullscreenYOffset();
+ if (y_offset > 0) {
+ // When menubar shows up, we need to update mouse tracking area.
+ NSWindow* window = GetWidget()->GetNativeWindow().GetNativeNSWindow();
+ NSRect content_bounds = [[window contentView] bounds];
+ // Backing bar tracking area uses native coordinates.
+ CGFloat tracking_height =
+ FullscreenBackingBarHeight() + top_inset + y_offset;
+ NSRect backing_bar_area =
+ NSMakeRect(0, NSMaxY(content_bounds) - tracking_height,
+ NSWidth(content_bounds), tracking_height);
+ [fullscreen_toolbar_controller_ updateToolbarFrame:backing_bar_area];
+ }
+
+ return y_offset + top_inset;
+ } else {
+ return 0;
+ }
}
void BrowserNonClientFrameViewMac::UpdateFullscreenTopUI() {
@@ -488,6 +529,21 @@ void BrowserNonClientFrameViewMac::PaintThemedFrame(gfx::Canvas* canvas) {
canvas->DrawImageInt(overlay, 0, 0);
}
+CGFloat BrowserNonClientFrameViewMac::FullscreenBackingBarHeight() const {
+ BrowserView* browser_view = this->browser_view();
+ DCHECK(browser_view->IsFullscreen());
+
+ CGFloat total_height = 0;
+ if (browser_view->ShouldDrawTabStrip()) {
+ total_height += browser_view->GetTabStripHeight();
+ }
+
+ if (browser_view->IsToolbarVisible())
+ total_height += browser_view->toolbar()->bounds().height();
+
+ return total_height;
+}
+
int BrowserNonClientFrameViewMac::TopUIFullscreenYOffset() const {
if (!browser_view()->GetTabStripVisible() ||
!browser_view()->IsFullscreen() ||
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index ba129325c8700..fbfa68c2e71b1 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -254,7 +254,9 @@ void OpaqueBrowserFrameView::LayoutWebAppWindowTitle(
}
int OpaqueBrowserFrameView::GetTopInset(bool restored) const {
- return layout_->NonClientTopHeight(restored);
+ return browser_view()->ShouldDrawTabStrip()
+ ? layout_->GetTabStripInsetsTop(restored)
+ : layout_->NonClientTopHeight(restored);
}
void OpaqueBrowserFrameView::UpdateThrobber(bool running) {
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
index 67b69d18a802e..f2189d01b206f 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
@@ -78,7 +78,7 @@ gfx::Rect OpaqueBrowserFrameViewLayout::GetBoundsForTabStripRegion(
int total_width) const {
const int x = available_space_leading_x_;
const int available_width = available_space_trailing_x_ - x;
- return gfx::Rect(x, NonClientTopHeight(false), std::max(0, available_width),
+ return gfx::Rect(x, GetTabStripInsetsTop(false), std::max(0, available_width),
tabstrip_minimum_size.height());
}
@@ -181,6 +181,15 @@ int OpaqueBrowserFrameViewLayout::NonClientTopHeight(bool restored) const {
kContentEdgeShadowThickness;
}
+int OpaqueBrowserFrameViewLayout::GetTabStripInsetsTop(bool restored) const {
+ const int top = NonClientTopHeight(restored);
+ const bool start_at_top_of_frame = !restored &&
+ delegate_->IsFrameCondensed() &&
+ features::IsThorium2024();
+ return start_at_top_of_frame ? top
+ : (top + GetNonClientRestoredExtraThickness());
+}
+
gfx::Insets OpaqueBrowserFrameViewLayout::FrameEdgeInsets(bool restored) const {
return IsFrameEdgeVisible(restored) ? RestoredFrameEdgeInsets()
: gfx::Insets();
@@ -190,7 +199,12 @@ int OpaqueBrowserFrameViewLayout::DefaultCaptionButtonY(bool restored) const {
// Maximized buttons start at window top, since the window has no border. This
// offset is for the image (the actual clickable bounds extend all the way to
// the top to take Fitts' Law into account).
- return views::NonClientFrameView::kFrameShadowThickness;
+ const bool start_at_top_of_frame = !restored &&
+ delegate_->IsFrameCondensed() &&
+ features::IsThorium2024();
+ return start_at_top_of_frame
+ ? FrameBorderInsets(false).top()
+ : views::NonClientFrameView::kFrameShadowThickness;
}
int OpaqueBrowserFrameViewLayout::CaptionButtonY(views::FrameButton button_id,
@@ -236,6 +250,21 @@ int OpaqueBrowserFrameViewLayout::GetWindowCaptionSpacing(
return 0;
}
+int OpaqueBrowserFrameViewLayout::GetNonClientRestoredExtraThickness() const {
+ // In Refresh, the tabstrip controls its own top padding.
+ if (!features::IsThorium2024()) {
+ return 0;
+ }
+ // Besides the frame border, there's empty space atop the window in restored
+ // mode, to use to drag the window around.
+ int thickness = 6;
+ if (delegate_->EverHasVisibleBackgroundTabShapes()) {
+ thickness =
+ std::max(thickness, BrowserNonClientFrameView::kMinimumDragHeight);
+ }
+ return thickness;
+}
+
void OpaqueBrowserFrameViewLayout::SetWindowControlsOverlayEnabled(
bool enabled,
views::View* host) {
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h
index 707226e0e8c70..5e1a2b4dd9921 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h
@@ -89,6 +89,8 @@ class OpaqueBrowserFrameViewLayout : public views::LayoutManager {
// if the window was restored, regardless of its current state.
int NonClientTopHeight(bool restored) const;
+ int GetTabStripInsetsTop(bool restored) const;
+
// Returns the y-coordinate of the caption button when native frame buttons
// are disabled. If |restored| is true, acts as if the window is restored
// regardless of the real mode.
@@ -125,6 +127,9 @@ class OpaqueBrowserFrameViewLayout : public views::LayoutManager {
const gfx::Rect& client_view_bounds() const { return client_view_bounds_; }
+ // Returns the extra thickness of the area above the tabs.
+ int GetNonClientRestoredExtraThickness() const;
+
// Enables or disables WCO and updates child views accordingly.
void SetWindowControlsOverlayEnabled(bool enabled, views::View* host);
diff --git a/chrome/browser/ui/views/frame/tab_strip_region_view.cc b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
index 17cbbb1eb7f63..9bc158f2087b8 100644
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -112,7 +112,8 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip)
// Add and configure the TabSearchContainer.
std::unique_ptr<TabSearchContainer> tab_search_container;
- if (browser && browser->is_type_normal()) {
+ if (browser && browser->is_type_normal() &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button")) {
tab_search_container = std::make_unique<TabSearchContainer>(
tab_strip_->controller(), browser->tab_strip_model(),
render_tab_search_before_tab_strip_, this);
@@ -201,12 +202,10 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip)
// TODO(crbug.com/40118868): Revisit the macro expression once build flag
// switch of lacros-chrome is complete.
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
// The New Tab Button can be middle-clicked on Linux.
new_tab_button_->SetTriggerableEventFlags(
new_tab_button_->GetTriggerableEventFlags() |
ui::EF_MIDDLE_MOUSE_BUTTON);
-#endif
}
reserved_grab_handle_space_ =
@@ -227,7 +226,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip)
tab_search_container_ = AddChildView(std::move(tab_search_container));
tab_search_container_->SetProperty(
views::kMarginsKey,
- gfx::Insets::TLBR(0, 0, 0, GetLayoutConstant(TAB_STRIP_PADDING)));
+ gfx::Insets::TLBR(0, 0, 0, GetLayoutConstant(TAB_SEARCH_PADDING)));
}
UpdateTabStripMargin();
@@ -356,7 +355,8 @@ void TabStripRegionView::Layout(PassKey) {
int product_specifications_button_width =
product_specifications_button_
? product_specifications_button_->GetPreferredSize().width()
- : 0;
+ : features::IsThorium2024() ? GetLayoutConstant(TAB_SEARCH_PADDING)
+ : 0;
AdjustViewBoundsRect(tab_search_container_,
product_specifications_button_width);
}
@@ -371,8 +371,8 @@ void TabStripRegionView::Layout(PassKey) {
gfx::Point new_tab_button_new_position =
gfx::Point(tab_strip_container_->bounds().right() -
TabStyle::Get()->GetBottomCornerRadius() +
- GetLayoutConstant(TAB_STRIP_PADDING),
- 0);
+ GetLayoutConstant(TAB_MARGIN),
+ 0);
gfx::Rect new_tab_button_new_bounds =
gfx::Rect(new_tab_button_new_position, new_tab_button_size);
@@ -504,7 +504,7 @@ void TabStripRegionView::UpdateTabStripMargin() {
new_tab_button_->SetProperty(views::kViewIgnoredByLayoutKey, true);
tab_strip_right_margin = new_tab_button_->GetPreferredSize().width() +
- GetLayoutConstant(TAB_STRIP_PADDING);
+ GetLayoutConstant(TAB_MARGIN);
}
// If the tab search button is before the tab strip, it also overlaps the
@@ -530,8 +530,8 @@ void TabStripRegionView::UpdateTabStripMargin() {
// should have 6 px of padding between it and the tab_search button (not
// including the corner radius).
tab_strip_left_margin = tab_strip_left_margin.value() +
- GetLayoutConstant(TAB_STRIP_PADDING) +
- GetLayoutConstant(TAB_STRIP_PADDING) -
+ GetLayoutConstant(TAB_INACTIVE_PADDING) +
+ GetLayoutConstant(TAB_INACTIVE_PADDING) -
TabStyle::Get()->GetBottomCornerRadius();
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 8ad0bd147a4c2..017a8d3422806 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -209,7 +209,10 @@ LocationBarView::LocationBarView(Browser* browser,
!v->GetOmniboxPopupView()->IsOpen();
}));
views::FocusRing::Get(this)->SetOutsetFocusRingDisabled(true);
- views::InstallPillHighlightPathGenerator(this);
+ static const bool classic_omnibox = base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox");
+ if (!classic_omnibox) {
+ views::InstallPillHighlightPathGenerator(this);
+ }
#if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED)
if (features::IsOsLevelGeolocationPermissionSupportEnabled()) {
@@ -436,8 +439,13 @@ bool LocationBarView::IsInitialized() const {
}
int LocationBarView::GetBorderRadius() const {
- return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
- views::Emphasis::kMaximum, size());
+ static const bool classic_omnibox = base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox");
+ if (classic_omnibox) {
+ return 4;
+ } else {
+ return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
+ views::Emphasis::kMaximum, size());
+ }
}
std::unique_ptr<views::Background> LocationBarView::CreateRoundRectBackground(
@@ -1158,6 +1166,12 @@ void LocationBarView::RefreshBackground() {
}
SkColor border_color = SK_ColorTRANSPARENT;
+
+ static const bool classic_omnibox = base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox");
+ if (classic_omnibox && !is_caret_visible) {
+ border_color = color_provider->GetColor(kColorLocationBarBorderOnMismatch);
+ }
+
if (high_contrast) {
// High contrast schemes get a border stroke even on a rounded omnibox.
border_color =
diff --git a/chrome/browser/ui/views/side_panel/side_panel_resize_area.cc b/chrome/browser/ui/views/side_panel/side_panel_resize_area.cc
index 2ca8611118a21..e360e3afcdc9f 100644
--- a/chrome/browser/ui/views/side_panel/side_panel_resize_area.cc
+++ b/chrome/browser/ui/views/side_panel/side_panel_resize_area.cc
@@ -12,6 +12,7 @@
#include "ui/accessibility/mojom/ax_node_data.mojom.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
+#include "ui/base/ui_base_features.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/geometry/size.h"
@@ -32,7 +33,7 @@ SidePanelResizeHandle::SidePanelResizeHandle(SidePanel* side_panel)
SetCanProcessEventsWithinSubtree(false);
SetFocusBehavior(FocusBehavior::ALWAYS);
FocusRing::Install(this);
- if (lens::features::IsLensOverlayEnabled()) {
+ if (lens::features::IsLensOverlayEnabled() && !features::IsThorium2024()) {
const int resize_handle_left_margin = 2;
SetProperty(views::kMarginsKey,
gfx::Insets().set_left(resize_handle_left_margin));
diff --git a/chrome/browser/ui/views/tab_search_bubble_host.cc b/chrome/browser/ui/views/tab_search_bubble_host.cc
index fa14797259775..6031b27d539e6 100644
--- a/chrome/browser/ui/views/tab_search_bubble_host.cc
+++ b/chrome/browser/ui/views/tab_search_bubble_host.cc
@@ -202,7 +202,7 @@ bool TabSearchBubbleHost::ShowTabSearchBubble(
// Place the anchor similar to where the button would be in non-fullscreen
// mode.
const gfx::Rect bounds = button_->GetWidget()->GetWorkAreaBoundsInScreen();
- const int offset = GetLayoutConstant(TAB_STRIP_PADDING);
+ const int offset = GetLayoutConstant(TAB_INACTIVE_PADDING);
const int x = tabs::GetTabSearchTrailingTabstrip(profile_)
? bounds.right() - offset
diff --git a/chrome/browser/ui/views/tabs/tab_style_views.cc b/chrome/browser/ui/views/tabs/tab_style_views.cc
index 65676013fece9..476f9ae26f17e 100644
--- a/chrome/browser/ui/views/tabs/tab_style_views.cc
+++ b/chrome/browser/ui/views/tabs/tab_style_views.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/tab_style.h"
#include "chrome/browser/ui/tabs/tab_types.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/top_container_background.h"
@@ -254,7 +255,8 @@ SkPath TabStyleViewsImpl::GetPath(TabStyle::PathType path_type,
// this. Detached tab shapes do not need to respect this.
if (path_type != TabStyle::PathType::kInteriorClip &&
path_type != TabStyle::PathType::kHitTest) {
- tab_height -= GetLayoutConstant(TAB_STRIP_PADDING) * scale;
+ // Keep this in Thorium
+ tab_height -= GetLayoutConstant(TAB_MARGIN) * scale;
tab_height -= GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP) * scale;
}
@@ -264,8 +266,10 @@ SkPath TabStyleViewsImpl::GetPath(TabStyle::PathType path_type,
}
int left = aligned_bounds.x() + extension_corner_radius;
- int top = aligned_bounds.y() + GetLayoutConstant(TAB_STRIP_PADDING) * scale;
+ // Keep this in Thorium
+ int top = aligned_bounds.y() + GetLayoutConstant(TAB_INACTIVE_PADDING) * scale;
int right = aligned_bounds.right() - extension_corner_radius;
+ // Keep this in Thorium
const int bottom = top + tab_height;
// For maximized and full screen windows, extend the tab hit test to the top
@@ -273,7 +277,8 @@ SkPath TabStyleViewsImpl::GetPath(TabStyle::PathType path_type,
// tabs by moving the mouse to the top of the screen.
if (path_type == TabStyle::PathType::kHitTest &&
tab()->controller()->IsFrameCondensed()) {
- top -= GetLayoutConstant(TAB_STRIP_PADDING) * scale;
+ // Keep this in Thorium
+ top -= GetLayoutConstant(TAB_MARGIN) * scale;
// Don't round the top corners to avoid creating dead space between tabs.
top_content_corner_radius = 0;
}
@@ -308,6 +313,13 @@ SkPath TabStyleViewsImpl::GetPath(TabStyle::PathType path_type,
}
}
+ if (features::IsThorium2024()) {
+ const int Th24StrokeOffset = 1;
+ top -= Th24StrokeOffset;
+ // Experimental int
+ //bottom -= tab()->controller()->Th24StrokeOffset();
+ }
+
// Radii are clockwise from top left.
const SkVector radii[4] = {
SkVector(top_content_corner_radius, top_content_corner_radius),
@@ -753,6 +765,11 @@ float TabStyleViewsImpl::GetSeparatorOpacity(bool for_layout,
const Tab* const adjacent_tab =
tab()->controller()->GetAdjacentTab(tab(), leading ? -1 : 1);
+ // The separator should never appear at the end of the tab strip.
+ //if (!adjacent_tab && !leading) {
+ //return 1.0f;
+ //}
+
const Tab* const left_tab = leading ? adjacent_tab : tab();
const Tab* const right_tab = leading ? tab() : adjacent_tab;
const bool adjacent_to_header =
@@ -987,6 +1004,9 @@ void TabStyleViewsImpl::PaintTabBackgroundFill(
cc::PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(GetCurrentTabBackgroundColor(selection_state, hovered));
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("transparent-tabs") &&
+ selection_state != TabStyle::TabSelectionState::kActive)
+ flags.setAlphaf(0.7f);
canvas->DrawRect(gfx::ScaleToEnclosingRect(tab_->GetLocalBounds(), scale),
flags);
}
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 39e7681c0c708..c73c08f328607 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -56,6 +56,7 @@
#include "chrome/browser/ui/webui/signin_internals_ui.h"
#include "chrome/browser/ui/webui/suggest_internals/suggest_internals_ui.h"
#include "chrome/browser/ui/webui/sync_internals/sync_internals_ui.h"
+#include "chrome/browser/ui/webui/thorium_webui.h"
#include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h"
#include "chrome/browser/ui/webui/usb_internals/usb_internals_ui.h"
#include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
@@ -777,6 +778,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<privacy_sandbox_internals::PrivacySandboxInternalsUI>;
}
+ if (url.host_piece() == chrome::kChromeUIEggsHost) {
+ return &NewWebUI<ThoriumWebUILoad>;
+ }
+
return nullptr;
}
diff --git a/chrome/browser/ui/webui/thorium_webui.h b/chrome/browser/ui/webui/thorium_webui.h
new file mode 100644
index 0000000000000..23fe24f51e93e
--- /dev/null
+++ b/chrome/browser/ui/webui/thorium_webui.h
@@ -0,0 +1,78 @@
+// Copyright 2024 Alex313031
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THORIUM_WEBUI_H_
+#define THORIUM_WEBUI_H_
+
+#include "base/memory/ref_counted_memory.h"
+#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/url_data_source.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "services/network/public/mojom/content_security_policy.mojom.h"
+
+class ThoriumDataSource : public content::URLDataSource {
+ public:
+ ThoriumDataSource() {}
+ ThoriumDataSource(const ThoriumDataSource&) = delete;
+ ThoriumDataSource& operator=(const ThoriumDataSource&) = delete;
+ std::string GetSource() override;
+ std::string GetMimeType(const GURL& url) override;
+ std::string GetContentSecurityPolicy(network::mojom::CSPDirectiveName directive) override;
+ void StartDataRequest(const GURL& url,
+ const content::WebContents::Getter& wc_getter,
+ GotDataCallback callback) override;
+};
+
+std::string ThoriumDataSource::GetSource() { return "eggs"; }
+std::string ThoriumDataSource::GetMimeType(const GURL& url) { return "text/html"; }
+std::string ThoriumDataSource::GetContentSecurityPolicy(network::mojom::CSPDirectiveName directive) {
+ if (directive == network::mojom::CSPDirectiveName::ScriptSrc)
+ return "script-src 'unsafe-inline'";
+ return std::string();
+}
+void ThoriumDataSource::StartDataRequest(const GURL& url,
+ const content::WebContents::Getter& wc_getter,
+ GotDataCallback callback) {
+ std::string source = R"(
+ <html>
+ <head>
+ <title>Thorium Easter Eggs</title>
+ <meta name="color-scheme" content="light dark">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="shortcut icon" type="image/x-icon" href="data:image/x-icon;base64,AAABAAMAMDAAAAEAIACoJQAANgAAACAgAAABACAAqBAAAN4lAAAQEAAAAQAgAGgEAACGNgAAKAAAADAAAABgAAAAAQAgAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA86JoFvWcZlD1nGaE951mt/edZtP2nWbl9p1m9vrGpcT7zK7k+suu0/nLrrb5yq2D+cyvUP/RrhYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8JZpEfWeZ2b2nWe99p1m/PadZv/2nWb/9p1m//adZv/2nWb/9p1m//alc976y676+suu//rLrv/6y67/+suu//rLrvz6y6+7+sytZP/PrxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPKhaxP1nWaA9p1m7/adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/4v53A+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrvP5y66I/8aqEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/gIAC9p1ncvadZvP2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/4oGvw+squ7PrLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu8vrKr2///4ACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPifZyX2nWXE9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/+LWLwvrLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6yq7C+MyvIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA95xnQ/edZvD2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1n/frKrNn6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu8vvKrkgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3nWVg9p1m+vadZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//irfNL6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrvv6y69mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPecZlr2nWb+9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/6xaTH+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67++syuXwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA951mQfadZvn2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2pHDl+suu9/rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu+vvLrkUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4n2cl9p1m8vadZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/+L2XwPrLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrvH4zK8jAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+AgAL2nWbB9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/96Bp9fvKrej6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y63F/6qqAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPaeZnH2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//e0icT6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+sutcAAAAAAAAAAAAAAAAAAAAAAAAAAA8qFrE/adZvL2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/zm2TluXZNvlk6JsslFw/cEQoH9A4IBfQmGBDcWjomy7t3Tr7zm2Xm9p1m//adZ/76yKrU+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+sut9P/MsxQAAAAAAAAAAAAAAAAAAAAA9ZxmhPadZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9Jtl5H1QNLoFAwL7AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8FAwL9dksxxPObZej3qHfU+suu/frLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//nKr4IAAAAAAAAAAAAAAADwlmkR9Z1m8fadZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/Uh1jDDwkG8wAAAP8AAAD/EwkC/1ksCv+KRQ//olAS/6JQEv+JRA//WCwK/xMJAv8AAAD/AAAA/xALBvLWiVnD+sKhxPrLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrvD/z68QAAAAAAAAAAD1nGZn9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m/7d0TL8BAQD9AAAA/xcLA/+LRRD/5HEa/+hzGv/ocxr/6HMa/+hzGv/ocxr/6HMa/+RxGv+JRA//FgsC/wAAAP8CAQH9tntUvfrKrfL6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6zK1kAAAAAAAAAAD2nWe99p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/1olZwAEBAPwAAAD/NhsG/9NpGP/ocxr/6HMa/+hzGv/ocxr/6HMa/+hzGv/ocxr/6HMa/+hzGv/ocxr/1moY/zodB/8AAAD/AQEA/c6ghLf6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv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AAAAAAAAAAAAAAAAAAAAAAAAAAP+SbQf2nWbR9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/+Kt8z/rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suuz//VqgYAAAAAAAAAAAAAAAAAAAAA9ZxmhPadZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/+sSkyPrLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+cqvggAAAAAAAAAAAAAAAPecYx/2nWb69p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/75hi2o1aO74wHhTaCQYE8wcEA/MxHxXbjls7vu+ZY9v2o3Dj+suu9/rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6y67698evIAAAAAAAAAAA951ll/adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m+5JdPcUBAQD8CAQB/0UiCP9nMwz/ZzMM/0UiCP8IBAH/AgEB/IpYOb/3vJi++suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrv/6zK+VAAAAAP+ZZgr2nWb09p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m//adZvtTNCPOAQAA/2czDP/Zaxj/6HMa/+hzGv/ocxr/6HMa/9hrGP9kMgv/AQAA/1I3J836ya3o+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//rLrvL/xqoJ9pxmVfadZv/2nWb/9p1m//adZv/2nWb/9p1m//adZv/2nWb/kl09xQEAAP+UShH/6HMa/+hzGv/ocxr/6HMa/+hzGv/ocxr/6HMa/+hzGv+SSRD/AQAA/4ltWr76y67/+suu//rLrv/6y67/+suu//rLrv/6y67/+suu//nKrlL2nWeV9p1m//adZv/2nWb/9p1m//adZv/2nWb/9p1m/+uUXdcDAQH8ZzMM/+hzGv/ocxr/6HMa/+hzGv/ocxr/6HMa/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xr/6HMa/+hzGv/ocxr/6HMa/zEbDvT6y67/+suu//rLrv/6y67t9p1mzvadZv/fezS/0mcZ/1ktCsi9XhX/6HMa/+hzGv/ocxr/6HMa/71eFf9sWEvG+suu//rLrv/6y67/+suuzPadZozyll3n0mcZ9NJnGf/PZRjeMhkG8b5eFf/ocxr/6HMa/71eFf81Hw/x98ms5vrLrv/6y67/+suu//nMrov4oGYj2HAmxNJnGf/SZxn/0mcZ/85lGNxYLArHMBcG9TAbDPVmUkbI9Map3vrLrv/6y67/+suu//rLrv74zbEkAAAAANFoGozSZxn/0mcZ/9JnGf/SZxn/0mcZ/9JnGf/SZxn/0mcZ/9JnGf/SZxn/0mcZ/9JnGf/TZxqKAAAAAAAAAAC/gAAE0mgZu9JnGf/SZxn/0mcZ/9JnGf/SZxn/0mcZ/9JnGf/SZxn/0mcZ/9JnGf/SZxm5v4AABAAAAAAAAAAAAAAAAMxmAAXSZxmN0mcZ/tJnGf/SZxn/0mcZ/9JnGf/SZxn/0mcZ/9JnGf3RZxqLv4AABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9nHCXSZxmN0mcZzdJnGe7SZxnu0mcZzdJnGY3VahwkAAAAAAAAAAAAAAAAAAAAAPgfAADgBwAAwAMAAIABAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAIABAADAAwAA4AcAAPgfAAA=">
+ <style>
+ @import url(chrome://resources/css/text_defaults_md.css);
+ body { text-align: center; align-content: center; max-width: 75%; margin: auto;}
+ img { max-width: 75%; height: auto; }
+ </style>
+ </head>
+ <body>
+ <h2><u>Thorium Easter Eggs WebUI Page</u></h3>
+ <hr>
+ <p>
+ <img src="chrome://theme/IDR_PRODUCT_THORIUM_ELEMENT">
+ <hr>
+ <img src="chrome://theme/IDR_PRODUCT_THORIUM_ATOMIC">
+ <img src="chrome://theme/IDR_PRODUCT_CHROMIUM_QUESTION">
+ <img src="chrome://theme/IDR_PRODUCT_THORIUM_GUY">
+ <img src="chrome://theme/IDR_PRODUCT_CHROMIUM_BLANK">
+ <img src="chrome://theme/IDR_PRODUCT_AI_CHROME">
+ </p>
+ </body>
+ </html>
+ )";
+ std::move(callback).Run(base::MakeRefCounted<base::RefCountedString>(std::move(source)));
+}
+
+class ThoriumWebUILoad : public content::WebUIController {
+ public:
+ ThoriumWebUILoad(content::WebUI* web_ui) : content::WebUIController(web_ui) {
+ content::URLDataSource::Add(Profile::FromWebUI(web_ui), std::make_unique<ThoriumDataSource>());
+ }
+ ThoriumWebUILoad(const ThoriumWebUILoad&) = delete;
+ ThoriumWebUILoad& operator=(const ThoriumWebUILoad&) = delete;
+};
+
+#endif // THORIUM_WEBUI_H_
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc
index 248b6795e8cbe..488bade160e37 100644
--- a/chrome/common/webui_url_constants.cc
+++ b/chrome/common/webui_url_constants.cc
@@ -75,6 +75,7 @@ bool IsSystemWebUIHost(std::string_view host) {
// These hosts will also be suggested by BuiltinProvider.
base::span<const base::cstring_view> ChromeURLHosts() {
static constexpr auto kChromeURLHosts = std::to_array<base::cstring_view>({
+ kChromeUIEggsHost,
kChromeUIAboutHost,
kChromeUIAccessibilityHost,
#if !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h
index 70e366e816db5..a727ed4aa725f 100644
--- a/chrome/common/webui_url_constants.h
+++ b/chrome/common/webui_url_constants.h
@@ -31,6 +31,8 @@ namespace chrome {
// Not all components have corresponding URLs and vice versa. Only add as
// needed.
// Please keep in alphabetical order, with OS/feature specific sections below.
+inline constexpr char kChromeUIEggsHost[] = "eggs";
+inline constexpr char kChromeUIEggsURL[] = "chrome://eggs/";
inline constexpr char kChromeUIAboutHost[] = "about";
inline constexpr char kChromeUIAboutURL[] = "chrome://about/";
inline constexpr char kChromeUIAccessCodeCastHost[] = "access-code-cast";
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc
index ed801f34141da..bc24e8c7dfbe9 100644
--- a/ui/base/ui_base_features.cc
+++ b/ui/base/ui_base_features.cc
@@ -511,6 +511,14 @@ bool IsLacrosColorManagementEnabled() {
return base::FeatureList::IsEnabled(kLacrosColorManagement);
}
+BASE_FEATURE(kThorium2024,
+ "Thorium2024",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
+bool IsThorium2024() {
+ return base::FeatureList::IsEnabled(kThorium2024);
+}
+
BASE_FEATURE(kBubbleMetricsApi,
"BubbleMetricsApi",
base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h
index 2232cc983adbc..1a2888799934e 100644
--- a/ui/base/ui_base_features.h
+++ b/ui/base/ui_base_features.h
@@ -228,6 +228,10 @@ COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kLacrosColorManagement);
COMPONENT_EXPORT(UI_BASE_FEATURES)
bool IsLacrosColorManagementEnabled();
+// Used to revert some stupid UI decisions for Cr23
+COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kThorium2024);
+COMPONENT_EXPORT(UI_BASE_FEATURES) bool IsThorium2024();
+
COMPONENT_EXPORT(UI_BASE_FEATURES)
BASE_DECLARE_FEATURE(kBubbleMetricsApi);
diff --git a/ui/linux/linux_ui_factory.cc b/ui/linux/linux_ui_factory.cc
index d21456ab73faa..de14c868fcc26 100644
--- a/ui/linux/linux_ui_factory.cc
+++ b/ui/linux/linux_ui_factory.cc
@@ -175,7 +175,7 @@ SystemTheme GetDefaultSystemTheme() {
case base::nix::DESKTOP_ENVIRONMENT_PANTHEON:
case base::nix::DESKTOP_ENVIRONMENT_UNITY:
case base::nix::DESKTOP_ENVIRONMENT_XFCE:
- return SystemTheme::kGtk;
+ return SystemTheme::kDefault;
case base::nix::DESKTOP_ENVIRONMENT_KDE3:
case base::nix::DESKTOP_ENVIRONMENT_KDE4:
case base::nix::DESKTOP_ENVIRONMENT_KDE5:
@@ -183,7 +183,7 @@ SystemTheme GetDefaultSystemTheme() {
case base::nix::DESKTOP_ENVIRONMENT_UKUI:
case base::nix::DESKTOP_ENVIRONMENT_DEEPIN:
case base::nix::DESKTOP_ENVIRONMENT_LXQT:
- return SystemTheme::kQt;
+ return SystemTheme::kDefault;
case base::nix::DESKTOP_ENVIRONMENT_OTHER:
return SystemTheme::kDefault;
}
diff --git a/ui/views/controls/menu/menu_config.cc b/ui/views/controls/menu/menu_config.cc
index 2f1525c8880d4..c7b6d0822ba32 100644
--- a/ui/views/controls/menu/menu_config.cc
+++ b/ui/views/controls/menu/menu_config.cc
@@ -5,6 +5,7 @@
#include "ui/views/controls/menu/menu_config.h"
#include "base/no_destructor.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "ui/base/ui_base_features.h"
#include "ui/views/controls/menu/menu_controller.h"
#include "ui/views/controls/menu/menu_item_view.h"
@@ -64,12 +65,12 @@ void MenuConfig::InitCommon() {
reserve_dedicated_arrow_column = false;
menu_horizontal_border_size = 0;
submenu_horizontal_overlap = 0;
- item_vertical_margin = 6;
+ item_vertical_margin = features::IsThorium2024() ? 4 : 6;
item_horizontal_border_padding = 12;
arrow_size = 16;
- separator_height = 17;
- separator_spacing_height = 4;
- use_outer_border = false;
+ separator_height = features::IsThorium2024() ? 11 : 17;
+ separator_spacing_height = features::IsThorium2024() ? 3 : 4;
+ use_outer_border = features::IsThorium2024() ? true : false;
}
// static
diff --git a/ui/views/controls/menu/menu_config_linux.cc b/ui/views/controls/menu/menu_config_linux.cc
index 09c03d1e87011..0929f0598d52b 100644
--- a/ui/views/controls/menu/menu_config_linux.cc
+++ b/ui/views/controls/menu/menu_config_linux.cc
@@ -4,12 +4,16 @@
#include "ui/views/controls/menu/menu_config.h"
+#include "chrome/browser/ui/thorium_2024.h"
+#include "ui/base/ui_base_features.h"
#include "ui/ozone/public/ozone_platform.h"
namespace views {
void MenuConfig::InitPlatform() {
- use_bubble_border = true;
+ use_bubble_border = corner_radius > 0;
+ arrow_to_edge_padding = features::IsThorium2024() ? 2 : 8;
+ separator_height = features::IsThorium2024() ? 6 : 17;
}
} // namespace views
diff --git a/ui/views/controls/menu/menu_config_mac.mm b/ui/views/controls/menu/menu_config_mac.mm
index eabfb364890d3..2374c18b0f3d7 100644
--- a/ui/views/controls/menu/menu_config_mac.mm
+++ b/ui/views/controls/menu/menu_config_mac.mm
@@ -1,17 +1,55 @@
-// Copyright 2014 The Chromium Authors
+// Copyright 2024 The Chromium Authors and Alex313031
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#import <AppKit/AppKit.h>
+
+#include "base/mac/mac_util.h"
+#include "chrome/browser/ui/thorium_2024.h"
+#include "ui/base/ui_base_features.h"
#include "ui/views/controls/menu/menu_config.h"
+#include "ui/gfx/platform_font_mac.h"
+
+namespace {
+
+void InitMaterialMenuConfig(views::MenuConfig* config) {
+ // These config parameters are from https://crbug.com/829347 and the spec
+ // images linked from that bug.
+ config->submenu_horizontal_overlap = 0;
+ config->minimum_text_item_height = 28;
+ config->minimum_container_item_height = 40;
+ config->arrow_to_edge_padding = 16;
+ config->separator_height = 9;
+ config->separator_lower_height = 4;
+ config->separator_upper_height = 4;
+ config->separator_spacing_height = 5;
+ config->separator_thickness = 1;
+ config->reserve_dedicated_arrow_column = false;
+ config->icons_in_label = true;
+ config->icon_label_spacing = 8;
+ config->corner_radius = 8;
+ config->auxiliary_corner_radius = 4;
+ config->item_horizontal_border_padding = 0;
+}
+
+} // namespace
+
namespace views {
void MenuConfig::InitPlatform() {
check_selected_combobox_item = true;
- arrow_key_selection_wraps = false;
+ arrow_key_selection_wraps = true;
use_mnemonics = false;
- show_context_menu_accelerators = false;
+ show_context_menu_accelerators = features::IsThorium2024() ? true : false;
all_menus_use_prefix_selection = true;
+ if (features::IsThorium2024()) {
+ menu_horizontal_border_size = 0;
+ }
+ use_outer_border = features::IsThorium2024() ? true : false;
+ if (features::IsThorium2024()) {
+ InitMaterialMenuConfig(this);
+ }
}
} // namespace views
diff --git a/ui/views/controls/menu/menu_config_win.cc b/ui/views/controls/menu/menu_config_win.cc
index a2dae078ccbd3..41e3452b95f5c 100644
--- a/ui/views/controls/menu/menu_config_win.cc
+++ b/ui/views/controls/menu/menu_config_win.cc
@@ -8,6 +8,8 @@
#include <Vssym32.h>
+#include "base/win/windows_version.h"
+#include "ui/base/ui_base_features.h"
#include "ui/gfx/system_fonts_win.h"
namespace views {
@@ -22,9 +24,40 @@ void MenuConfig::InitPlatform() {
show_cues == TRUE);
SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &show_delay, 0);
- separator_upper_height = 5;
- separator_lower_height = 7;
+ bool is_win11 = base::win::GetVersion() >= base::win::Version::WIN11;
+ use_outer_border = features::IsThorium2024() ? true : false;
+
+ if (features::IsThorium2024()) {
+ if (is_win11) {
+ corner_radius = 8;
+ menu_horizontal_border_size = 4;
+ submenu_horizontal_overlap = 1;
+ rounded_menu_vertical_border_size = 4;
+ item_horizontal_padding = 12;
+ between_item_vertical_padding = 2;
+ separator_height = 1;
+ separator_upper_height = 1;
+ separator_lower_height = 1;
+ item_corner_radius = 4;
+ use_outer_border = false;
+ } else {
+ corner_radius = 0;
+ menu_horizontal_border_size = 3;
+ nonrounded_menu_vertical_border_size = 3;
+ item_vertical_margin = 3;
+ item_horizontal_border_padding = -2;
+ icon_label_spacing = 10;
+ always_reserve_check_region = true;
+ separator_height = 7;
+ separator_upper_height = 5;
+ separator_lower_height = 5;
+ use_outer_border = true;
+ }
+ } else {
+ separator_upper_height = 5;
+ separator_lower_height = 7;
+ }
use_bubble_border = corner_radius > 0;
}
diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
index 3ed4ba49f5b4d..7a9b2a96f7c9a 100644
--- a/ui/views/controls/tree/tree_view.cc
+++ b/ui/views/controls/tree/tree_view.cc
@@ -19,6 +19,7 @@
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_features.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/events/event.h"
@@ -96,12 +97,33 @@ TreeView::TreeView()
drawing_provider_(std::make_unique<TreeViewDrawingProvider>()) {
// Always focusable, even on Mac (consistent with NSOutlineView).
SetFocusBehavior(FocusBehavior::ALWAYS);
+#if BUILDFLAG(IS_MAC)
+ constexpr bool kUseMdIcons = true;
+#else
+ constexpr bool kUseMdIcons = false;
+#endif
+ if (features::IsThorium2024()) {
+ if (kUseMdIcons) {
+ closed_icon_ = open_icon_ = ui::ImageModel::FromVectorIcon(
+ vector_icons::kFolderIcon, ui::kColorIcon);
+ } else {
+ // TODO(ellyjones): if the pre-Harmony codepath goes away, merge
+ // closed_icon_ and open_icon_.
+ closed_icon_ = ui::ImageModel::FromImage(
+ ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+ IDR_FOLDER_CLOSED));
+ open_icon_ = ui::ImageModel::FromImage(
+ ui::ResourceBundle::GetSharedInstance().GetImageNamed(IDR_FOLDER_OPEN));
+ }
+ text_offset_ = closed_icon_.Size().width() + kImagePadding + kImagePadding +
+ kArrowRegionSize;
+ } else {
+ folder_icon_ = ui::ImageModel::FromVectorIcon(
+ vector_icons::kFolderChromeRefreshIcon, ui::kColorIcon);
- folder_icon_ = ui::ImageModel::FromVectorIcon(
- vector_icons::kFolderChromeRefreshIcon, ui::kColorIcon);
-
- text_offset_ = folder_icon_.Size().width() + kImagePadding + kImagePadding +
- kArrowRegionSize;
+ text_offset_ = folder_icon_.Size().width() + kImagePadding + kImagePadding +
+ kArrowRegionSize;
+ }
}
TreeView::~TreeView() {
@@ -1174,21 +1196,43 @@ void TreeView::PaintNodeIcon(gfx::Canvas* canvas,
const gfx::Rect& bounds) {
std::optional<size_t> icon_index = model_->GetIconIndex(node->model_node());
int icon_x = kArrowRegionSize + kImagePadding;
- if (!icon_index.has_value()) {
- // Flip just the |bounds| region of |canvas|.
- gfx::ScopedCanvas scoped_canvas(canvas);
- canvas->Translate(gfx::Vector2d(bounds.x(), 0));
- scoped_canvas.FlipIfRTL(bounds.width());
- // Now paint the icon local to that flipped region.
- PaintRowIcon(canvas, folder_icon_.Rasterize(GetColorProvider()), icon_x,
- gfx::Rect(0, bounds.y(), bounds.width(), bounds.height()));
+ if (features::IsThorium2024()) {
+ if (!icon_index.has_value()) {
+ // Flip just the |bounds| region of |canvas|.
+ gfx::ScopedCanvas scoped_canvas(canvas);
+ canvas->Translate(gfx::Vector2d(bounds.x(), 0));
+ scoped_canvas.FlipIfRTL(bounds.width());
+ // Now paint the icon local to that flipped region.
+ PaintRowIcon(canvas,
+ (node->is_expanded() ? open_icon_ : closed_icon_)
+ .Rasterize(GetColorProvider()),
+ icon_x,
+ gfx::Rect(0, bounds.y(), bounds.width(), bounds.height()));
+ } else {
+ const gfx::ImageSkia& icon =
+ icons_[icon_index.value()].Rasterize(GetColorProvider());
+ icon_x += (open_icon_.Size().width() - icon.width()) / 2;
+ if (base::i18n::IsRTL())
+ icon_x = bounds.width() - icon_x - icon.width();
+ PaintRowIcon(canvas, icon, icon_x, bounds);
+ }
} else {
- const gfx::ImageSkia& icon =
- icons_[icon_index.value()].Rasterize(GetColorProvider());
- icon_x += (folder_icon_.Size().width() - icon.width()) / 2;
- if (base::i18n::IsRTL())
- icon_x = bounds.width() - icon_x - icon.width();
- PaintRowIcon(canvas, icon, icon_x, bounds);
+ if (!icon_index.has_value()) {
+ // Flip just the |bounds| region of |canvas|.
+ gfx::ScopedCanvas scoped_canvas(canvas);
+ canvas->Translate(gfx::Vector2d(bounds.x(), 0));
+ scoped_canvas.FlipIfRTL(bounds.width());
+ // Now paint the icon local to that flipped region.
+ PaintRowIcon(canvas, folder_icon_.Rasterize(GetColorProvider()), icon_x,
+ gfx::Rect(0, bounds.y(), bounds.width(), bounds.height()));
+ } else {
+ const gfx::ImageSkia& icon =
+ icons_[icon_index.value()].Rasterize(GetColorProvider());
+ icon_x += (folder_icon_.Size().width() - icon.width()) / 2;
+ if (base::i18n::IsRTL())
+ icon_x = bounds.width() - icon_x - icon.width();
+ PaintRowIcon(canvas, icon, icon_x, bounds);
+ }
}
}
diff --git a/ui/views/controls/tree/tree_view.h b/ui/views/controls/tree/tree_view.h
index 3a8a79eb69c32..f29814a4fc4b9 100644
--- a/ui/views/controls/tree/tree_view.h
+++ b/ui/views/controls/tree/tree_view.h
@@ -461,6 +461,10 @@ class VIEWS_EXPORT TreeView : public View,
// Default folder icon.
ui::ImageModel folder_icon_;
+ // Default icons for closed/open.
+ ui::ImageModel closed_icon_;
+ ui::ImageModel open_icon_;
+
// Icons from the model.
std::vector<ui::ImageModel> icons_;
diff --git a/ui/views/layout/layout_provider.cc b/ui/views/layout/layout_provider.cc
index 01301096ca466..87c2dbe85a63a 100644
--- a/ui/views/layout/layout_provider.cc
+++ b/ui/views/layout/layout_provider.cc
@@ -8,6 +8,7 @@
#include "base/containers/fixed_flat_map.h"
#include "base/logging.h"
+#include "chrome/browser/ui/thorium_2024.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/font_list.h"
#include "ui/views/controls/focus_ring.h"
@@ -208,6 +209,48 @@ ShapeSysTokens GetShapeSysToken(ShapeContextTokens id) {
int LayoutProvider::GetCornerRadiusMetric(ShapeContextTokens id,
const gfx::Size& size) const {
+
+ static const bool classic_omnibox = base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox");
+ if (features::IsThorium2024()) {
+ switch (id) {
+ case ShapeContextTokens::kBadgeRadius:
+ return 6;
+ case ShapeContextTokens::kButtonRadius:
+ return 4;
+ case ShapeContextTokens::kComboboxRadius:
+ return 6;
+ case ShapeContextTokens::kDialogRadius:
+ return 6;
+ case ShapeContextTokens::kFindBarViewRadius:
+ return 6;
+ case ShapeContextTokens::kMenuRadius:
+ case ShapeContextTokens::kMenuAuxRadius:
+ return 0;
+ case ShapeContextTokens::kMenuTouchRadius:
+ return 8;
+ case ShapeContextTokens::kOmniboxExpandedRadius: {
+ if (classic_omnibox) {
+ return 4;
+ } else {
+ return 16;
+ }
+ }
+ case ShapeContextTokens::kTextfieldRadius: {
+ if (classic_omnibox) {
+ return 4;
+ } else {
+ return 8;
+ }
+ }
+ case ShapeContextTokens::kSidePanelContentRadius:
+ return 16;
+ case ShapeContextTokens::kSidePanelPageContentRadius:
+ return 8;
+ default:
+ return 0;
+ }
+ }
+
ShapeSysTokens token = GetShapeSysToken(id);
DCHECK_NE(token, ShapeSysTokens::kDefault)
<< "kDefault token means there is a missing mapping between shape tokens";
diff --git a/ui/webui/resources/cr_elements/cr_button/cr_button.css b/ui/webui/resources/cr_elements/cr_button/cr_button.css
index 69dc68d302b63..c0b974153be08 100644
--- a/ui/webui/resources/cr_elements/cr_button/cr_button.css
+++ b/ui/webui/resources/cr_elements/cr_button/cr_button.css
@@ -74,7 +74,7 @@
user-select: none;
-webkit-tap-highlight-color: transparent;
border: var(--cr-button-border, 1px solid var(--cr-button-border-color));
- border-radius: 100px;
+ border-radius: 4px;
background: var(--cr-button-background-color);
color: var(--cr-button-text-color);
font-weight: 500;
@@ -92,7 +92,7 @@
}
:host(.floating-button) {
- border-radius: 8px;
+ border-radius: 4px;
height: 40px;
transition: box-shadow 80ms linear;
}
diff --git a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.css b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.css
index c467dbadf8e14..a193f5893743d 100644
--- a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.css
+++ b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.css
@@ -28,7 +28,7 @@
--cr-active-neutral-on-subtle-background-color);
--cr-toggle-bar-border-color: var(--cr-toggle-unchecked-button-color);
--cr-toggle-bar-border: 1px solid var(--cr-toggle-bar-border-color);
- --cr-toggle-bar-width: 26px;
+ --cr-toggle-bar-width: 32px;
--cr-toggle-knob-diameter: 8px;
-webkit-tap-highlight-color: transparent;
cursor: pointer;
@@ -92,7 +92,7 @@
border-radius: 50px;
box-sizing: border-box;
display: block;
- height: 16px;
+ height: 20px;
left: 3px;
opacity: 1;
position: initial;