[CoordinatedGraphics] Hidden pages are not suspended after a web view resize
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 13:00:16 +0000 (13:00 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 13:00:16 +0000 (13:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196487

Reviewed by Žan Doberšek.

When resizing the window, the hidden tabs are updated too, to avoid flickering or getting the old size when
switching tabs. For that we need to resume painting but we are not suspending it again after the update.

* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState): Suspend the painting again after a
synchronous update if needed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243796 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp

index 733ed63..a4e24b1 100644 (file)
@@ -1,5 +1,19 @@
 2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        [CoordinatedGraphics] Hidden pages are not suspended after a web view resize
+        https://bugs.webkit.org/show_bug.cgi?id=196487
+
+        Reviewed by Žan Doberšek.
+
+        When resizing the window, the hidden tabs are updated too, to avoid flickering or getting the old size when
+        switching tabs. For that we need to resume painting but we are not suspending it again after the update.
+
+        * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
+        (WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState): Suspend the painting again after a
+        synchronous update if needed.
+
+2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         Web Inspector: [GTK] Copy copies to nowhere
         https://bugs.webkit.org/show_bug.cgi?id=181228
 
index 2e60e97..28b83c2 100644 (file)
@@ -411,10 +411,13 @@ void DrawingAreaCoordinatedGraphics::updateBackingStoreState(uint64_t stateID, b
     if (respondImmediately) {
         // Make sure to resume painting if we're supposed to respond immediately, otherwise we'll just
         // send back an empty UpdateInfo struct.
+        bool wasSuspended = m_isPaintingSuspended;
         if (m_isPaintingSuspended)
             resumePainting();
 
         sendDidUpdateBackingStoreState();
+        if (wasSuspended)
+            suspendPainting();
     }
 
     m_inUpdateBackingStoreState = false;