summaryrefslogtreecommitdiffstats
path: root/chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2023-02-22 20:34:38 +0000
committer Eric Hameleers <alien@slackware.com>2023-02-22 20:34:38 +0000
commit468f17a3f762808e5c29cb1240f0628d9dededde (patch)
tree88596ac9cce04fc2d780bf3307156431e2115c4c /chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch
parente1e493513f144208a38abcca4e8b748925f2f8fb (diff)
downloadasb-468f17a3f762808e5c29cb1240f0628d9dededde.tar.gz
asb-468f17a3f762808e5c29cb1240f0628d9dededde.tar.xz
Initial revision
Diffstat (limited to 'chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch')
-rw-r--r--chromium-ungoogled/build/patches/chromium-110-NativeThemeBase-fabs.patch29
1 files changed, 29 insertions, 0 deletions
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 <stha09@googlemail.com>
+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 <pkasting@chromium.org>
+Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
+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;