зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1189125 - Allow xpcshell to use GTK (r=karlt)
This commit is contained in:
Родитель
d2ba8ca25d
Коммит
ac32aef2fb
|
@ -612,7 +612,6 @@ ContentChild::Init(MessageLoop* aIOLoop,
|
|||
IPC::Channel* aChannel)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
// sigh
|
||||
gtk_init(nullptr, nullptr);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -65,6 +65,8 @@ bool gfxPlatformGtk::sUseFcFontList = false;
|
|||
|
||||
gfxPlatformGtk::gfxPlatformGtk()
|
||||
{
|
||||
gtk_init(nullptr, nullptr);
|
||||
|
||||
sUseFcFontList = mozilla::Preferences::GetBool("gfx.font_rendering.fontconfig.fontlist.enabled");
|
||||
if (!sUseFcFontList && !sFontconfigUtils) {
|
||||
sFontconfigUtils = gfxFontconfigUtils::GetFontconfigUtils();
|
||||
|
|
|
@ -32,4 +32,8 @@ if CONFIG['_MSC_VER']:
|
|||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
RCINCLUDE = 'xpcshell.rc'
|
||||
|
||||
CFLAGS += CONFIG['TK_CFLAGS']
|
||||
CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
OS_LIBS += CONFIG['TK_LIBS']
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
|
|
@ -25,9 +25,20 @@
|
|||
#include "nsWindowsWMain.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char** argv, char** envp)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
// A default display may or may not be required for xpcshell tests, and so
|
||||
// is not created here. Instead we set the command line args, which is a
|
||||
// fairly cheap operation.
|
||||
gtk_parse_args(&argc, &argv);
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
InitAutoreleasePool();
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче