[Win][WebKit] Disable accelerated compositing until it is supported
authorchris.reid@sony.com <chris.reid@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2018 07:59:21 +0000 (07:59 +0000)
committerchris.reid@sony.com <chris.reid@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2018 07:59:21 +0000 (07:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187503

Reviewed by Žan Doberšek.

* UIProcess/win/WebView.cpp:

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/win/WebView.cpp

index cf47ddf..3ea8d78 100644 (file)
@@ -1,3 +1,12 @@
+2018-07-11  Christopher Reid  <chris.reid@sony.com>
+
+        [Win][WebKit] Disable accelerated compositing until it is supported
+        https://bugs.webkit.org/show_bug.cgi?id=187503
+
+        Reviewed by Žan Doberšek.
+
+        * UIProcess/win/WebView.cpp:
+
 2018-07-10  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION (r233480): Mail contents flash black when activating
index 1f6a78e..d33f446 100644 (file)
@@ -37,6 +37,7 @@
 #include "WebContextMenuProxyWin.h"
 #include "WebEditCommandProxy.h"
 #include "WebEventFactory.h"
+#include "WebPageGroup.h"
 #include "WebPageProxy.h"
 #include "WebProcessPool.h"
 #include <Commctrl.h>
@@ -219,6 +220,16 @@ WebView::WebView(RECT rect, const API::PageConfiguration& configuration, HWND pa
     ASSERT(m_isVisible == static_cast<bool>(::GetWindowLong(m_window, GWL_STYLE) & WS_VISIBLE));
 
     auto pageConfiguration = configuration.copy();
+    auto* preferences = pageConfiguration->preferences();
+    if (!preferences && pageConfiguration->pageGroup()) {
+        preferences = &pageConfiguration->pageGroup()->preferences();
+        pageConfiguration->setPreferences(preferences);
+    }
+    if (preferences) {
+        // Disable accelerated compositing until it is supported.
+        preferences->setAcceleratedCompositingEnabled(false);
+    }
+
     WebProcessPool* processPool = pageConfiguration->processPool();
     m_page = processPool->createWebPage(*m_pageClient, WTFMove(pageConfiguration));
     m_page->initializeWebPage();