ソースを参照

LibWeb: Update the ICB's idea of the viewport rect after Frame resize

This makes animations start if they are uncovered by a resize.
Andreas Kling 4 年 前
コミット
0324144e2a
1 ファイル変更4 行追加1 行削除
  1. 4 1
      Userland/Libraries/LibWeb/Page/Frame.cpp

+ 4 - 1
Userland/Libraries/LibWeb/Page/Frame.cpp

@@ -110,8 +110,11 @@ void Frame::set_size(const Gfx::IntSize& size)
     if (m_size == size)
         return;
     m_size = size;
-    if (m_document)
+    if (m_document) {
         m_document->update_layout();
+        if (m_document->layout_node())
+            m_document->layout_node()->did_set_viewport_rect({}, viewport_rect());
+    }
 }
 
 void Frame::set_viewport_scroll_offset(const Gfx::IntPoint& offset)