Browse Source

LibWeb: Stop animation driver timer after document becomes inactive

Aliaksandr Kalenik 1 năm trước cách đây
mục cha
commit
ecce570cb7
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      Userland/Libraries/LibWeb/DOM/Document.cpp

+ 3 - 0
Userland/Libraries/LibWeb/DOM/Document.cpp

@@ -3127,6 +3127,9 @@ void Document::did_stop_being_active_document_in_navigable()
         if (document_observer->document_became_inactive())
             document_observer->document_became_inactive()->function()();
     }
+
+    if (m_animation_driver_timer)
+        m_animation_driver_timer->stop();
 }
 
 void Document::increment_throw_on_dynamic_markup_insertion_counter(Badge<HTML::HTMLParser>)