diff --git a/copr_script.sh b/copr_script.sh index 211f991f..ba53ceab 100755 --- a/copr_script.sh +++ b/copr_script.sh @@ -38,6 +38,7 @@ popd pushd patches/ cp ../translation_patches/register-trivalent-strings.patch ./ cp ../translation_patches/translations/*.patch ./ +cp ui_patches/*.patch ./ patches=(*.patch) for ((i=0; i<${#patches[@]}; i++)); do cp "${patches[i]}" "../build/trivalent-$((i+3000)).patch" diff --git a/fedora_patches/chromium-144-rust-libadler2.patch b/fedora_patches/chromium-144-rust-libadler2.patch deleted file mode 100644 index 631a3210..00000000 --- a/fedora_patches/chromium-144-rust-libadler2.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up chromium-144.0.7559.31/build/rust/std/BUILD.gn.than chromium-144.0.7559.31/build/rust/std/BUILD.gn ---- chromium-144.0.7559.31/build/rust/std/BUILD.gn.than 2025-12-26 15:06:36.274081861 +0100 -+++ chromium-144.0.7559.31/build/rust/std/BUILD.gn 2025-12-26 16:11:45.697054423 +0100 -@@ -55,11 +55,7 @@ if (toolchain_has_rust) { - "miniz_oxide", - "object", - ] -- if (rustc_nightly_capability) { -- stdlib_files += [ "adler2" ] -- } else { -- stdlib_files += [ "adler" ] -- } -+ stdlib_files += [ "adler2" ] - } - - if (toolchain_for_rust_host_build_tools) { diff --git a/patches/add-dark-mode-toolbar-toggle.patch b/patches/add-dark-mode-toolbar-toggle.patch index 790d3913..502e8428 100644 --- a/patches/add-dark-mode-toolbar-toggle.patch +++ b/patches/add-dark-mode-toolbar-toggle.patch @@ -80,23 +80,23 @@ index d637eecb9e..621b51f79c 100644 command_updater_.UpdateCommandEnabled(IDC_SHOW_COMMENTS_SIDE_PANEL, true); command_updater_.UpdateCommandEnabled(IDC_FIND_AND_EDIT_MENU, true); diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc -index 3f477375e0..3627f15f06 100644 +index cd7f650386..261e7e0d53 100644 --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc -@@ -2320,6 +2320,11 @@ void OpenFeedbackDialog(BrowserWindowInterface* bwi, +@@ -2371,6 +2371,11 @@ void OpenFeedbackDialog(BrowserWindowInterface* browser, category_tag, std::string() /* extra_diagnostics */); } - + +void ToggleWebsiteDarkmode(PrefService* pref_service) { + bool pref_enabled = pref_service->GetBoolean(prefs::kWebKitForceDarkModeEnabled); + pref_service->SetBoolean(prefs::kWebKitForceDarkModeEnabled, !pref_enabled); +} + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - void OpenReportUnsafeSiteDialog(Browser* browser) { + void OpenReportUnsafeSiteDialog(BrowserWindowInterface* browser) { base::RecordAction(UserMetricsAction("ReportUnsafeSite")); diff --git a/chrome/browser/ui/browser_commands.h b/chrome/browser/ui/browser_commands.h -index 57754e9b20..c99ce70d8f 100644 +index 9a4b59415d..06f30410b0 100644 --- a/chrome/browser/ui/browser_commands.h +++ b/chrome/browser/ui/browser_commands.h @@ -28,6 +28,7 @@ class BrowserWindowInterface; @@ -105,15 +105,15 @@ index 57754e9b20..c99ce70d8f 100644 class Profile; +class PrefService; enum class DevToolsOpenedByAction; - + namespace content { -@@ -241,6 +242,7 @@ void SharingHub(Browser* browser); - void ScreenshotCapture(Browser* browser); - void SavePage(Browser* browser); - bool CanSavePage(const Browser* browser); +@@ -251,6 +252,7 @@ void SharingHub(BrowserWindowInterface* browser); + void ScreenshotCapture(BrowserWindowInterface* browser); + void SavePage(BrowserWindowInterface* browser); + bool CanSavePage(const BrowserWindowInterface* browser); +void ToggleWebsiteDarkmode(PrefService* pref_service); - void Print(BrowserWindowInterface* bwi); - bool CanPrint(BrowserWindowInterface* bwi); + void Print(BrowserWindowInterface* browser); + bool CanPrint(BrowserWindowInterface* browser); #if BUILDFLAG(ENABLE_PRINTING) diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom index dc2fed7651..d1956d42ce 100644 diff --git a/patches/add-feature-to-toggle-middlemouse-copypaste.patch b/patches/add-feature-to-toggle-middlemouse-copypaste.patch index ca486889..2cf43a5e 100644 --- a/patches/add-feature-to-toggle-middlemouse-copypaste.patch +++ b/patches/add-feature-to-toggle-middlemouse-copypaste.patch @@ -36,41 +36,38 @@ index eb1b09a5dc..41088e7db1 100644 // Offsets the double-clicked word's range. This is only used in the unusual diff --git a/ui/views/views_features.cc b/ui/views/views_features.cc -index 88ca7f0b1f..14be7e5a3a 100644 +index 47077e1687..17c16f9bf0 100644 --- a/ui/views/views_features.cc +++ b/ui/views/views_features.cc -@@ -9,6 +9,12 @@ - - namespace views::features { - -+// Controls the behavior of middle-mouse copy and pasting. -+// This may be overridden by the kMiddleClickAutoscroll -+// blink feature. +@@ -11,6 +11,8 @@ namespace views::features { + + // Please keep alphabetized. + +BASE_FEATURE(kMiddleClickCopyPaste, base::FEATURE_ENABLED_BY_DEFAULT); + -+ - // Please keep alphabetized. - - // Used to enable additional a11y attributes when announcing text. + // Used to apply the initial URL to the WebContents in WebView. This is a kill + // switch for this new logic, see crbug.com/456058558. + // TODO(https://crbug.com/456058558): Remove this flag once the feature becomes diff --git a/ui/views/views_features.h b/ui/views/views_features.h -index 5f5ea15678..6240bbae10 100644 +index 888a16fb62..25ba68dee7 100644 --- a/ui/views/views_features.h +++ b/ui/views/views_features.h -@@ -17,6 +17,8 @@ VIEWS_EXPORT BASE_DECLARE_FEATURE(kEnableTouchDragCursorSync); - VIEWS_EXPORT BASE_DECLARE_FEATURE(kKeyboardAccessibleTooltipInViews); - VIEWS_EXPORT BASE_DECLARE_FEATURE(kApplyInitialUrlToWebContents); - +@@ -11,6 +11,8 @@ + + namespace views::features { + +VIEWS_EXPORT BASE_DECLARE_FEATURE(kMiddleClickCopyPaste); + - } // namespace views::features + // Please keep alphabetized. + VIEWS_EXPORT BASE_DECLARE_FEATURE(kApplyInitialUrlToWebContents); + VIEWS_EXPORT BASE_DECLARE_FEATURE(kEnableInputProtection); - #endif // UI_VIEWS_VIEWS_FEATURES_H_ diff --git a/third_party/blink/renderer/core/editing/selection_controller.cc b/third_party/blink/renderer/core/editing/selection_controller.cc -index 8f129a1d5d..0ce49f8457 100644 +index 5e867c3f30..695e5f5704 100644 --- a/third_party/blink/renderer/core/editing/selection_controller.cc +++ b/third_party/blink/renderer/core/editing/selection_controller.cc -@@ -63,6 +63,8 @@ - #include "third_party/blink/renderer/platform/runtime_enabled_features.h" +@@ -66,6 +66,8 @@ + #include "ui/base/mojom/menu_source_type.mojom-blink.h" #include "ui/gfx/geometry/point_conversions.h" +#include "ui/views/views_features.h" @@ -78,14 +75,15 @@ index 8f129a1d5d..0ce49f8457 100644 namespace blink { SelectionController::SelectionController(LocalFrame& frame) -@@ -1260,7 +1262,9 @@ bool SelectionController::HandlePasteGlobalSelection( +@@ -1295,6 +1297,11 @@ bool SelectionController::HandlePasteGlobalSelection( + return false; + } + ++ // Disable middle click paste if features disable it ++ if (RuntimeEnabledFeatures::MiddleClickAutoscrollEnabled() || ++ !base::FeatureList::IsEnabled(views::features::kMiddleClickCopyPaste)) ++ return false; ++ Frame* focus_frame = frame_->GetPage()->GetFocusController().FocusedOrMainFrame(); // Do not paste here if the focus was moved somewhere else. -- if (frame_ == focus_frame) -+ if (frame_ == focus_frame && -+ !RuntimeEnabledFeatures::MiddleClickAutoscrollEnabled() && -+ base::FeatureList::IsEnabled(views::features::kMiddleClickCopyPaste)) - return frame_->GetEditor().ExecuteCommand("PasteGlobalSelection"); - - return false; diff --git a/patches/adjust-jit-controls.patch b/patches/adjust-jit-controls.patch index 41786845..16f69fc0 100644 --- a/patches/adjust-jit-controls.patch +++ b/patches/adjust-jit-controls.patch @@ -64,7 +64,7 @@ index 25458578a8..5a59d3f789 100644 } if (site_url.is_empty()) { -@@ -7947,75 +7938,14 @@ bool ChromeContentBrowserClient::AreV8OptimizationsEnabledForSite( +@@ -7967,83 +7967,14 @@ bool ChromeContentBrowserClient::AreV8OptimizationsEnabledForSite( // familiarity or site-specific settings cannot be considered here, because // the process will be shared among many sites. return map->GetDefaultContentSetting( @@ -77,6 +77,13 @@ index 25458578a8..5a59d3f789 100644 - site_url, site_url, ContentSettingsType::JAVASCRIPT_OPTIMIZER, - &content_setting_info); - +- content_settings::ProviderType default_content_setting_provider; +- map->GetDefaultContentSetting(ContentSettingsType::JAVASCRIPT_OPTIMIZER, +- &default_content_setting_provider); +- auto default_content_setting_source = +- content_settings::GetSettingSourceFromProviderType( +- default_content_setting_provider); +- - // `default_javascript_optimizer_setting` is determined based on the user's - // selection in chrome://settings, whether the site-familiarity-feature is - // enabled, and enterprise policy. `default_javascript_optimizer_setting` @@ -89,7 +96,8 @@ index 25458578a8..5a59d3f789 100644 - // Invariant guaranteed by ComputeDefaultJavascriptOptimizerSetting(). - CHECK(default_javascript_optimizer_setting != - JavascriptOptimizerSetting::kBlockedForUnfamiliarSites || -- content_setting_info.source == content_settings::SettingSource::kUser); +- default_content_setting_source == +- content_settings::SettingSource::kUser); - - if (default_javascript_optimizer_setting != - JavascriptOptimizerSetting::kBlockedForUnfamiliarSites) { diff --git a/patches/adjust-user-preferences.patch b/patches/adjust-user-preferences.patch deleted file mode 100644 index ab5afd95..00000000 --- a/patches/adjust-user-preferences.patch +++ /dev/null @@ -1,659 +0,0 @@ -Copyright 2024-2026 The Trivalent Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is -distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and limitations under the License. ---- -diff --git a/chrome/browser/resources/settings/site_settings/v8_page.html b/chrome/browser/resources/settings/site_settings/v8_page.html -index 3e6101bb07..50a7b6ec05 100644 ---- a/chrome/browser/resources/settings/site_settings/v8_page.html -+++ b/chrome/browser/resources/settings/site_settings/v8_page.html -@@ -25,19 +25,6 @@ - sub-label="$i18n{siteSettingsJavascriptOptimizerAllowedSubLabel}" - no-collapse> - -- - - -

$i18n{incognitoTabHeading}

--

-- $i18n{incognitoTabDescription} -- $i18n{learnMore} --

-
-
$i18nRaw{incognitoTabFeatures}
-
$i18nRaw{incognitoTabWarning}
-diff --git a/chrome/browser/resources/settings/a11y_page/live_translate.html b/chrome/browser/resources/settings/a11y_page/live_translate.html -index 3fce5bc069..c8ce8d033c 100644 ---- a/chrome/browser/resources/settings/a11y_page/live_translate.html -+++ b/chrome/browser/resources/settings/a11y_page/live_translate.html -@@ -25,28 +25,3 @@ - width: 100%; - } - --
-- -- --
-- --
-- -- -- --
--
-diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.html b/chrome/browser/resources/settings/appearance_page/appearance_page.html -index f4534420339a7..49393040e0741 100644 ---- a/chrome/browser/resources/settings/appearance_page/appearance_page.html -+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -118,6 +118,11 @@ - - -
-+
-+ -+ -