[WPE][GTK] Clean up handling of WEBKIT_FORCE_COMPLEX_TEXT
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 16:10:31 +0000 (16:10 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 16:10:31 +0000 (16:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194614

Reviewed by Carlos Garcia Campos.

This environment variable is now enabled for WPE, not just for GTK.

It is now possible to use this environment variable to enable complex text, not just to
disable it.

WebProcessPool::setAlwaysUsesComplexTextCodePath is fixed to be respected even when this
environment variable is set, although WPE and GTK will never do so.

* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformInitializeWebProcess):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp

index e56884b..f1cb78c 100644 (file)
@@ -1,3 +1,22 @@
+2019-02-25  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [WPE][GTK] Clean up handling of WEBKIT_FORCE_COMPLEX_TEXT
+        https://bugs.webkit.org/show_bug.cgi?id=194614
+
+        Reviewed by Carlos Garcia Campos.
+
+        This environment variable is now enabled for WPE, not just for GTK.
+
+        It is now possible to use this environment variable to enable complex text, not just to
+        disable it.
+
+        WebProcessPool::setAlwaysUsesComplexTextCodePath is fixed to be respected even when this
+        environment variable is set, although WPE and GTK will never do so.
+
+        * UIProcess/glib/WebProcessPoolGLib.cpp:
+        (WebKit::WebProcessPool::platformInitialize):
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+
 2019-02-24  Zalan Bujtas  <zalan@apple.com>
 
         Introduce ContentChangeObserver class
index 1c65b3c..205fa6b 100644 (file)
@@ -73,6 +73,12 @@ static bool memoryPressureMonitorDisabled()
 
 void WebProcessPool::platformInitialize()
 {
+#if PLATFORM(GTK)
+    m_alwaysUsesComplexTextCodePath = true;
+#endif
+    if (const char* forceComplexText = getenv("WEBKIT_FORCE_COMPLEX_TEXT"))
+        m_alwaysUsesComplexTextCodePath = !strcmp(forceComplexText, "1");
+
 #if ENABLE(REMOTE_INSPECTOR)
     if (const char* address = g_getenv("WEBKIT_INSPECTOR_SERVER"))
         initializeRemoteInspectorServer(address);
@@ -94,14 +100,6 @@ void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters&
     parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModel::DocumentViewer;
     parameters.proxySettings = m_networkProxySettings;
 
-#if PLATFORM(GTK)
-    // This is misnamed. It can only be used to disable complex text.
-    parameters.shouldAlwaysUseComplexTextCodePath = true;
-    const char* forceComplexText = getenv("WEBKIT_FORCE_COMPLEX_TEXT");
-    if (forceComplexText && !strcmp(forceComplexText, "0"))
-        parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath;
-#endif
-
     if (memoryPressureMonitorDisabled())
         parameters.shouldSuppressMemoryPressureHandler = true;