From 468f17a3f762808e5c29cb1240f0628d9dededde Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 22 Feb 2023 20:34:38 +0000 Subject: Initial revision --- .../chromium-110-NativeThemeBase-fabs.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch (limited to 'chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch') diff --git a/chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch b/chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch new file mode 100644 index 00000000..c7d0e8b1 --- /dev/null +++ b/chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch @@ -0,0 +1,29 @@ +From 07f0a87e4409f27854b3a1d17f270a3497f38947 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Mon, 19 Dec 2022 19:07:37 +0000 +Subject: [PATCH] GCC: use fabsf in ui::NativeThemeBase::OutlineColor + +Template deduction fails for base::clamp, because return type of +fabs is double and all other parameters are float. + +Bug: 819294 +Change-Id: I34f1c9c99d13f69097d899bfcb0526cbdf4fe1c1 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4110869 +Reviewed-by: Peter Kasting +Commit-Queue: Stephan Hartmann +Cr-Commit-Position: refs/heads/main@{#1085034} +--- + +diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc +index 169c60c..36db49a 100644 +--- a/ui/native_theme/native_theme_base.cc ++++ b/ui/native_theme/native_theme_base.cc +@@ -1336,7 +1336,7 @@ + // The following code has been tested to look OK with all of the + // default GTK themes. + SkScalar min_diff = base::clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); +- SkScalar diff = base::clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); ++ SkScalar diff = base::clamp(fabsf(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); + + if (hsv1[2] + hsv2[2] > 1.0) + diff = -diff; -- cgit v1.2.3-65-gdbad