Title: [181382] releases/WebKitGTK/webkit-2.8/Source/WebKit2
Revision
181382
Author
carlo...@webkit.org
Date
2015-03-11 03:23:37 -0700 (Wed, 11 Mar 2015)

Log Message

Merge r181324 - [GTK] Contents not shown when entering AC mode unless the window is resized
https://bugs.webkit.org/show_bug.cgi?id=142347

Reviewed by Žan Doberšek.

The problem is once again that we are now creating the redirected
X window in realize method. When entering AC mode we resize the
redirected window to the drawing area size. Since the size hasn't
changed from the drawing area point of view, the web process is
not notified. The WebProcess always uses the window size, instead
of the root layer size, to make sure it's in sync, see the comment
in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
enforce a resize when we change the size of the redirected window
when entering AC mode.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseEnterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit::DrawingAreaProxyImpl::forceResize):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog (181381 => 181382)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog	2015-03-11 10:22:13 UTC (rev 181381)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog	2015-03-11 10:23:37 UTC (rev 181382)
@@ -1,3 +1,25 @@
+2015-03-10  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Contents not shown when entering AC mode unless the window is resized
+        https://bugs.webkit.org/show_bug.cgi?id=142347
+
+        Reviewed by Žan Doberšek.
+
+        The problem is once again that we are now creating the redirected
+        X window in realize method. When entering AC mode we resize the
+        redirected window to the drawing area size. Since the size hasn't
+        changed from the drawing area point of view, the web process is
+        not notified. The WebProcess always uses the window size, instead
+        of the root layer size, to make sure it's in sync, see the comment
+        in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
+        enforce a resize when we change the size of the redirected window
+        when entering AC mode.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseEnterAcceleratedCompositingMode):
+        * UIProcess/DrawingAreaProxyImpl.h:
+        (WebKit::DrawingAreaProxyImpl::forceResize):
+
 2015-03-09  Geoffrey Garen  <gga...@apple.com>
 
         bmalloc: tryFastMalloc shouldn't crash

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (181381 => 181382)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2015-03-11 10:22:13 UTC (rev 181381)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2015-03-11 10:23:37 UTC (rev 181382)
@@ -1318,7 +1318,10 @@
     DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(priv->pageProxy->drawingArea());
     if (!drawingArea)
         return;
+
     priv->redirectedWindow->resize(drawingArea->size());
+    // Force a resize to ensure the new redirected window size is used by the WebProcess.
+    drawingArea->forceResize();
 #else
     UNUSED_PARAM(webkitWebViewBase);
 #endif

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h (181381 => 181382)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h	2015-03-11 10:22:13 UTC (rev 181381)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h	2015-03-11 10:23:37 UTC (rev 181382)
@@ -52,6 +52,8 @@
     void setNativeSurfaceHandleForCompositing(uint64_t);
 #endif
 
+    void forceResize() { sizeDidChange(); }
+
 private:
     // DrawingAreaProxy
     virtual void sizeDidChange();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to