Title: [126307] trunk/Source/WebKit/gtk
Revision
126307
Author
carlo...@webkit.org
Date
2012-08-22 08:53:21 -0700 (Wed, 22 Aug 2012)

Log Message

[GTK] Crash when finalizing WebKitWebView
https://bugs.webkit.org/show_bug.cgi?id=94699

Reviewed by Martin Robinson.

Create the offscreen window the first time accelerated compositing
is enabled, so that if it's never enabled the window won't be
created.

* WebCoreSupport/AcceleratedCompositingContextGL.cpp:
(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::initialize):
(WebKit::AcceleratedCompositingContext::setRootCompositingLayer):

Modified Paths

Diff

Modified: trunk/Source/WebKit/gtk/ChangeLog (126306 => 126307)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-08-22 15:47:53 UTC (rev 126306)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-08-22 15:53:21 UTC (rev 126307)
@@ -1,3 +1,19 @@
+2012-08-22  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Crash when finalizing WebKitWebView
+        https://bugs.webkit.org/show_bug.cgi?id=94699
+
+        Reviewed by Martin Robinson.
+
+        Create the offscreen window the first time accelerated compositing
+        is enabled, so that if it's never enabled the window won't be
+        created.
+
+        * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+        (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+        (WebKit::AcceleratedCompositingContext::initialize):
+        (WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
+
 2012-08-22  Gustavo Noronha Silva  <g...@gnome.org>
 
         [GTK] Split WebCore/platform into a separate library

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp (126306 => 126307)


--- trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp	2012-08-22 15:47:53 UTC (rev 126306)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp	2012-08-22 15:53:21 UTC (rev 126307)
@@ -50,7 +50,6 @@
 AcceleratedCompositingContext::AcceleratedCompositingContext(WebKitWebView* webView)
     : m_webView(webView)
     , m_layerFlushTimerCallbackId(0)
-    , m_redirectedWindow(RedirectedXCompositeWindow::create(IntSize(1, 1)))
     , m_lastFlushTime(0)
     , m_redrawPendingTime(0)
     , m_needsExtraFlush(false)
@@ -69,10 +68,14 @@
     if (m_rootLayer)
         return;
 
+    IntSize pageSize = getWebViewSize(m_webView);
+    if (!m_redirectedWindow)
+        m_redirectedWindow = RedirectedXCompositeWindow::create(pageSize);
+    else
+        m_redirectedWindow->resize(pageSize);
+
     m_rootLayer = GraphicsLayer::create(this);
     m_rootLayer->setDrawsContent(false);
-
-    IntSize pageSize = getWebViewSize(m_webView);
     m_rootLayer->setSize(pageSize);
 
     // The non-composited contents are a child of the root layer.
@@ -239,9 +242,6 @@
         return;
     }
 
-    if (graphicsLayer && !enabled())
-        m_redirectedWindow->resize(getWebViewSize(m_webView));
-
     // Add the accelerated layer tree hierarchy.
     initialize();
     m_nonCompositedContentLayer->removeAllChildren();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to