Bug 258788

Summary: [GTK] animations are sometimes not finished
Product: WebKit Reporter: two
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, kdwkleung, mcatanzaro
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   

Description two 2023-07-02 15:49:55 PDT
video: https://envs.sh/dPm.webm
this is recorded in MiniBrowser from gnome-nightly, on https://developer.gnome.org where it's very visible, but it also happens on other websites and in Epiphany
for me this only happens when power profile is set to power saving
Comment 1 Kdwk 2023-07-05 00:05:45 PDT
I'm unable to reproduce this with Epiphany Tech Preview 45.alpha-5-g2486bfbdf+/ WebKitGTK 2.41.6
Comment 2 two 2023-07-06 14:33:41 PDT
(In reply to kdwkleung from comment #1)
> I'm unable to reproduce this with Epiphany Tech Preview
> 45.alpha-5-g2486bfbdf+/ WebKitGTK 2.41.6

what is your GPU and power profile?
Comment 3 Kdwk 2023-07-06 18:03:53 PDT
I've tried both Intel i7-9700/UHD 630 and Apple M2 Max (VM).

I've tried all three power profiles.
Comment 4 Michael Catanzaro 2023-07-27 13:09:09 PDT
(In reply to two from comment #0)
> for me this only happens when power profile is set to power saving

You realized on Matrix that this might be due to LowPowerModeNotifier. You can find out by trying something like:

diff --git a/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp b/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp
index d380c2fbfab9..2ded0ce8bda8 100644
--- a/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp
+++ b/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp
@@ -28,13 +28,13 @@ namespace WebCore {
 
 
 LowPowerModeNotifier::LowPowerModeNotifier(LowPowerModeChangeCallback&& callback)
-#if GLIB_CHECK_VERSION(2, 69, 1)
+#if 0
     : m_callback(WTFMove(callback))
     , m_powerProfileMonitor(adoptGRef(g_power_profile_monitor_dup_default()))
     , m_lowPowerModeEnabled(g_power_profile_monitor_get_power_saver_enabled(m_powerProfileMonitor.get()))
 #endif
 {
-#if GLIB_CHECK_VERSION(2, 69, 1)
+#if 0
     g_signal_connect_swapped(m_powerProfileMonitor.get(), "notify::power-saver-enabled", G_CALLBACK(+[] (LowPowerModeNotifier* self, GParamSpec*, GPowerProfileMonitor* monitor) {
         bool powerSaverEnabled = g_power_profile_monitor_get_power_saver_enabled(monitor);
         if (self->m_lowPowerModeEnabled != powerSaverEnabled) {
@@ -47,7 +47,7 @@ LowPowerModeNotifier::LowPowerModeNotifier(LowPowerModeChangeCallback&& callback
 
 LowPowerModeNotifier::~LowPowerModeNotifier()
 {
-#if GLIB_CHECK_VERSION(2, 69, 1)
+#if 0
     g_signal_handlers_disconnect_by_data(m_powerProfileMonitor.get(), this);
 #endif
 }