Title: [203215] trunk/Source/WebKit2
Revision
203215
Author
[email protected]
Date
2016-07-13 23:34:08 -0700 (Wed, 13 Jul 2016)

Log Message

REGRESSION(r202273): [GTK] Redirected X window is resized to the previous size on size allocate
https://bugs.webkit.org/show_bug.cgi?id=159551

Reviewed by Michael Catanzaro.

In r202273 I added webkitWebViewBaseResizeRedirectedWindow() helper to remove duplicated code in all places
where we were resizing the redirected window to the current drawing area size. But on size allocate, we were
updating the redirected window first, and then the drawing area, to ensure that when the drawing area notifies
the web process the redirected window is already at the new size. This regression doesn't have any visual
effect, because we are ensure the right size always before rendering, but there's a small extra resize in this case.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSizeAllocate): Resize the redirected window before updating the drawing area size.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (203214 => 203215)


--- trunk/Source/WebKit2/ChangeLog	2016-07-14 06:17:36 UTC (rev 203214)
+++ trunk/Source/WebKit2/ChangeLog	2016-07-14 06:34:08 UTC (rev 203215)
@@ -1,3 +1,19 @@
+2016-07-13  Carlos Garcia Campos  <[email protected]>
+
+        REGRESSION(r202273): [GTK] Redirected X window is resized to the previous size on size allocate
+        https://bugs.webkit.org/show_bug.cgi?id=159551
+
+        Reviewed by Michael Catanzaro.
+
+        In r202273 I added webkitWebViewBaseResizeRedirectedWindow() helper to remove duplicated code in all places
+        where we were resizing the redirected window to the current drawing area size. But on size allocate, we were
+        updating the redirected window first, and then the drawing area, to ensure that when the drawing area notifies
+        the web process the redirected window is already at the new size. This regression doesn't have any visual
+        effect, because we are ensure the right size always before rendering, but there's a small extra resize in this case.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseSizeAllocate): Resize the redirected window before updating the drawing area size.
+
 2016-07-13  Chris Dumez  <[email protected]>
 
         [WK2] Use more references for connections

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (203214 => 203215)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2016-07-14 06:17:36 UTC (rev 203214)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2016-07-14 06:34:08 UTC (rev 203215)
@@ -702,8 +702,13 @@
 
 
 #if USE(REDIRECTED_XCOMPOSITE_WINDOW)
-    if (priv->redirectedWindow && drawingArea->isInAcceleratedCompositingMode())
-        webkitWebViewBaseResizeRedirectedWindow(webViewBase);
+    if (priv->redirectedWindow && drawingArea->isInAcceleratedCompositingMode()) {
+        // We don't use webkitWebViewBaseResizeRedirectedWindow here, because we want to update the
+        // redirected window size before the drawing area, because on resize the drawing area sends
+        // the UpdateBackingStoreState message to the web process and waits for its reply. We want
+        // the web process to use the new xwindow size when UpdateBackingStoreState message arrives.
+        priv->redirectedWindow->resize(viewRect.size());
+    }
 #endif
 
     drawingArea->setSize(viewRect.size(), IntSize(), IntSize());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to