зеркало из https://github.com/mozilla/pjs.git
bug 329140
- check for pango rather than gtk2 for non-gtk2 specific code - add pango/cairo cflags where necessary - don't include gtk headers when not needed r=vlad
This commit is contained in:
Родитель
05825942c6
Коммит
68a16dabdd
|
@ -147,3 +147,6 @@ ifdef MOZ_ENABLE_GTK2
|
|||
DEFINES += -DMOZ_ENABLE_GTK2
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_PANGO
|
||||
CXXFLAGS += $(MOZ_PANGO_CFLAGS)
|
||||
endif
|
||||
|
|
|
@ -49,7 +49,7 @@ NS_IMPL_ISUPPORTS1(nsThebesFontMetrics, nsIFontMetrics)
|
|||
|
||||
#if defined(XP_WIN)
|
||||
#include "gfxWindowsFonts.h"
|
||||
#elif defined(MOZ_ENABLE_GTK2)
|
||||
#elif defined(MOZ_ENABLE_PANGO)
|
||||
#include "gfxPangoFonts.h"
|
||||
#elif defined(XP_MACOSX)
|
||||
#include "gfxAtsuiFonts.h"
|
||||
|
@ -96,7 +96,7 @@ nsThebesFontMetrics::Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
|||
|
||||
#if defined(XP_WIN)
|
||||
mFontGroup = new gfxWindowsFontGroup(aFont.name, mFontStyle, (HDC)mDeviceContext->GetHDC());
|
||||
#elif defined(MOZ_ENABLE_GTK2)
|
||||
#elif defined(MOZ_ENABLE_PANGO)
|
||||
mFontGroup = new gfxPangoFontGroup(aFont.name, mFontStyle);
|
||||
#elif defined(XP_MACOSX)
|
||||
mFontGroup = new gfxAtsuiFontGroup(aFont.name, mFontStyle);
|
||||
|
|
|
@ -56,11 +56,12 @@
|
|||
|
||||
#include "cairo.h"
|
||||
|
||||
#ifndef THEBES_USE_PANGO_CAIRO
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkpango.h>
|
||||
|
||||
#ifndef THEBES_USE_PANGO_CAIRO
|
||||
|
||||
#include <freetype/tttables.h>
|
||||
#include <fontconfig/fontconfig.h>
|
||||
|
||||
|
@ -640,6 +641,7 @@ gfxPangoTextRun::EnsurePangoLayout(gfxContext *aContext)
|
|||
if (aContext) {
|
||||
pango_cairo_update_context (aContext->GetCairo(), pf->GetPangoContext());
|
||||
}
|
||||
pango_layout_context_changed (mPangoLayout);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -176,4 +176,8 @@ LOCAL_INCLUDES += \
|
|||
-I$(srcdir)/../svg/base/src
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_CAIRO_GFX
|
||||
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
|
||||
endif
|
||||
|
||||
DEFINES += -D_IMPL_NS_LAYOUT
|
||||
|
|
|
@ -193,6 +193,7 @@ LOCAL_INCLUDES += \
|
|||
-I$(srcdir)/../../content/xul/content/src \
|
||||
-I$(srcdir)/../../content/base/src \
|
||||
-I$(srcdir)/../../content/html/content/src \
|
||||
$(MOZ_CAIRO_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libs::
|
||||
|
|
|
@ -69,5 +69,8 @@ CPPSRCS = \
|
|||
nsViewManager.cpp \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZ_ENABLE_CAIRO_GFX
|
||||
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
|
||||
endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче