Hello community,
here is the log from the commit of package seamonkey for openSUSE:11.4
checked in at Wed Aug 17 18:30:34 CEST 2011.
--------
--- old-versions/11.4/UPDATES/all/seamonkey/seamonkey.changes 2011-04-29 07:14:39.000000000 +0200
+++ 11.4/seamonkey/seamonkey.changes 2011-08-16 23:25:26.000000000 +0200
@@ -2 +2 @@
-Fri Apr 22 16:01:12 UTC 2011 - pcerny@novell.com
+Mon Aug 15 10:17:55 UTC 2011 - wr@rosenauer.org
@@ -4 +4,16 @@
-- fixed hunspell patch
+- update to version 2.3 (bnc#712224)
+ included security fixes
+ * CVE-2011-2989/CVE-2011-2991/CVE-2011-2992/CVE-2011-2985
+ Miscellaneous memory safety hazards
+ * CVE-2011-2993 (bmo#657267)
+ Unsigned scripts can call script inside signed JAR
+ * CVE-2011-2988 (bmo#665934)
+ Heap overflow in ANGLE library
+ * CVE-2011-0084 (bmo#648094)
+ Crash in SVGTextElement.getCharNumAtPosition()
+ * CVE-2011-2990
+ Credential leakage using Content Security Policy reports
+ * CVE-2011-2986 (bmo#655836)
+ Cross-origin data theft using canvas and Windows D2D
+ * Gecko 6
+ * removed obsolete mozilla-gio.patch
@@ -7 +22 @@
-Thu Apr 21 20:39:18 UTC 2011 - wr@rosenauer.org
+Fri Jul 8 11:17:15 UTC 2011 - wr@rosenauer.org
@@ -9,4 +24,4 @@
-- security update to version 2.0.14 (bnc#689281)
- * MFSA 2011-12/ CVE-2011-0069 CVE-2011-0070 CVE-2011-0072
- CVE-2011-0074 CVE-2011-0075 CVE-2011-0077 CVE-2011-0078
- CVE-2011-0080 CVE-2011-0081
+- update to version 2.2
+ * Gecko 5
+ included fixes for security issues: (bnc#701296, bnc#700578)
+ * MFSA 2011-19/CVE-2011-2374 CVE-2011-2375
@@ -14,6 +29,32 @@
- * MFSA 2011-13/CVE-2011-0065/CVE-2011-0066/CVE-2011-0073
- Multiple dangling pointer vulnerabilities
- * MFSA 2011-14/CVE-2011-0067 (bmo#527935)
- Information stealing via form history
- * MFSA 2011-18/CVE-2011-1202 (bmo#640339)
- XSLT generate-id() function heap address leak
+ * MFSA 2011-20/CVE-2011-2373 (bmo#617247)
+ Use-after-free vulnerability when viewing XUL document with
+ script disabled
+ * MFSA 2011-21/CVE-2011-2377 (bmo#638018, bmo#639303)
+ Memory corruption due to multipart/x-mixed-replace images
+ * MFSA 2011-22/CVE-2011-2371 (bmo#664009)
+ Integer overflow and arbitrary code execution in
+ Array.reduceRight()
+ * MFSA 2011-25/CVE-2011-2366
+ Stealing of cross-domain images using WebGL textures
+ * MFSA 2011-26/CVE-2011-2367 CVE-2011-2368
+ Multiple WebGL crashes
+ * MFSA 2011-27/CVE-2011-2369 (bmo#650001)
+ XSS encoding hazard with inline SVG
+ * MFSA 2011-28/CVE-2011-2370 (bmo#645699)
+ Non-whitelisted site can trigger xpinstall
+
+-------------------------------------------------------------------
+Mon Jun 13 07:20:26 UTC 2011 - wr@rosenauer.org
+
+- use faster version for find-external-requires.sh
+ (from Petr Cerny)
+- removed obsolete default preferences
+- ported UA locale fix (bnc#582654)
+- updated supported locale RPM tags
+
+-------------------------------------------------------------------
+Fri Jun 10 09:33:25 UTC 2011 - wr@rosenauer.org
+
+- major update to version 2.1
+ * Gecko 2.0 (with all its features)
+- avoid __DATE__ and __TIME__ usage
calling whatdependson for 11.4-i586
Old:
----
l10n-2.0.14.tar.bz2
mozilla-gtkfilepicker-buttonorder.patch
mozilla-path_len.patch
mozilla-startup-notification.patch
mozilla-system-hunspell.patch.bz2
seamonkey-2.0.14-source.tar.bz2
seamonkey-no-update.patch
New:
----
compare-locales.tar.bz2
l10n-2.3.tar.bz2
mozilla-cairo-return.patch
mozilla-language.patch
mozilla-ntlm-full-path.patch
seamonkey-2.3-source.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ seamonkey.spec ++++++
--- /var/tmp/diff_new_pack.t2znKQ/_old 2011-08-17 18:28:56.000000000 +0200
+++ /var/tmp/diff_new_pack.t2znKQ/_new 2011-08-17 18:28:56.000000000 +0200
@@ -20,17 +20,12 @@
Name: seamonkey
-BuildRequires: autoconf213 fdupes gcc-c++ libgnomeui-devel libidl-devel python startup-notification-devel unzip update-desktop-files zip
-%if %suse_version > 1030
-BuildRequires: hunspell-devel
-%endif
-%if %suse_version > 1100
-BuildRequires: nss-shared-helper-devel
-%endif
-License: MPLv1.1 or GPLv2+ or LGPLv2.1+
+BuildRequires: Mesa-devel autoconf213 fdupes gcc-c++ hunspell-devel libgnomeui-devel libidl-devel libiw-devel libnotify-devel libproxy-devel nss-shared-helper-devel python startup-notification-devel unzip update-desktop-files yasm zip
+License: MPLv1.1 or GPLv2+ or LGPLv2+
Provides: web_browser
-Version: 2.0.14
-Release: 0.<RELEASE2>
+Version: 2.3
+Release: 2.<RELEASE2>
+%define releasedate 2011081500
Summary: The successor of the Mozilla Application Suite
Url: http://www.mozilla.org/projects/seamonkey
Group: Productivity/Networking/Web/Browsers
@@ -44,31 +39,30 @@
Source7: seamonkey-rpmlintrc
Source8: find-external-requires.sh
Source9: create-tar.sh
-Patch1: seamonkey-ua-locale.patch
-Patch3: mozilla-nongnome-proxies.patch
-Patch4: mozilla-path_len.patch
-Patch5: mozilla-startup-notification.patch
-Patch6: mozilla-shared-nss-db.patch
-Patch7: seamonkey-shared-nss-db.patch
-Patch8: seamonkey-no-update.patch
-Patch9: mozilla-gtkfilepicker-buttonorder.patch
-Patch10: mozilla-system-hunspell.patch.bz2
-Patch11: mozilla-prefer_plugin_pref.patch
-Patch12: mozilla-cairo-lcd.patch
-Patch13: mozilla-ua-locale.patch
+Source10: compare-locales.tar.bz2
+Patch1: mozilla-nongnome-proxies.patch
+Patch2: mozilla-prefer_plugin_pref.patch
+Patch3: mozilla-shared-nss-db.patch
+Patch4: mozilla-cairo-lcd.patch
+Patch5: mozilla-language.patch
+Patch7: mozilla-cairo-return.patch
+Patch8: mozilla-ntlm-full-path.patch
+Patch10: mozilla-ua-locale.patch
+Patch20: seamonkey-ua-locale.patch
+Patch21: seamonkey-shared-nss-db.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /bin/sh coreutils
Provides: seamonkey-mail = %{version}
Obsoletes: seamonkey-mail <= 2.0
Provides: seamonkey-spellchecker = %{version}
Obsoletes: seamonkey-spellchecker <= 2.0
-%define releasedate 2011042000
%define progname %{name}
%define prefix /usr
%define progdir %_libdir/%{progname}
%define libgssapi libgssapi_krb5.so.2
### build options
%define has_system_cairo 0
+%define localize 1
### build options end
%define _use_internal_dependency_generator 0
%define __find_requires sh %{SOURCE8}
@@ -89,7 +83,7 @@
%package irc
-License: MPLv1.1 or GPLv2+ or LGPLv2.1+
+License: MPLv1.1 or GPLv2+ or LGPLv2+
Summary: IRC for SeaMonkey
Group: Productivity/Networking/IRC
PreReq: %{name} = %{version}
@@ -99,7 +93,7 @@
%package venkman
-License: MPLv1.1 or GPLv2+ or LGPLv2.1+
+License: MPLv1.1 or GPLv2+ or LGPLv2+
Summary: The SeaMonkey JavaScript Debugger
Group: Development/Tools/Debuggers
PreReq: %{name} = %{version}
@@ -109,7 +103,7 @@
%package dom-inspector
-License: MPLv1.1 or GPLv2+ or LGPLv2.1+
+License: MPLv1.1 or GPLv2+ or LGPLv2+
Summary: The SeaMonkey DOM Inspector
Group: Development/Tools/Navigators
PreReq: %{name} = %{version}
@@ -119,9 +113,10 @@
SeaMonkey. This is of great use to people who are doing SeaMonkey
chrome development or web page development.
+%if %localize
%package translations-common
-License: MPLv1.1 or GPLv2+ or LGPLv2.1+
+License: MPLv1.1 or GPLv2+ or LGPLv2+
Summary: Common translations for SeaMonkey
Provides: locale(%{name}:ca;cs;de;es_AR;es_ES;;fr;hu;it;ja;nb_NO;nl;pl;pt_PT;ru;sv_SE)
Group: System/Localization
@@ -133,38 +128,41 @@
%package translations-other
-License: MPLv1.1 or GPLv2+ or LGPLv2.1+
+License: MPLv1.1 or GPLv2+ or LGPLv2+
Summary: Extra translations for SeaMonkey
-Provides: locale(%{name}:be;gl;ka;lt;sk;tr)
+Provides: locale(%{name}:lt;sk;tr)
Group: System/Localization
PreReq: %{name} = %{version}
%description translations-other
This package contains several optional languages for the user interface
of SeaMonkey.
-
+%endif
%prep
-%setup -n seamonkey -b 1 -b 5 -q
+%setup -n seamonkey -b 1 -b 5 -b 10 -q
# mozilla patches
pushd mozilla
-%patch3
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%patch4 -p1
%patch5 -p1
-%patch6 -p1
-%patch9 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-popd
-# comm patches
-%patch1 -p1
%patch7 -p1
%patch8 -p1
-# global patches
%patch10 -p1
+popd
+# comm patches
+%patch20 -p1
+%patch21 -p1
%build
+# no need to add build time to binaries
+modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
+DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
+TIME="\"$(date -d "${modified}" "+%%R")\""
+find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
+#
export SUSE_ASNEEDED=0
export MOZ_BUILD_DATE=%{releasedate}
export MOZILLA_OFFICIAL=1
@@ -178,14 +176,15 @@
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZ_MILESTONE_RELEASE=1
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
ac_add_options --enable-application=suite
ac_add_options --libdir=%{progdir}
ac_add_options --prefix=%{prefix}
-ac_add_options --with-l10n-base=../l10n
+ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug --disable-dtd-debug
-ac_add_options --enable-static
+ac_add_options --enable-libxul
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-jpeg
@@ -196,13 +195,10 @@
ac_add_options --disable-mochitest
ac_add_options --disable-crashreporter
ac_add_options --enable-startup-notification
-#ac_add_options --enable-system-mozldap
-EOF
-%if %suse_version > 1030
-cat << EOF >> $MOZCONFIG
ac_add_options --enable-system-hunspell
+ac_add_options --enable-libproxy
+#ac_add_options --enable-system-mozldap
EOF
-%endif
%if %has_system_cairo
cat << EOF >> $MOZCONFIG
ac_add_options --enable-system-cairo
@@ -212,46 +208,43 @@
#
%install
+cd ../obj
make -C suite/installer STRIP=/bin/true
# copy tree into RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{progdir}
-cp -rf $RPM_BUILD_DIR/seamonkey/mozilla/dist/seamonkey/* $RPM_BUILD_ROOT%{progdir}
+cp -rf $RPM_BUILD_DIR/obj/mozilla/dist/seamonkey/* $RPM_BUILD_ROOT%{progdir}
# remove some executable permissions
find $RPM_BUILD_ROOT%{progdir} -name "*.js" | xargs chmod a-x
+%if %localize
rm -f %{_tmppath}/translations.*
-for locale in $(awk '{ print $1; }' suite/locales/shipped-locales); do
+touch %{_tmppath}/translations.{common,other}
+for locale in $(awk '{ print $1; }' ../seamonkey/suite/locales/shipped-locales); do
case $locale in
ja-JP-mac|en-US)
- # locales not to be included in translations package
;;
*)
- make -C suite/locales libs-$locale || continue
- cp mozilla/dist/xpi-stage/locale-$locale/chrome/$locale.jar \
- $RPM_BUILD_ROOT%{progdir}/chrome
- cp mozilla/dist/xpi-stage/locale-$locale/chrome/$locale.manifest \
- $RPM_BUILD_ROOT%{progdir}/chrome
- #cp mozilla/dist/xpi-stage/chatzilla-$locale/chrome/chatzilla.jar \
- # $RPM_BUILD_ROOT%{progdir}/chrome/chatzilla-$locale.jar
- #cp mozilla/dist/xpi-stage/chatzilla-$locale/chrome/chatzilla.manifest \
- # $RPM_BUILD_ROOT%{progdir}/chrome/chatzilla-$locale.manifest
- #cp mozilla/dist/xpi-stage/venkman-$locale/chrome/venkman.jar \
- # $RPM_BUILD_ROOT%{progdir}/chrome/venkman-$locale.jar
- #cp mozilla/dist/xpi-stage/venkman-$locale/chrome/venkman.jar \
- # $RPM_BUILD_ROOT%{progdir}/chrome/venkman-$locale.manifest
+ pushd $RPM_BUILD_DIR/compare-locales
+ PYTHONPATH=lib \
+ scripts/compare-locales -m ../l10n-merged/$locale \
+ ../seamonkey/suite/locales/l10n-moz2.0.ini ../l10n $locale
+ popd
+ LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
+ make -C suite/locales langpack-$locale || continue
+ cp -r mozilla/dist/xpi-stage/locale-$locale \
+ $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@seamonkey.mozilla.org
+ # remove prefs and profile defaults from langpack
+ rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@seamonkey.mozilla.org/defaults
# check against the fixed common list and sort into the right filelist
_matched=0
for _match in ar ca cs da de en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
[ "$_match" = "$locale" ] && _matched=1
done
[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
- echo %{progdir}/chrome/$locale.jar >> %{_tmppath}/translations.$_l10ntarget
- echo %{progdir}/chrome/$locale.manifest >> %{_tmppath}/translations.$_l10ntarget
- #echo %{progdir}/chrome/chatzilla-$locale.jar >> %{_tmppath}/translations.$_l10ntarget
- #echo %{progdir}/chrome/chatzilla-$locale.manifest >> %{_tmppath}/translations.$_l10ntarget
- #echo %{progdir}/chrome/venkman-$locale.jar >> %{_tmppath}/translations.$_l10ntarget
- #echo %{progdir}/chrome/venkman-$locale.manifest >> %{_tmppath}/translations.$_l10ntarget
+ echo %{progdir}/extensions/langpack-$locale@seamonkey.mozilla.org \
+ >> %{_tmppath}/translations.$_l10ntarget
esac
done
+%endif
# overwrite the mozilla start-script and link it to /usr/bin
mkdir --parents $RPM_BUILD_ROOT%{_bindir}
sed "s:%%PREFIX:%{prefix}:g
@@ -287,6 +280,7 @@
rm -f $RPM_BUILD_ROOT%{progdir}/removed-files
rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
rm -f $RPM_BUILD_ROOT%{progdir}/seamonkey
+rm -f $RPM_BUILD_ROOT%{progdir}/precomplete
rm -f $RPM_BUILD_ROOT%{progdir}/updater
rm -f $RPM_BUILD_ROOT%{progdir}/updater.ini
rm -f $RPM_BUILD_ROOT%{progdir}/update.locale
@@ -326,36 +320,28 @@
%dir %{progdir}/dictionaries/
%dir %{progdir}/extensions/
%dir %{progdir}/chrome/
-%{progdir}/chrome/classic.*
-%{progdir}/chrome/comm.*
-%{progdir}/chrome/en-US.*
-%{progdir}/chrome/gloda.*
-%{progdir}/chrome/messenger.*
-%{progdir}/chrome/newsblog.*
-%{progdir}/chrome/pippki.*
-%{progdir}/chrome/reporter.*
-%{progdir}/chrome/toolkit.*
+%dir %{progdir}/distribution/
+%dir %{progdir}/distribution/extensions/
+#%exclude %{progdir}/distribution/extensions/debugQA@mozilla.org.xpi
%{progdir}/chrome/icons
-%{progdir}/extensions/modern@themes.mozilla.org
-%{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
-%{progdir}/greprefs/
+%{progdir}/extensions/modern@themes.mozilla.org.xpi
+%{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
+#%{progdir}/greprefs/
%{progdir}/isp/
-%{progdir}/modules/
-%{progdir}/plugins/
-%{progdir}/res/
+#%{progdir}/modules/
+#%{progdir}/plugins/
+#%{progdir}/res/
%{progdir}/searchplugins/
%{progdir}/add-plugins.sh
%{progdir}/application.ini
%{progdir}/blocklist.xml
-%{progdir}/libldap60.so
-%{progdir}/libldif60.so
-%{progdir}/libprldap60.so
-%{progdir}/libmozjs.so
-%{progdir}/libsqlite3.so
-%{progdir}/libxpcom_core.so
-%{progdir}/libxpcom.so
+%{progdir}/chrome.manifest
+%{progdir}/dependentlibs.list
+%{progdir}/*.so
%{progdir}/mozilla-xremote-client
+%{progdir}/omni.jar
%{progdir}/platform.ini
+%{progdir}/plugin-container
%{progdir}/%{progname}.sh
%{progdir}/seamonkey-bin
%{_datadir}/applications/*.desktop
@@ -363,20 +349,23 @@
%files irc
%defattr(-,root,root)
-%{progdir}/extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/
+%{progdir}/distribution/extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi
%files venkman
%defattr(-,root,root)
-%{progdir}/extensions/{f13b157f-b174-47e7-a34d-4815ddfdfeb8}/
+%{progdir}/distribution/extensions/{f13b157f-b174-47e7-a34d-4815ddfdfeb8}.xpi
%files dom-inspector
%defattr(-,root,root)
-%{progdir}/extensions/inspector@mozilla.org/
+%{progdir}/distribution/extensions/inspector*.xpi
+
+%if %localize
%files translations-common -f %{_tmppath}/translations.common
%defattr(-,root,root)
%files translations-other -f %{_tmppath}/translations.other
%defattr(-,root,root)
+%endif
%changelog
++++++ create-tar.sh ++++++
--- /var/tmp/diff_new_pack.t2znKQ/_old 2011-08-17 18:28:56.000000000 +0200
+++ /var/tmp/diff_new_pack.t2znKQ/_new 2011-08-17 18:28:56.000000000 +0200
@@ -1,8 +1,8 @@
#!/bin/bash
-BRANCH="releases/comm-1.9.1"
-RELEASE_TAG="SEAMONKEY_2_0_14_RELEASE"
-VERSION="2.0.14"
+BRANCH="releases/comm-release"
+RELEASE_TAG="SEAMONKEY_2_3_RELEASE"
+VERSION="2.3"
echo "cloning $BRANCH..."
hg clone http://hg.mozilla.org/$BRANCH seamonkey
@@ -11,7 +11,7 @@
echo "running client.py..."
[ "$RELEASE_TAG" == "default" ] || \
_extra="--comm-rev=$RELEASE_TAG --mozilla-rev=$RELEASE_TAG --inspector-rev=$RELEASE_TAG --venkman-rev=$RELEASE_TAG --chatzilla-rev=$RELEASE_TAG"
-python client.py checkout $_extra
+python client.py checkout $_extra --mozilla-repo=http://hg.mozilla.org/releases/mozilla-release
popd
echo "creating archive..."
tar cjf seamonkey-$VERSION-source.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS seamonkey
@@ -29,7 +29,7 @@
ja-JP-mac|en-US)
;;
*)
- hg clone http://hg.mozilla.org/releases/l10n-mozilla-1.9.1/$locale l10n/$locale
+ hg clone http://hg.mozilla.org/releases/l10n/mozilla-release/$locale l10n/$locale
hg -R l10n/$locale up -C $RELEASE_TAG
;;
esac
@@ -39,3 +39,7 @@
--exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=calendar \
--exclude=mail \
l10n
+
+# compare-locales
+hg clone http://hg.mozilla.org/build/compare-locales
+tar cjf compare-locales.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales
++++++ find-external-requires.sh ++++++
--- /var/tmp/diff_new_pack.t2znKQ/_old 2011-08-17 18:28:56.000000000 +0200
+++ /var/tmp/diff_new_pack.t2znKQ/_new 2011-08-17 18:28:56.000000000 +0200
@@ -1,23 +1,9 @@
#!/bin/sh
-
# Finds requirements provided outside of the current file set
-filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
-
-provides=`echo "$filelist" | /usr/lib/rpm/find-provides`
-
-{
-for f in $filelist ; do
- echo $f | /usr/lib/rpm/find-requires | while read req ; do
- found=0
- for p in $provides ; do
- if [ "$req" = "$p" ]; then
- found=1
- fi
- done
- if [ "$found" = "0" ]; then
- echo $req
- fi
- done
-done
-} | sort -u
+filelist=$( sed "s/[]['\"*?{}]/\\\\\&/g" )
+provides=$( echo "$filelist" | /usr/lib/rpm/find-provides )
+echo "$filelist" \
+ | /usr/lib/rpm/find-requires \
+ | grep -F -v "$provides" \
+ | sort -u
++++++ l10n-2.0.14.tar.bz2 -> l10n-2.3.tar.bz2 ++++++
old-versions/11.4/UPDATES/all/seamonkey/l10n-2.0.14.tar.bz2 11.4/seamonkey/l10n-2.3.tar.bz2 differ: char 11, line 1
++++++ mozilla-cairo-lcd.patch ++++++
--- /var/tmp/diff_new_pack.t2znKQ/_old 2011-08-17 18:28:56.000000000 +0200
+++ /var/tmp/diff_new_pack.t2znKQ/_new 2011-08-17 18:28:56.000000000 +0200
@@ -1,14 +1,11 @@
-# HG changeset patch
-# Parent 9cabb92310ded84c0108ccae23c170142997466b
-Subject: Add a Cairo LCD filter to use FreeType LCD colour filtering features
-References:
-https://bugzilla.mozilla.org/show_bug.cgi?id=404637
-http://bugs.freedesktop.org/show_bug.cgi?id=10301
+Description: Add a Cairo LCD filter to use FreeType LCD colour filtering features
+Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=404637
+Bug-Cairo: http://bugs.freedesktop.org/show_bug.cgi?id=10301
diff --git a/config/system-headers b/config/system-headers
--- a/config/system-headers
+++ b/config/system-headers
-@@ -258,16 +258,17 @@ Font.h
+@@ -267,16 +267,17 @@ Font.h
Fonts.h
fp.h
fpieee.h
@@ -25,7 +22,7 @@
freetype/t1tables.h
fribidi/fribidi.h
FSp_fopen.h
- fstream.h
+ fstream
diff --git a/gfx/cairo/cairo/src/cairo-font-options.c b/gfx/cairo/cairo/src/cairo-font-options.c
--- a/gfx/cairo/cairo/src/cairo-font-options.c
+++ b/gfx/cairo/cairo/src/cairo-font-options.c
@@ -232,7 +229,7 @@
/* This is the max number of FT_face objects we keep open at once
*/
#define MAX_OPEN_FACES 10
-@@ -746,46 +768,309 @@ _cairo_ft_unscaled_font_set_scale (cairo
+@@ -774,45 +796,309 @@ _cairo_ft_unscaled_font_set_scale (cairo
unscaled->face->available_sizes[best_i].height);
if (error)
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
@@ -549,7 +546,6 @@
int width, height, stride;
unsigned char *data;
int format = CAIRO_FORMAT_A8;
-- cairo_bool_t subpixel = FALSE;
+ cairo_image_surface_t *image;
width = bitmap->width;
@@ -559,7 +555,7 @@
*surface = (cairo_image_surface_t *)
cairo_image_surface_create_for_data (NULL, format, 0, 0, 0);
return (*surface)->base.status;
-@@ -832,154 +1117,63 @@ _get_bitmap_surface (FT_Bitmap *bi
+@@ -859,150 +1145,63 @@ _get_bitmap_surface (FT_Bitmap *bi
}
#endif
format = CAIRO_FORMAT_A1;
@@ -617,18 +613,18 @@
- * Filter the glyph to soften the color fringes
- */
- width_rgba = width;
-+ } else {
-+ /* if we get there, the data from the source bitmap
-+ * really comes from _fill_xrender_bitmap, and is
-+ * made of 32-bit ARGB or ABGR values */
-+ assert (own_buffer != 0);
-+ assert (bitmap->pixel_mode != FT_PIXEL_MODE_GRAY);
++ } else {
++ /* if we get there, the data from the source bitmap
++ * really comes from _fill_xrender_bitmap, and is
++ * made of 32-bit ARGB or ABGR values */
++ assert (own_buffer != 0);
++ assert (bitmap->pixel_mode != FT_PIXEL_MODE_GRAY);
+
-+ data = bitmap->buffer;
++ data = bitmap->buffer;
stride = bitmap->pitch;
- stride_rgba = (width_rgba * 4 + 3) & ~3;
- data_rgba = calloc (stride_rgba, height);
-- if (data_rgba == NULL) {
+- if (unlikely (data_rgba == NULL)) {
- if (own_buffer)
- free (bitmap->buffer);
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
@@ -688,7 +684,6 @@
- data = data_rgba;
- stride = stride_rgba;
format = CAIRO_FORMAT_ARGB32;
-- subpixel = TRUE;
- break;
- }
}
@@ -714,23 +709,20 @@
return (*surface)->base.status;
}
-- if (subpixel)
-- pixman_image_set_component_alpha ((*surface)->pixman_image, TRUE);
--
- _cairo_image_surface_assume_ownership_of_data ((*surface));
+ if (font_options->antialias == CAIRO_ANTIALIAS_SUBPIXEL)
-+ pixman_image_set_component_alpha (image->pixman_image, TRUE);
++ pixman_image_set_component_alpha (image->pixman_image, TRUE);
+
-+ _cairo_image_surface_assume_ownership_of_data (image);
++ _cairo_image_surface_assume_ownership_of_data ((image));
+
+ _cairo_debug_check_image_surface_is_defined (&(*surface)->base);
return CAIRO_STATUS_SUCCESS;
}
/* Converts an outline FT_GlyphSlot into an image
*
- * This could go through _render_glyph_bitmap as well, letting
- * FreeType convert the outline to a bitmap, but doing it ourselves
-@@ -994,129 +1188,171 @@ _get_bitmap_surface (FT_Bitmap *bi
+@@ -1019,129 +1218,169 @@ _get_bitmap_surface (FT_Bitmap *bi
* when we add subpixel support. If so, we may want to eliminate
* this version of the code path entirely.
*/
@@ -757,45 +749,45 @@
+ FT_Render_Mode render_mode = FT_RENDER_MODE_NORMAL;
+
+ switch (font_options->antialias) {
-+ case CAIRO_ANTIALIAS_NONE:
-+ render_mode = FT_RENDER_MODE_MONO;
-+ break;
++ case CAIRO_ANTIALIAS_NONE:
++ render_mode = FT_RENDER_MODE_MONO;
++ break;
+
-+ case CAIRO_ANTIALIAS_SUBPIXEL:
-+ switch (font_options->subpixel_order) {
-+ case CAIRO_SUBPIXEL_ORDER_DEFAULT:
-+ case CAIRO_SUBPIXEL_ORDER_RGB:
-+ case CAIRO_SUBPIXEL_ORDER_BGR:
-+ render_mode = FT_RENDER_MODE_LCD;
-+ break;
-+
-+ case CAIRO_SUBPIXEL_ORDER_VRGB:
-+ case CAIRO_SUBPIXEL_ORDER_VBGR:
-+ render_mode = FT_RENDER_MODE_LCD_V;
-+ break;
-+ }
++ case CAIRO_ANTIALIAS_SUBPIXEL:
++ switch (font_options->subpixel_order) {
++ case CAIRO_SUBPIXEL_ORDER_DEFAULT:
++ case CAIRO_SUBPIXEL_ORDER_RGB:
++ case CAIRO_SUBPIXEL_ORDER_BGR:
++ render_mode = FT_RENDER_MODE_LCD;
++ break;
+
-+ switch (font_options->lcd_filter) {
-+ case CAIRO_LCD_FILTER_NONE:
-+ lcd_filter = FT_LCD_FILTER_NONE;
-+ break;
-+ case CAIRO_LCD_FILTER_DEFAULT:
-+ case CAIRO_LCD_FILTER_INTRA_PIXEL:
-+ lcd_filter = FT_LCD_FILTER_LEGACY;
-+ break;
-+ case CAIRO_LCD_FILTER_FIR3:
-+ lcd_filter = FT_LCD_FILTER_LIGHT;
-+ break;
-+ case CAIRO_LCD_FILTER_FIR5:
-+ lcd_filter = FT_LCD_FILTER_DEFAULT;
-+ break;
-+ }
++ case CAIRO_SUBPIXEL_ORDER_VRGB:
++ case CAIRO_SUBPIXEL_ORDER_VBGR:
++ render_mode = FT_RENDER_MODE_LCD_V;
++ break;
++ }
+
-+ break;
++ switch (font_options->lcd_filter) {
++ case CAIRO_LCD_FILTER_NONE:
++ lcd_filter = FT_LCD_FILTER_NONE;
++ break;
++ case CAIRO_LCD_FILTER_DEFAULT:
++ case CAIRO_LCD_FILTER_INTRA_PIXEL:
++ lcd_filter = FT_LCD_FILTER_LEGACY;
++ break;
++ case CAIRO_LCD_FILTER_FIR3:
++ lcd_filter = FT_LCD_FILTER_LIGHT;
++ break;
++ case CAIRO_LCD_FILTER_FIR5:
++ lcd_filter = FT_LCD_FILTER_DEFAULT;
++ break;
++ }
+
-+ case CAIRO_ANTIALIAS_DEFAULT:
-+ case CAIRO_ANTIALIAS_GRAY:
-+ render_mode = FT_RENDER_MODE_NORMAL;
++ break;
++
++ case CAIRO_ANTIALIAS_DEFAULT:
++ case CAIRO_ANTIALIAS_GRAY:
++ render_mode = FT_RENDER_MODE_NORMAL;
+ }
FT_Outline_Get_CBox (outline, &cbox);
@@ -814,20 +806,20 @@
/* Looks like fb handles zero-sized images just fine */
- switch (font_options->antialias) {
- case CAIRO_ANTIALIAS_NONE:
-+ switch (render_mode) {
-+ case FT_RENDER_MODE_MONO:
++ switch (render_mode) {
++ case FT_RENDER_MODE_MONO:
format = CAIRO_FORMAT_A1;
break;
- case CAIRO_ANTIALIAS_SUBPIXEL:
-+ case FT_RENDER_MODE_LCD:
-+ case FT_RENDER_MODE_LCD_V:
++ case FT_RENDER_MODE_LCD:
++ case FT_RENDER_MODE_LCD_V:
format= CAIRO_FORMAT_ARGB32;
break;
- case CAIRO_ANTIALIAS_DEFAULT:
- case CAIRO_ANTIALIAS_GRAY:
-+ case FT_RENDER_MODE_LIGHT:
-+ case FT_RENDER_MODE_NORMAL:
-+ case FT_RENDER_MODE_MAX:
++ case FT_RENDER_MODE_LIGHT:
++ case FT_RENDER_MODE_NORMAL:
++ case FT_RENDER_MODE_MAX:
default:
format = CAIRO_FORMAT_A8;
break;
@@ -847,27 +839,27 @@
- bitmap.pixel_mode = FT_PIXEL_MODE_MONO;
- bitmap.num_grays = 1;
- stride = ((width + 31) & -32) >> 3;
-+ int bitmap_size;
++ int bitmap_size;
+
-+ switch (render_mode) {
-+ case FT_RENDER_MODE_LCD:
-+ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR) {
-+ rgba = FC_RGBA_BGR;
-+ } else {
-+ rgba = FC_RGBA_RGB;
-+ }
++ switch (render_mode) {
++ case FT_RENDER_MODE_LCD:
++ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR) {
++ rgba = FC_RGBA_BGR;
++ } else {
++ rgba = FC_RGBA_RGB;
++ }
break;
- case CAIRO_ANTIALIAS_DEFAULT:
- case CAIRO_ANTIALIAS_GRAY:
- bitmap.pixel_mode = FT_PIXEL_MODE_GRAY;
- bitmap.num_grays = 256;
- stride = (width + 3) & -4;
-+ case FT_RENDER_MODE_LCD_V:
-+ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR) {
-+ rgba = FC_RGBA_VBGR;
-+ } else {
-+ rgba = FC_RGBA_VRGB;
-+ }
++ case FT_RENDER_MODE_LCD_V:
++ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR) {
++ rgba = FC_RGBA_VBGR;
++ } else {
++ rgba = FC_RGBA_VRGB;
++ }
break;
- case CAIRO_ANTIALIAS_SUBPIXEL:
- switch (font_options->subpixel_order) {
@@ -891,35 +883,35 @@
- bitmap.pixel_mode = FT_PIXEL_MODE_GRAY;
- bitmap.num_grays = 256;
- stride = (width * hmul + 3) & -4;
-+ case FT_RENDER_MODE_MONO:
-+ case FT_RENDER_MODE_LIGHT:
-+ case FT_RENDER_MODE_NORMAL:
-+ case FT_RENDER_MODE_MAX:
-+ default:
-+ break;
++ case FT_RENDER_MODE_MONO:
++ case FT_RENDER_MODE_LIGHT:
++ case FT_RENDER_MODE_NORMAL:
++ case FT_RENDER_MODE_MAX:
++ default:
++ break;
}
- bitmap.pitch = stride;
- bitmap.width = width * hmul;
- bitmap.rows = height * vmul;
- bitmap.buffer = calloc (stride, bitmap.rows);
-+ FT_Library_SetLcdFilter (library, lcd_filter);
++ FT_Library_SetLcdFilter (library, lcd_filter);
+
-+ fterror = FT_Render_Glyph (face->glyph, render_mode);
++ fterror = FT_Render_Glyph (face->glyph, render_mode);
+
-+ FT_Library_SetLcdFilter (library, FT_LCD_FILTER_NONE);
++ FT_Library_SetLcdFilter (library, FT_LCD_FILTER_NONE);
+
-+ if (fterror != 0)
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
++ if (fterror != 0)
++ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
-+ bitmap_size = _compute_xrender_bitmap_size (&bitmap,
-+ face->glyph,
-+ render_mode);
-+ if (bitmap_size < 0)
-+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
++ bitmap_size = _compute_xrender_bitmap_size (&bitmap,
++ face->glyph,
++ render_mode);
++ if (bitmap_size < 0)
++ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
-+ bitmap.buffer = calloc (1, bitmap_size);
- if (bitmap.buffer == NULL)
++ bitmap.buffer = calloc (1, bitmap_size);
+ if (unlikely (bitmap.buffer == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- FT_Outline_Translate (outline, -cbox.xMin*hmul, -cbox.yMin*vmul);
@@ -929,29 +921,26 @@
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- }
-
-+ _fill_xrender_bitmap (&bitmap, face->glyph, render_mode,
-+ (rgba == FC_RGBA_BGR || rgba == FC_RGBA_VBGR));
++ _fill_xrender_bitmap (&bitmap, face->glyph, render_mode,
++ (rgba == FC_RGBA_BGR || rgba == FC_RGBA_VBGR));
+
-+ /* Note:
-+ * _get_bitmap_surface will free bitmap.buffer if there is an error
-+ */
++ /* Note:
++ * _get_bitmap_surface will free bitmap.buffer if there is an error
++ */
status = _get_bitmap_surface (&bitmap, TRUE, font_options, surface);
- if (status)
+ if (unlikely (status))
return status;
+
-+ /* Note: the font's coordinate system is upside down from ours, so the
-+ * Y coordinate of the control box needs to be negated. Moreover,
-+ * device
-+ * offsets are position of glyph origin relative to top left while
-+ * xMin
-+ * and yMax are offsets of top left relative to origin. Another
-+ * negation.
-+ */
-+ cairo_surface_set_device_offset (&(*surface)->base,
-+ (double)-glyphslot->bitmap_left,
-+ (double)+glyphslot->bitmap_top);
++ /* Note: the font's coordinate system is upside down from ours, so the
++ * Y coordinate of the control box needs to be negated. Moreover, device
++ * offsets are position of glyph origin relative to top left while xMin
++ * and yMax are offsets of top left relative to origin. Another negation.
++ */
++ cairo_surface_set_device_offset (&(*surface)->base,
++ (double)-glyphslot->bitmap_left,
++ (double)+glyphslot->bitmap_top);
}
--
+
- /*
- * Note: the font's coordinate system is upside down from ours, so the
- * Y coordinate of the control box needs to be negated. Moreover, device
@@ -970,7 +959,7 @@
_render_glyph_bitmap (FT_Face face,
cairo_font_options_t *font_options,
cairo_image_surface_t **surface)
-@@ -1326,16 +1562,17 @@ _get_pattern_ft_options (FcPattern *patt
+@@ -1350,16 +1589,17 @@ _get_pattern_ft_options (FcPattern *patt
/* disable antialiasing if requested */
if (FcPatternGetBool (pattern,
@@ -988,7 +977,7 @@
if (FcPatternGetInteger (pattern,
FC_RGBA, 0, &rgba) != FcResultMatch)
-@@ -1361,16 +1598,35 @@ _get_pattern_ft_options (FcPattern *patt
+@@ -1385,16 +1625,35 @@ _get_pattern_ft_options (FcPattern *patt
break;
}
@@ -1016,15 +1005,15 @@
+ }
+ }
+
- #ifdef FC_HINT_STYLE
- if (FcPatternGetInteger (pattern,
+ #ifdef FC_HINT_STYLE
+ if (FcPatternGetInteger (pattern,
FC_HINT_STYLE, 0, &hintstyle) != FcResultMatch)
hintstyle = FC_HINT_FULL;
if (!hinting)
hintstyle = FC_HINT_NONE;
-@@ -1462,16 +1718,22 @@ _cairo_ft_options_merge (cairo_ft_option
+@@ -1486,16 +1745,22 @@ _cairo_ft_options_merge (cairo_ft_option
}
if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
@@ -1047,7 +1036,7 @@
load_flags |= FT_LOAD_MONOCHROME;
} else {
switch (options->base.hint_style) {
-@@ -1485,21 +1747,21 @@ _cairo_ft_options_merge (cairo_ft_option
+@@ -1509,21 +1774,21 @@ _cairo_ft_options_merge (cairo_ft_option
break;
case CAIRO_HINT_STYLE_FULL:
case CAIRO_HINT_STYLE_DEFAULT:
@@ -1071,7 +1060,7 @@
}
options->load_flags = load_flags | load_target;
-@@ -2460,16 +2722,44 @@ _cairo_ft_font_options_substitute (const
+@@ -2512,16 +2777,44 @@ _cairo_ft_font_options_substitute (const
rgba = FC_RGBA_NONE;
}
@@ -1120,12 +1109,12 @@
--- a/gfx/cairo/cairo/src/cairo-surface.c
+++ b/gfx/cairo/cairo/src/cairo-surface.c
@@ -68,16 +68,17 @@ const cairo_surface_t name = { \
- 0.0, /* y_fallback_resolution */ \
- NULL, /* clip */ \
- 0, /* next_clip_serial */ \
- 0, /* current_clip_serial */ \
- FALSE, /* is_snapshot */ \
- FALSE, /* has_font_options */ \
+ NULL, /* snapshot_detach */ \
+ { 0, /* size */ \
+ 0, /* num_elements */ \
+ 0, /* element_size */ \
+ NULL, /* elements */ \
+ }, /* snapshots */ \
{ CAIRO_ANTIALIAS_DEFAULT, /* antialias */ \
CAIRO_SUBPIXEL_ORDER_DEFAULT, /* subpixel_order */ \
+ CAIRO_LCD_FILTER_DEFAULT, /* lcd_filter */ \
@@ -1134,13 +1123,13 @@
} /* font_options */ \
}
+ /* XXX error object! */
+
static DEFINE_NIL_SURFACE(CAIRO_STATUS_NO_MEMORY, _cairo_surface_nil);
- static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_CONTENT, _cairo_surface_nil_invalid_content);
- static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_FORMAT, _cairo_surface_nil_invalid_format);
diff --git a/gfx/cairo/cairo/src/cairo-types-private.h b/gfx/cairo/cairo/src/cairo-types-private.h
--- a/gfx/cairo/cairo/src/cairo-types-private.h
+++ b/gfx/cairo/cairo/src/cairo-types-private.h
-@@ -108,19 +108,44 @@ struct _cairo_array {
+@@ -112,19 +112,45 @@ struct _cairo_array {
unsigned int size;
unsigned int num_elements;
unsigned int element_size;
@@ -1149,6 +1138,7 @@
cairo_bool_t is_snapshot;
};
++
+/**
+ * cairo_lcd_filter_t:
+ * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for
@@ -1181,17 +1171,41 @@
cairo_hint_metrics_t hint_metrics;
};
- struct _cairo_cache {
- cairo_hash_table_t *hash_table;
-
- cairo_destroy_func_t entry_destroy;
+ /* XXX: Right now, the _cairo_color structure puts unpremultiplied
+ color in the doubles and premultiplied color in the shorts. Yes,
+ this is crazy insane, (but at least we don't export this
+ madness). I'm still working on a cleaner API, but in the meantime,
diff --git a/gfx/cairo/cairo/src/cairo-xlib-screen.c b/gfx/cairo/cairo/src/cairo-xlib-screen.c
--- a/gfx/cairo/cairo/src/cairo-xlib-screen.c
+++ b/gfx/cairo/cairo/src/cairo-xlib-screen.c
-@@ -145,23 +145,32 @@ get_integer_default (Display *dpy,
+@@ -56,16 +56,23 @@
+ #include "cairo-xlib-private.h"
+ #include "cairo-xlib-xrender-private.h"
+
+ #include "cairo-xlib-surface-private.h"
+
+ #include