summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-01-22 17:32:34 +0100
committerRemi Collet <fedora@famillecollet.com>2011-01-22 17:32:34 +0100
commit216a445846c995e88694a2ba65974d48bc3b92b0 (patch)
tree56aeaa941e64f84538389b704a586587c8a57fd2
parent0ecf8798df88632adb2c04e41e1bbe76c1e1c4d8 (diff)
Firefox 4.0b10 build1 candidate
-rwxr-xr-xffxpi31
-rw-r--r--firefox-dev.spec40
-rw-r--r--firefox4-default.patch40
-rw-r--r--firefox4-libjpeg-turbo.patch11
-rw-r--r--xulrunner-2.0-64bit-big-endian.patch40
-rw-r--r--xulrunner-2.0-system-cairo-tee.patch56
-rw-r--r--xulrunner-2.0-system-cairo.patch107
7 files changed, 240 insertions, 85 deletions
diff --git a/ffxpi b/ffxpi
index c0ac423..957ee33 100755
--- a/ffxpi
+++ b/ffxpi
@@ -11,11 +11,12 @@ getxpi() {
then URL=http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$1/linux-i686/xpi
else URL=ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/$1-candidates/$2/linux-i686/xpi/
fi
- # 75 extensions (24+28+24+7)
- for i in af ak ar as be bg bn-BD bn-IN br ca cs cy da de el en-GB en-ZA eo es-AR es-CL es-ES es-MX et eu \
- fa fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja ka kk kn ko ku lg lt lv mk ml mn \
- mr nb-NO nl nn-NO oc or pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE ta-LK ta te th tr \
- uk vi zh-CN zh-TW mai nso son
+ # 83 max extensions (20+20+20+20+3)
+ for i in af ak ar as ast be bg bn-BD bn-IN br ca cs cy da de el en-GB en-ZA eo es-AR \
+ es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it \
+ ja ka kk kn ko ku lg lt lv mai mk ml mn mr nb-NO nl nn-NO nso oc or\
+ pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK te th tr uk \
+ vi zh-CN zh-TW
do echo -en "$i\t"
[ -f $i.xpi ] && echo "already downloaded"
[ -f $i.xpi ] || wget -nv $URL/$i.xpi
@@ -53,6 +54,7 @@ packxpi() {
fi
}
donexpi() {
+ cd ..
if [ x$1 = x ]
then
echo "ERREUR : Numero de version absent !"
@@ -61,22 +63,20 @@ donexpi() {
then
echo "Création de /home/rpmbuild/SOURCES/firefox-langpacks-trunk.tar.bz2"
tar cvjf /home/rpmbuild/SPECS/remirepo/firefox/firefox-langpacks-trunk.tar.bz2 \
- --exclude tmp -C /tmp firefox-langpacks
+ --exclude tmp firefox-langpacks
else
echo "Création de /home/rpmbuild/SPECS/remirepo/firefox/firefox-langpacks-$1-$(date +%Y%m%d).tar.bz2"
tar cvjf /home/rpmbuild/SPECS/remirepo/firefox/firefox-langpacks-$1-$(date +%Y%m%d).tar.bz2 \
- --exclude tmp -C /tmp firefox-langpacks
+ --exclude tmp firefox-langpacks
fi
}
+
+dir=/dev/shm/firefox-langpacks
+
+[ -d $dir ] || (mkdir $dir && echo $dir created)
+cd $dir
+
case "$1" in
-dir) dir=/tmp/firefox-langpacks
- if [ -d $dir ]
- then
- echo $dir exists
- else
- mkdir $dir && echo $dir created
- fi
- ;;
get) getxpi $2 $3
;;
check) checkxpi
@@ -86,7 +86,6 @@ pack) packxpi $2
done) donexpi $2
;;
*) echo -e "\nusage $0 action\n"
- echo -e "\t dir"
echo -e "\t get version [ rc# ]"
echo -e "\t check"
echo -e "\t pack langue"
diff --git a/firefox-dev.spec b/firefox-dev.spec
index a32d168..8967f81 100644
--- a/firefox-dev.spec
+++ b/firefox-dev.spec
@@ -1,5 +1,5 @@
-%define nspr_version 4.8.6
-%define nss_version 3.12.8
+%define nspr_version 4.8.7
+%define nss_version 3.12.9
%define cairo_version 1.10
%define freetype_version 2.1.9
%define lcms_version 1.18
@@ -23,14 +23,15 @@
%define nightly .cvs%{cvsdate}
%endif
-%global relcan b9
-%global firefox firefox
-%global mycomment Beta 9
+%global relcan b10
+%global firefox firefox
+%global mycomment Beta 10 build1 candidate
+%global datelang 20110122
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 4.0
-Release: 0.17.beta9%{?dist}
+Release: 0.18.beta10.build1%{?dist}
URL: http://www.mozilla.org/projects/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
@@ -43,7 +44,7 @@ Group: Applications/Internet
%endif
Source0: %{tarball}
%if %{build_langpacks}
-Source2: firefox-langpacks-%{version}%{?relcan}-20110114.tar.bz2
+Source2: firefox-langpacks-%{version}%{?relcan}-%{datelang}.tar.bz2
%endif
Source12: firefox-redhat-default-prefs.js
# firefox3.destop without translation to allow change name
@@ -64,6 +65,8 @@ Patch11: mozilla-malloc.patch
Patch12: xulrunner-2.0-64bit-big-endian.patch
Patch13: xulrunner-2.0-secondary-jit.patch
Patch14: xulrunner-2.0-chromium-types.patch
+Patch15: xulrunner-2.0-system-cairo.patch
+Patch16: xulrunner-2.0-system-cairo-tee.patch
# Fedora specific patches
Patch20: mozilla-193-pkgconfig.patch
@@ -122,14 +125,14 @@ BuildRequires: wireless-tools-devel
%if %{fedora} >= 15
BuildRequires: sqlite-devel >= %{sqlite_version}
%endif
-%if %{fedora} >= 12
+%if %{fedora} >= 14
BuildRequires: nspr-devel >= %{nspr_version}
BuildRequires: nss-devel >= %{nss_version}
%endif
%if %{fedora} >= 11
BuildRequires: hunspell-devel
%endif
-%if %{fedora} >= 99
+%if %{fedora} >= 15
BuildRequires: cairo-devel >= %{cairo_version}
%endif
%if %{fedora} >= 10
@@ -161,7 +164,7 @@ BuildRequires: mesa-libGL-devel
BuildRequires: yasm
Requires: system-bookmarks
-%if 0%{?fedora} >= 12
+%if 0%{?fedora} >= 14
Requires: nss >= %{nss_version}
Requires: nspr >= %{nspr_version}
%endif
@@ -211,6 +214,10 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{internal_version}/' %{P:%%PATCH0} \
%patch12 -p2 -b .64bit-big-endian
%patch13 -p2 -b .secondary-jit
%patch14 -p2 -b .chromium-types
+%if 0%{?fedora} >= 15
+%patch15 -p1 -b .system-cairo
+%patch16 -p1 -b .system-cairo-tee
+%endif
%patch20 -p2 -b .pk
%if %{fedora} >= 14
@@ -223,7 +230,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{internal_version}/' %{P:%%PATCH0} \
%patch23 -p1 -b .wmclass
#%patch30 -p1 -b .checkupdates
-%patch31 -p2 -b .default
+%patch31 -p1 -b .default
%{__rm} -f .mozconfig
@@ -238,14 +245,14 @@ ac_add_options --libdir="\$LIBDIR"
%if %{fedora} >= 15
ac_add_options --enable-system-sqlite
%endif
-%if %{fedora} >= 12
-#ac_add_options --with-system-nspr
+%if %{fedora} >= 14
+ac_add_options --with-system-nspr
ac_add_options --with-system-nss
%endif
%if %{fedora} >= 11
ac_add_options --enable-system-hunspell
%endif
-%if %{fedora} >= 99
+%if %{fedora} >= 15
ac_add_options --enable-system-cairo
%endif
%if %{fedora} >= 10
@@ -569,6 +576,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Sat Jan 22 2011 Remi Collet <rpms@famillecollet.com> - 4.0-0.18.beta10.build1
+- update to 4.0b10 build1 candidate
+- switch back to system cairo (patches from rawhide)
+- BR nss >= 3.12.9, nspr >= 4.8.7
+
* Fri Jan 14 2011 Remi Collet <rpms@famillecollet.com> - 4.0-0.17.beta9
- update to 4.0b9
diff --git a/firefox4-default.patch b/firefox4-default.patch
index a6c61f1..d1e027f 100644
--- a/firefox4-default.patch
+++ b/firefox4-default.patch
@@ -1,7 +1,7 @@
-diff -up firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul.default firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul
---- firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul.default 2010-08-06 03:08:58.000000000 +0200
-+++ firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul 2010-08-30 16:35:21.000000000 +0200
-@@ -183,10 +183,11 @@
+diff -up mozilla-central/browser/components/preferences/advanced.xul.default mozilla-central/browser/components/preferences/advanced.xul
+--- mozilla-central/browser/components/preferences/advanced.xul.default 2011-01-22 01:24:21.000000000 +0100
++++ mozilla-central/browser/components/preferences/advanced.xul 2011-01-22 16:48:18.522166468 +0100
+@@ -194,10 +194,11 @@
</groupbox>
#ifdef HAVE_SHELL_SERVICE
@@ -14,7 +14,7 @@ diff -up firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul
<hbox id="checkDefaultBox" align="center" flex="1">
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
-@@ -196,6 +197,7 @@
+@@ -207,6 +208,7 @@
oncommand="gAdvancedPane.checkNow()"
preference="pref.general.disable_button.default_browser"/>
</hbox>
@@ -22,7 +22,7 @@ diff -up firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul
#ifdef MOZ_CRASHREPORTER
<checkbox id="submitCrashesBox" flex="1"
oncommand="gAdvancedPane.updateSubmitCrashes();"
-@@ -203,6 +205,7 @@
+@@ -214,6 +216,7 @@
#endif
</groupbox>
#endif
@@ -30,9 +30,9 @@ diff -up firefox-4.0/mozilla-central/browser/components/preferences/advanced.xul
</tabpanel>
<!-- Network -->
-diff -up firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp.default firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp
---- firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp.default 2010-08-06 03:08:59.000000000 +0200
-+++ firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp 2010-08-30 16:37:41.000000000 +0200
+diff -up mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp.default mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp
+--- mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp.default 2011-01-22 01:24:22.000000000 +0100
++++ mozilla-central/browser/components/shell/src/nsGNOMEShellService.cpp 2011-01-22 16:51:39.616884957 +0100
@@ -140,27 +140,21 @@ NS_IMPL_ISUPPORTS1(nsGNOMEShellService,
PRBool
nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const
@@ -69,17 +69,17 @@ diff -up firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellSe
@@ -215,8 +209,8 @@ nsGNOMEShellService::SetDefaultBrowser(P
nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
-
-- nsCAutoString appKeyValue(mAppPath);
-- appKeyValue.Append(" \"%s\"");
-+ nsCAutoString appKeyValue(MOZ_APP_NAME);
-+ appKeyValue.Append(" %s");
- unsigned int i;
-
- for (i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) {
-diff -up firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.h.default firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.h
---- firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.h.default 2010-08-06 03:08:59.000000000 +0200
-+++ firefox-4.0/mozilla-central/browser/components/shell/src/nsGNOMEShellService.h 2010-08-30 16:35:22.000000000 +0200
+ if (gconf) {
+- nsCAutoString appKeyValue(mAppPath);
+- appKeyValue.Append(" \"%s\"");
++ nsCAutoString appKeyValue(MOZ_APP_NAME);
++ appKeyValue.Append(" %s");
+ for (unsigned int i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) {
+ if (appProtocols[i].essential || aClaimAllTypes) {
+ gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name),
+diff -up mozilla-central/browser/components/shell/src/nsGNOMEShellService.h.default mozilla-central/browser/components/shell/src/nsGNOMEShellService.h
+--- mozilla-central/browser/components/shell/src/nsGNOMEShellService.h.default 2011-01-22 01:24:22.000000000 +0100
++++ mozilla-central/browser/components/shell/src/nsGNOMEShellService.h 2011-01-22 16:48:18.523166485 +0100
@@ -43,7 +43,7 @@
class nsGNOMEShellService : public nsIShellService
{
diff --git a/firefox4-libjpeg-turbo.patch b/firefox4-libjpeg-turbo.patch
index 3aadec4..c2fee7f 100644
--- a/firefox4-libjpeg-turbo.patch
+++ b/firefox4-libjpeg-turbo.patch
@@ -1,11 +1,12 @@
---- mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2010-11-04 21:06:43.000000000 +0100
-+++ mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2010-11-06 10:46:04.081880464 +0100
-@@ -411,14 +411,6 @@
+diff -up mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp
+--- mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2011-01-22 01:28:24.000000000 +0100
++++ mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2011-01-22 16:47:15.003018762 +0100
+@@ -416,14 +416,6 @@ nsJPEGDecoder::WriteInternal(const char
return; /* I/O suspension */
}
- /* Force to use our YCbCr to Packed RGB converter when possible */
-- if (!mTransform && (gfxPlatform::GetCMSMode() != eCMSMode_All) &&
+- if (!mTransform && (mCMSMode != eCMSMode_All) &&
- mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
- /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
- mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
@@ -15,7 +16,7 @@
/* If this is a progressive JPEG ... */
mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
}
-@@ -563,15 +555,6 @@
+@@ -568,15 +560,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s
PRUint32 *imageRow = ((PRUint32*)mImageData) +
(mInfo.output_scanline * mInfo.output_width);
diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch
index d1d63e8..a8680ae 100644
--- a/xulrunner-2.0-64bit-big-endian.patch
+++ b/xulrunner-2.0-64bit-big-endian.patch
@@ -1,31 +1,11 @@
-diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 xulrunner-2.0/mozilla-central/js/src/jsval.h
---- xulrunner-2.0/mozilla-central/js/src/jsval.h.s390 2010-11-15 10:43:49.000000000 +0100
-+++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2010-11-15 10:45:41.000000000 +0100
-@@ -331,6 +331,27 @@ typedef union jsval_layout
+diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h
+--- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100
++++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100
+@@ -347,6 +347,7 @@ typedef union jsval_layout
+ int32 i32;
+ uint32 u32;
+ JSWhyMagic why;
++ jsuword word;
+ } payload;
+ } s;
double asDouble;
- void *asPtr;
- } jsval_layout;
-+# elif JS_BITS_PER_WORD == 64
-+typedef union jsval_layout
-+{
-+ uint64 asBits;
-+#ifndef _WIN64
-+ /* MSVC does not pack these correctly :-( */
-+ struct {
-+ uint64 payload47 : 47;
-+ JSValueTag tag : 17;
-+ } debugView;
-+#endif
-+ struct {
-+ union {
-+ int32 i32;
-+ uint32 u32;
-+ JSWhyMagic why;
-+ } payload;
-+ } s;
-+ double asDouble;
-+ void *asPtr;
-+} jsval_layout;
- # endif /* JS_BITS_PER_WORD */
- #endif /* defined(IS_LITTLE_ENDIAN) */
-
diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch
new file mode 100644
index 0000000..4bc1c82
--- /dev/null
+++ b/xulrunner-2.0-system-cairo-tee.patch
@@ -0,0 +1,56 @@
+diff -up mozilla-central/gfx/thebes/gfxContext.cpp.system-cairo-tee mozilla-central/gfx/thebes/gfxContext.cpp
+--- mozilla-central/gfx/thebes/gfxContext.cpp.system-cairo-tee 2011-01-22 01:25:38.000000000 +0100
++++ mozilla-central/gfx/thebes/gfxContext.cpp 2011-01-22 16:36:13.796269437 +0100
+@@ -782,6 +782,7 @@ gfxContext::PushGroupAndCopyBackground(g
+ cairo_push_group_with_content(mCairo, CAIRO_CONTENT_COLOR);
+ nsRefPtr<gfxASurface> d = CurrentSurface();
+
++#if CAIRO_HAS_TEE_SURFACE
+ if (d->GetType() == gfxASurface::SurfaceTypeTee) {
+ NS_ASSERTION(s->GetType() == gfxASurface::SurfaceTypeTee, "Mismatched types");
+ nsAutoTArray<nsRefPtr<gfxASurface>,2> ss;
+@@ -793,7 +794,9 @@ gfxContext::PushGroupAndCopyBackground(g
+ for (PRUint32 i = 0; i < ss.Length(); ++i) {
+ CopySurface(ss[i], ds[i], translation);
+ }
+- } else {
++ } else
++#endif
++ {
+ CopySurface(s, d, gfxPoint(0, 0));
+ }
+ d->SetOpaqueRect(s->GetOpaqueRect());
+diff -up mozilla-central/gfx/thebes/gfxTeeSurface.cpp.system-cairo-tee mozilla-central/gfx/thebes/gfxTeeSurface.cpp
+--- mozilla-central/gfx/thebes/gfxTeeSurface.cpp.system-cairo-tee 2011-01-22 01:25:38.000000000 +0100
++++ mozilla-central/gfx/thebes/gfxTeeSurface.cpp 2011-01-22 16:32:36.626717637 +0100
+@@ -39,6 +39,7 @@
+
+ #include "cairo.h"
+
++#if CAIRO_HAS_TEE_SURFACE
+ gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf)
+ {
+ Init(csurf, PR_TRUE);
+@@ -75,3 +76,4 @@ gfxTeeSurface::GetSurfaces(nsTArray<nsRe
+ *elem = Wrap(csurf);
+ }
+ }
++#endif
+diff -up mozilla-central/gfx/thebes/gfxTeeSurface.h.system-cairo-tee mozilla-central/gfx/thebes/gfxTeeSurface.h
+--- mozilla-central/gfx/thebes/gfxTeeSurface.h.system-cairo-tee 2011-01-22 01:25:38.000000000 +0100
++++ mozilla-central/gfx/thebes/gfxTeeSurface.h 2011-01-22 16:39:27.912850300 +0100
+@@ -41,6 +41,7 @@
+ #include "gfxASurface.h"
+ #include "nsTArray.h"
+
++#if CAIRO_HAS_TEE_SURFACE
+ /**
+ * Wraps a cairo_tee_surface. The first surface in the surface list is the
+ * primary surface, which answers all surface queries (including size).
+@@ -62,5 +63,6 @@ public:
+ */
+ void GetSurfaces(nsTArray<nsRefPtr<gfxASurface> > *aSurfaces);
+ };
++#endif
+
+ #endif /* GFX_TEESURFACE_H */
diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch
new file mode 100644
index 0000000..20f236f
--- /dev/null
+++ b/xulrunner-2.0-system-cairo.patch
@@ -0,0 +1,107 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=623797
+
+work around new features that are not avaliable in system-cairo on linux
+(romaxa's patch with modification for return failure with <gcc-4.5)
+
+diff --git a/config/system-headers b/config/system-headers
+--- a/config/system-headers
++++ b/config/system-headers
+@@ -81,16 +81,17 @@ pixman.h
+ cairo.h
+ cairo-atsui.h
+ cairo-beos.h
+ cairo-ft.h
+ cairo-glitz.h
+ cairo-os2.h
+ cairo-pdf.h
+ cairo-ps.h
++cairo-tee.h
+ cairo-quartz.h
+ cairo-win32.h
+ cairo-xlib.h
+ cairo-xlib-xrender.h
+ cairo-directfb.h
+ cairo-qpainter.h
+ #endif
+ dfiff.h
+diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp
+--- a/gfx/thebes/gfxASurface.cpp
++++ b/gfx/thebes/gfxASurface.cpp
+@@ -216,19 +216,21 @@ gfxASurface::Init(cairo_surface_t* surfa
+
+ mSurface = surface;
+ mSurfaceValid = PR_TRUE;
+
+ if (existingSurface) {
+ mFloatingRefs = 0;
+ } else {
+ mFloatingRefs = 1;
++#ifdef MOZ_TREE_CAIRO
+ if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) {
+ cairo_surface_set_subpixel_antialiasing(surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
+ }
++#endif
+ }
+ }
+
+ gfxASurface::gfxSurfaceType
+ gfxASurface::GetType() const
+ {
+ if (!mSurfaceValid)
+ return (gfxSurfaceType)-1;
+@@ -432,26 +434,32 @@ gfxASurface::FormatFromContent(gfxASurfa
+ }
+ }
+
+ void
+ gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled)
+ {
+ if (!mSurfaceValid)
+ return;
++#ifdef MOZ_TREE_CAIRO
+ cairo_surface_set_subpixel_antialiasing(mSurface,
+ aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
++#endif
+ }
+
+ PRBool
+ gfxASurface::GetSubpixelAntialiasingEnabled()
+ {
+ if (!mSurfaceValid)
+ return PR_FALSE;
++#ifdef MOZ_TREE_CAIRO
+ return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED;
++#else
++ return PR_TRUE;
++#endif
+ }
+
+ PRInt32
+ gfxASurface::BytePerPixelFromFormat(gfxImageFormat format)
+ {
+ switch (format) {
+ case ImageFormatARGB32:
+ case ImageFormatRGB24:
+diff --git a/js/src/config/system-headers b/js/src/config/system-headers
+--- a/js/src/config/system-headers
++++ b/js/src/config/system-headers
+@@ -82,16 +82,17 @@ cairo.h
+ cairo-atsui.h
+ cairo-beos.h
+ cairo-ft.h
+ cairo-glitz.h
+ cairo-os2.h
+ cairo-pdf.h
+ cairo-ps.h
+ cairo-quartz.h
++cairo-tee.h
+ cairo-win32.h
+ cairo-xlib.h
+ cairo-xlib-xrender.h
+ cairo-directfb.h
+ cairo-qpainter.h
+ #endif
+ dfiff.h
+ exception
+
+