summaryrefslogtreecommitdiffstats
path: root/libs/wpewebkit/patches/161-WPE-fix-inverted-prefers-reduced-motion.patch
blob: 288751f413cb82acd7b06bda2ef1b12987d19ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From bb31b267d7218c8176c228f9d04e60f6165b1c86 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 24 Sep 2026 23:28:09 +0100
Subject: [PATCH] WPE: fix inverted prefers-reduced-motion

SystemSettingsManagerProxy::reducedMotion() negates the reduced-motion
setting, so the documented default of false reports that the user
prefers reduced motion. Every site that honours the
prefers-reduced-motion media query then disables its animations.

The negation is left over from enableAnimations(), which this function
replaced in 446267f9f445 ("[WPE][GTK] Improvements to platform media
queries (prefers reduced motion, high contrast, and dark theme)"). There
it was correct, because the value being read was the opposite setting,
WPE_SETTING_DISABLE_ANIMATIONS. Both the function and the setting
changed polarity together, so the negation has to go.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 Source/WebKit/UIProcess/wpe/SystemSettingsManagerProxyWPE.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Source/WebKit/UIProcess/wpe/SystemSettingsManagerProxyWPE.cpp
+++ b/Source/WebKit/UIProcess/wpe/SystemSettingsManagerProxyWPE.cpp
@@ -186,7 +186,7 @@ bool SystemSettingsManagerProxy::overlay
 
 bool SystemSettingsManagerProxy::reducedMotion() const
 {
-    return !getBool(m_settings, WPE_SETTING_REDUCED_MOTION, false);
+    return getBool(m_settings, WPE_SETTING_REDUCED_MOTION, false);
 }
 
 WebCore::InterfaceContrastPreference SystemSettingsManagerProxy::interfaceContrast() const