mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-27 00:10:29 +00:00
extra/firefox to 56.0-1
This commit is contained in:
parent
868a0694ef
commit
81443e9ec9
7 changed files with 245 additions and 221 deletions
|
@ -0,0 +1,117 @@
|
||||||
|
From 2874ecd82e9671f774bdfda41fe0857fcb916c13 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <2874ecd82e9671f774bdfda41fe0857fcb916c13.1506634385.git.jan.steffens@gmail.com>
|
||||||
|
From: Mike Hommey <mh+mozilla@glandium.org>
|
||||||
|
Date: Wed, 16 Aug 2017 13:16:16 +0900
|
||||||
|
Subject: [PATCH] Bug 1384062 - Make SystemResourceMonitor.stop more resilient
|
||||||
|
to errors. r=ahal,gps
|
||||||
|
|
||||||
|
The poll() call in SystemResourceMonitor.stop might fail even though
|
||||||
|
there is something to read from the pipe, in some corner cases, and
|
||||||
|
python won't let us know about it. In that case, an exception is thrown,
|
||||||
|
leaving the SystemResourceMonitor (and its callers) in a weird state. In
|
||||||
|
practice, this leads BuildMonitor.__exit__ to recall stop, which then
|
||||||
|
fails.
|
||||||
|
|
||||||
|
So when poll() throws an exception, we pretend there's still something
|
||||||
|
to read, and we try to read anyways. If there is something to read,
|
||||||
|
recv() will return it, otherwise, it will throw an exception of its own,
|
||||||
|
which we catch, pretending we're done.
|
||||||
|
|
||||||
|
Furthermore, when there is nothing to read from the pipe, poll() simply
|
||||||
|
returns False, and our loop never sets `done` to True, and we then hit
|
||||||
|
an assert, which doesn't have its place here, so we remove it.
|
||||||
|
|
||||||
|
Finally, the other end of the pipe might have died at any time, making
|
||||||
|
sending over the pipe fail, so we also protect against that.
|
||||||
|
|
||||||
|
With all these changes, it feels like the reason to backout bug 1239939
|
||||||
|
in bug 1272782 should have been dealt with, and we can drop the timeout
|
||||||
|
again.
|
||||||
|
|
||||||
|
--HG--
|
||||||
|
extra : rebase_source : ac72dd5b2602cf3ffddfb429f95e02380f939893
|
||||||
|
---
|
||||||
|
.../mozsystemmonitor/resourcemonitor.py | 38 +++++++++++++++-------
|
||||||
|
1 file changed, 26 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py
|
||||||
|
index 8f2ac95cbe505540..38f9bc986ac2a120 100644
|
||||||
|
--- a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py
|
||||||
|
+++ b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py
|
||||||
|
@@ -289,47 +289,61 @@ class SystemResourceMonitor(object):
|
||||||
|
assert self._running
|
||||||
|
assert not self._stopped
|
||||||
|
|
||||||
|
- self._pipe.send(('terminate',))
|
||||||
|
+ try:
|
||||||
|
+ self._pipe.send(('terminate',))
|
||||||
|
+ except Exception:
|
||||||
|
+ pass
|
||||||
|
self._running = False
|
||||||
|
self._stopped = True
|
||||||
|
|
||||||
|
self.measurements = []
|
||||||
|
|
||||||
|
- done = False
|
||||||
|
-
|
||||||
|
# The child process will send each data sample over the pipe
|
||||||
|
# as a separate data structure. When it has finished sending
|
||||||
|
# samples, it sends a special "done" message to indicate it
|
||||||
|
# is finished.
|
||||||
|
- while self._pipe.poll(1.0):
|
||||||
|
- start_time, end_time, io_diff, cpu_diff, cpu_percent, virt_mem, \
|
||||||
|
- swap_mem = self._pipe.recv()
|
||||||
|
+
|
||||||
|
+ # multiprocessing.Pipe is not actually a pipe on at least Linux. that
|
||||||
|
+ # has an effect on the expected outcome of reading from it when the
|
||||||
|
+ # other end of the pipe dies, leading to possibly hanging on revc()
|
||||||
|
+ # below. So we must poll().
|
||||||
|
+ def poll():
|
||||||
|
+ try:
|
||||||
|
+ return self._pipe.poll(0.1)
|
||||||
|
+ except Exception:
|
||||||
|
+ # Poll might throw an exception even though there's still
|
||||||
|
+ # data to read. That happens when the underlying system call
|
||||||
|
+ # returns both POLLERR and POLLIN, but python doesn't tell us
|
||||||
|
+ # about it. So assume there is something to read, and we'll
|
||||||
|
+ # get an exception when trying to read the data.
|
||||||
|
+ return True
|
||||||
|
+ while poll():
|
||||||
|
+ try:
|
||||||
|
+ start_time, end_time, io_diff, cpu_diff, cpu_percent, virt_mem, \
|
||||||
|
+ swap_mem = self._pipe.recv()
|
||||||
|
+ except Exception:
|
||||||
|
+ # Let's assume we're done here
|
||||||
|
+ break
|
||||||
|
|
||||||
|
# There should be nothing after the "done" message so
|
||||||
|
# terminate.
|
||||||
|
if start_time == 'done':
|
||||||
|
- done = True
|
||||||
|
break
|
||||||
|
|
||||||
|
io = self._io_type(*io_diff)
|
||||||
|
virt = self._virt_type(*virt_mem)
|
||||||
|
swap = self._swap_type(*swap_mem)
|
||||||
|
cpu_times = [self._cpu_times_type(*v) for v in cpu_diff]
|
||||||
|
|
||||||
|
self.measurements.append(SystemResourceUsage(start_time, end_time,
|
||||||
|
cpu_times, cpu_percent, io, virt, swap))
|
||||||
|
|
||||||
|
# We establish a timeout so we don't hang forever if the child
|
||||||
|
# process has crashed.
|
||||||
|
self._process.join(10)
|
||||||
|
if self._process.is_alive():
|
||||||
|
self._process.terminate()
|
||||||
|
self._process.join(10)
|
||||||
|
- else:
|
||||||
|
- # We should have received a "done" message from the
|
||||||
|
- # child indicating it shut down properly. This only
|
||||||
|
- # happens if the child shuts down cleanly.
|
||||||
|
- assert done
|
||||||
|
|
||||||
|
if len(self.measurements):
|
||||||
|
self.start_time = self.measurements[0].start
|
||||||
|
--
|
||||||
|
2.14.2
|
||||||
|
|
|
@ -13,38 +13,38 @@ buildarch=12
|
||||||
highmem=1
|
highmem=1
|
||||||
|
|
||||||
pkgname=firefox
|
pkgname=firefox
|
||||||
pkgver=55.0.3
|
pkgver=56.0
|
||||||
pkgrel=3
|
pkgrel=1
|
||||||
pkgdesc="Standalone web browser from mozilla.org"
|
pkgdesc="Standalone web browser from mozilla.org"
|
||||||
arch=(i686 x86_64)
|
arch=(i686 x86_64)
|
||||||
license=(MPL GPL LGPL)
|
license=(MPL GPL LGPL)
|
||||||
url="https://www.mozilla.org/firefox/"
|
url="https://www.mozilla.org/firefox/"
|
||||||
depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib alsa-lib ffmpeg
|
depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib alsa-lib ffmpeg
|
||||||
nss hunspell sqlite ttf-font libpulse icu)
|
nss hunspell sqlite ttf-font libpulse)
|
||||||
makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb
|
makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb
|
||||||
autoconf2.13 rust)
|
autoconf2.13 rust mercurial clang llvm jack)
|
||||||
optdepends=('networkmanager: Location detection via available WiFi networks'
|
optdepends=('networkmanager: Location detection via available WiFi networks'
|
||||||
'libnotify: Notification integration'
|
'libnotify: Notification integration'
|
||||||
'pulseaudio: Audio support'
|
'pulseaudio: Audio support'
|
||||||
'speech-dispatcher: Text-to-Speech')
|
'speech-dispatcher: Text-to-Speech')
|
||||||
options=(!emptydirs !makeflags !strip)
|
options=(!emptydirs !makeflags !strip)
|
||||||
source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
||||||
$pkgname.desktop firefox-symbolic.svg
|
|
||||||
wifi-disentangle.patch wifi-fix-interface.patch
|
wifi-disentangle.patch wifi-fix-interface.patch
|
||||||
clip-ft-glyph.diff harmony-fix.diff
|
0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch
|
||||||
firefox-install-dir.patch no-crmf.diff glibc-2.26-fix.diff
|
no-plt.diff plugin-crash.diff glibc-2.26-fix.diff
|
||||||
|
$pkgname.desktop firefox-symbolic.svg firefox-install-dir.patch
|
||||||
rhbz-1354671.patch
|
rhbz-1354671.patch
|
||||||
https://src.fedoraproject.org/rpms/firefox/raw/master/f/build-cubeb-pulse-arm.patch)
|
https://src.fedoraproject.org/rpms/firefox/raw/master/f/build-cubeb-pulse-arm.patch)
|
||||||
sha256sums=('891836df85f8798c49f7b25661820f64d1311d59703c716eda471819b93ccda2'
|
sha256sums=('891836df85f8798c49f7b25661820f64d1311d59703c716eda471819b93ccda2'
|
||||||
'ada313750e6fb14558b37c764409a17c1672a351a46c73b350aa1fe4ea9220ef'
|
|
||||||
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
|
|
||||||
'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
|
'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
|
||||||
'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
|
'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
|
||||||
'd5e5580a96ecc4a66ce12dde0737c1ed5cb31017a6ec488ffe372192ed893e1b'
|
'aba767995ffb1a55345e30aaba667f43d469e23bd9b1b68263cf71b8118acc96'
|
||||||
'16bb776e9f3039321db747b2eaece0cda1320f3711fb853a68d67247b0aa065d'
|
'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa'
|
||||||
'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
|
'a7e5d2430bb562f6367deb07417dad4368317e8e8be5d1cfa842c3356de3cfc0'
|
||||||
'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb'
|
|
||||||
'cd7ff441da66a287f8712e60cdc9e216c30355d521051e2eaae28a66d81915e8'
|
'cd7ff441da66a287f8712e60cdc9e216c30355d521051e2eaae28a66d81915e8'
|
||||||
|
'ada313750e6fb14558b37c764409a17c1672a351a46c73b350aa1fe4ea9220ef'
|
||||||
|
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
|
||||||
|
'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
|
||||||
'22d5e5c07e759422027867121b24cdbcab8812670ca8e2e92825029f30eecbbd'
|
'22d5e5c07e759422027867121b24cdbcab8812670ca8e2e92825029f30eecbbd'
|
||||||
'434298ee0e91990967af03614c0d3232024e35dd38ca9f7dce52a8a7363e2382')
|
'434298ee0e91990967af03614c0d3232024e35dd38ca9f7dce52a8a7363e2382')
|
||||||
validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A')
|
validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A')
|
||||||
|
@ -69,22 +69,22 @@ prepare() {
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
patch -Np1 -i ../firefox-install-dir.patch
|
patch -Np1 -i ../firefox-install-dir.patch
|
||||||
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1371991
|
|
||||||
patch -Np1 -i ../no-crmf.diff
|
|
||||||
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1385667
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1394149
|
|
||||||
patch -Np1 -i ../glibc-2.26-fix.diff
|
|
||||||
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
|
||||||
patch -Np1 -i ../wifi-disentangle.patch
|
patch -Np1 -i ../wifi-disentangle.patch
|
||||||
patch -Np1 -i ../wifi-fix-interface.patch
|
patch -Np1 -i ../wifi-fix-interface.patch
|
||||||
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1393467
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1384062
|
||||||
patch -Np1 -i ../clip-ft-glyph.diff
|
patch -Np1 -i ../0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch
|
||||||
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1400721
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1382942
|
||||||
patch -Np1 -i ../harmony-fix.diff
|
patch -Np1 -i ../no-plt.diff
|
||||||
|
|
||||||
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1400175
|
||||||
|
patch -Np1 -i ../plugin-crash.diff
|
||||||
|
|
||||||
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1385667
|
||||||
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1394149
|
||||||
|
patch -Np1 -i ../glibc-2.26-fix.diff
|
||||||
|
|
||||||
echo -n "$_google_api_key" >google-api-key
|
echo -n "$_google_api_key" >google-api-key
|
||||||
echo -n "$_mozilla_api_key" >mozilla-api-key
|
echo -n "$_mozilla_api_key" >mozilla-api-key
|
||||||
|
@ -114,17 +114,15 @@ ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key
|
||||||
ac_add_options --disable-webrtc
|
ac_add_options --disable-webrtc
|
||||||
|
|
||||||
# System libraries
|
# System libraries
|
||||||
ac_add_options --with-system-nspr
|
|
||||||
ac_add_options --with-system-nss
|
|
||||||
ac_add_options --with-system-icu
|
|
||||||
ac_add_options --with-system-zlib
|
ac_add_options --with-system-zlib
|
||||||
ac_add_options --with-system-bz2
|
ac_add_options --with-system-bz2
|
||||||
ac_add_options --enable-system-hunspell
|
ac_add_options --enable-system-hunspell
|
||||||
ac_add_options --enable-system-sqlite
|
ac_add_options --enable-system-sqlite
|
||||||
ac_add_options --enable-system-ffi
|
ac_add_options --enable-system-ffi
|
||||||
ac_add_options --enable-system-pixman
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
ac_add_options --enable-alsa
|
||||||
|
ac_add_options --enable-jack
|
||||||
ac_add_options --enable-startup-notification
|
ac_add_options --enable-startup-notification
|
||||||
ac_add_options --disable-crashreporter
|
ac_add_options --disable-crashreporter
|
||||||
ac_add_options --disable-updater
|
ac_add_options --disable-updater
|
||||||
|
@ -223,4 +221,8 @@ END
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
||||||
ln -srf "$pkgdir/usr/bin/$pkgname" \
|
ln -srf "$pkgdir/usr/bin/$pkgname" \
|
||||||
"$pkgdir/usr/lib/$pkgname/firefox-bin"
|
"$pkgdir/usr/lib/$pkgname/firefox-bin"
|
||||||
|
|
||||||
|
# Use system certificates
|
||||||
|
ln -srf "$pkgdir/usr/lib/libnssckbi.so" \
|
||||||
|
"$pkgdir/usr/lib/$pkgname/libnssckbi.so"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,162 +0,0 @@
|
||||||
# HG changeset patch
|
|
||||||
# User Lee Salzman <lsalzman@mozilla.com>
|
|
||||||
# Date 1504120456 14400
|
|
||||||
# Wed Aug 30 15:14:16 2017 -0400
|
|
||||||
# Node ID 708d52f954b6d7ca2497fcb5b5084c6483300e89
|
|
||||||
# Parent 33224536ce20d942576cd4b9ffb350d6dce397bc
|
|
||||||
clip FreeType glyph bitmap to mask in Skia
|
|
||||||
|
|
||||||
MozReview-Commit-ID: 9NqLj9SkHFo
|
|
||||||
|
|
||||||
diff --git a/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp b/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
|
||||||
--- a/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
|
||||||
+++ b/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
|
||||||
@@ -390,65 +390,131 @@ void SkScalerContext_FreeType_Base::gene
|
|
||||||
const SkMatrix& bitmapTransform)
|
|
||||||
{
|
|
||||||
const bool doBGR = SkToBool(fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag);
|
|
||||||
const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag);
|
|
||||||
|
|
||||||
switch ( face->glyph->format ) {
|
|
||||||
case FT_GLYPH_FORMAT_OUTLINE: {
|
|
||||||
FT_Outline* outline = &face->glyph->outline;
|
|
||||||
- FT_BBox bbox;
|
|
||||||
- FT_Bitmap target;
|
|
||||||
|
|
||||||
int dx = 0, dy = 0;
|
|
||||||
if (fRec.fFlags & SkScalerContext::kSubpixelPositioning_Flag) {
|
|
||||||
dx = SkFixedToFDot6(glyph.getSubXFixed());
|
|
||||||
dy = SkFixedToFDot6(glyph.getSubYFixed());
|
|
||||||
// negate dy since freetype-y-goes-up and skia-y-goes-down
|
|
||||||
dy = -dy;
|
|
||||||
}
|
|
||||||
- FT_Outline_Get_CBox(outline, &bbox);
|
|
||||||
- /*
|
|
||||||
- what we really want to do for subpixel is
|
|
||||||
- offset(dx, dy)
|
|
||||||
- compute_bounds
|
|
||||||
- offset(bbox & !63)
|
|
||||||
- but that is two calls to offset, so we do the following, which
|
|
||||||
- achieves the same thing with only one offset call.
|
|
||||||
- */
|
|
||||||
- FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
|
|
||||||
- dy - ((bbox.yMin + dy) & ~63));
|
|
||||||
+
|
|
||||||
+ memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
|
|
||||||
|
|
||||||
if (SkMask::kLCD16_Format == glyph.fMaskFormat) {
|
|
||||||
+ FT_Outline_Translate(outline, dx, dy);
|
|
||||||
FT_Error err = FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V :
|
|
||||||
FT_RENDER_MODE_LCD);
|
|
||||||
if (err) {
|
|
||||||
SK_TRACEFTR(err, "Could not render glyph.");
|
|
||||||
- sk_bzero(glyph.fImage, glyph.computeImageSize());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
SkMask mask;
|
|
||||||
glyph.toMask(&mask);
|
|
||||||
+#ifdef SK_SHOW_TEXT_BLIT_COVERAGE
|
|
||||||
+ memset(mask.fImage, 0x80, mask.fBounds.height() * mask.fRowBytes);
|
|
||||||
+#endif
|
|
||||||
+ FT_GlyphSlotRec& ftGlyph = *face->glyph;
|
|
||||||
+
|
|
||||||
+ if (!SkIRect::Intersects(mask.fBounds,
|
|
||||||
+ SkIRect::MakeXYWH( ftGlyph.bitmap_left,
|
|
||||||
+ -ftGlyph.bitmap_top,
|
|
||||||
+ ftGlyph.bitmap.width,
|
|
||||||
+ ftGlyph.bitmap.rows)))
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // If the FT_Bitmap extent is larger, discard bits of the bitmap outside the mask.
|
|
||||||
+ // If the SkMask extent is larger, shrink mask to fit bitmap (clearing discarded).
|
|
||||||
+ unsigned char* origBuffer = ftGlyph.bitmap.buffer;
|
|
||||||
+ // First align the top left (origin).
|
|
||||||
+ if (-ftGlyph.bitmap_top < mask.fBounds.fTop) {
|
|
||||||
+ int32_t topDiff = mask.fBounds.fTop - (-ftGlyph.bitmap_top);
|
|
||||||
+ ftGlyph.bitmap.buffer += ftGlyph.bitmap.pitch * topDiff;
|
|
||||||
+ ftGlyph.bitmap.rows -= topDiff;
|
|
||||||
+ ftGlyph.bitmap_top = -mask.fBounds.fTop;
|
|
||||||
+ }
|
|
||||||
+ if (ftGlyph.bitmap_left < mask.fBounds.fLeft) {
|
|
||||||
+ int32_t leftDiff = mask.fBounds.fLeft - ftGlyph.bitmap_left;
|
|
||||||
+ ftGlyph.bitmap.buffer += leftDiff;
|
|
||||||
+ ftGlyph.bitmap.width -= leftDiff;
|
|
||||||
+ ftGlyph.bitmap_left = mask.fBounds.fLeft;
|
|
||||||
+ }
|
|
||||||
+ if (mask.fBounds.fTop < -ftGlyph.bitmap_top) {
|
|
||||||
+ mask.fImage += mask.fRowBytes * (-ftGlyph.bitmap_top - mask.fBounds.fTop);
|
|
||||||
+ mask.fBounds.fTop = -ftGlyph.bitmap_top;
|
|
||||||
+ }
|
|
||||||
+ if (mask.fBounds.fLeft < ftGlyph.bitmap_left) {
|
|
||||||
+ mask.fImage += sizeof(uint16_t) * (ftGlyph.bitmap_left - mask.fBounds.fLeft);
|
|
||||||
+ mask.fBounds.fLeft = ftGlyph.bitmap_left;
|
|
||||||
+ }
|
|
||||||
+ // Origins aligned, clean up the width and height.
|
|
||||||
+ int ftVertScale = (doVert ? 3 : 1);
|
|
||||||
+ int ftHoriScale = (doVert ? 1 : 3);
|
|
||||||
+ if (mask.fBounds.height() * ftVertScale < SkToInt(ftGlyph.bitmap.rows)) {
|
|
||||||
+ ftGlyph.bitmap.rows = mask.fBounds.height() * ftVertScale;
|
|
||||||
+ }
|
|
||||||
+ if (mask.fBounds.width() * ftHoriScale < SkToInt(ftGlyph.bitmap.width)) {
|
|
||||||
+ ftGlyph.bitmap.width = mask.fBounds.width() * ftHoriScale;
|
|
||||||
+ }
|
|
||||||
+ if (SkToInt(ftGlyph.bitmap.rows) < mask.fBounds.height() * ftVertScale) {
|
|
||||||
+ mask.fBounds.fBottom = mask.fBounds.fTop + ftGlyph.bitmap.rows / ftVertScale;
|
|
||||||
+ }
|
|
||||||
+ if (SkToInt(ftGlyph.bitmap.width) < mask.fBounds.width() * ftHoriScale) {
|
|
||||||
+ mask.fBounds.fRight = mask.fBounds.fLeft + ftGlyph.bitmap.width / ftHoriScale;
|
|
||||||
+ }
|
|
||||||
if (fPreBlend.isApplicable()) {
|
|
||||||
- copyFT2LCD16<true>(face->glyph->bitmap, mask, doBGR,
|
|
||||||
+ copyFT2LCD16<true>(ftGlyph.bitmap, mask, doBGR,
|
|
||||||
fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
|
|
||||||
} else {
|
|
||||||
- copyFT2LCD16<false>(face->glyph->bitmap, mask, doBGR,
|
|
||||||
+ copyFT2LCD16<false>(ftGlyph.bitmap, mask, doBGR,
|
|
||||||
fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
|
|
||||||
}
|
|
||||||
+ // Restore the buffer pointer so FreeType can properly free it.
|
|
||||||
+ ftGlyph.bitmap.buffer = origBuffer;
|
|
||||||
} else {
|
|
||||||
+ FT_BBox bbox;
|
|
||||||
+ FT_Bitmap target;
|
|
||||||
+ FT_Outline_Get_CBox(outline, &bbox);
|
|
||||||
+ /*
|
|
||||||
+ what we really want to do for subpixel is
|
|
||||||
+ offset(dx, dy)
|
|
||||||
+ compute_bounds
|
|
||||||
+ offset(bbox & !63)
|
|
||||||
+ but that is two calls to offset, so we do the following, which
|
|
||||||
+ achieves the same thing with only one offset call.
|
|
||||||
+ */
|
|
||||||
+ FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
|
|
||||||
+ dy - ((bbox.yMin + dy) & ~63));
|
|
||||||
+
|
|
||||||
target.width = glyph.fWidth;
|
|
||||||
target.rows = glyph.fHeight;
|
|
||||||
target.pitch = glyph.rowBytes();
|
|
||||||
target.buffer = reinterpret_cast<uint8_t*>(glyph.fImage);
|
|
||||||
target.pixel_mode = compute_pixel_mode( (SkMask::Format)fRec.fMaskFormat);
|
|
||||||
target.num_grays = 256;
|
|
||||||
|
|
||||||
- memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
|
|
||||||
FT_Outline_Get_Bitmap(face->glyph->library, outline, &target);
|
|
||||||
+#ifdef SK_SHOW_TEXT_BLIT_COVERAGE
|
|
||||||
+ for (int y = 0; y < glyph.fHeight; ++y) {
|
|
||||||
+ for (int x = 0; x < glyph.fWidth; ++x) {
|
|
||||||
+ uint8_t& a = ((uint8_t*)glyph.fImage)[(glyph.rowBytes() * y) + x];
|
|
||||||
+ a = SkTMax<uint8_t>(a, 0x20);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
|
|
||||||
case FT_GLYPH_FORMAT_BITMAP: {
|
|
||||||
FT_Pixel_Mode pixel_mode = static_cast<FT_Pixel_Mode>(face->glyph->bitmap.pixel_mode);
|
|
||||||
SkMask::Format maskFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
|
|
||||||
|
|
||||||
// Assume that the other formats do not exist.
|
|
|
@ -1,16 +0,0 @@
|
||||||
diff --git i/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp w/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
|
|
||||||
index 42da19280fce8235..2c221c32d097b462 100644
|
|
||||||
--- i/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
|
|
||||||
+++ w/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
|
|
||||||
@@ -666,10 +666,7 @@ void SkScalerContext_CairoFT::generateMetrics(SkGlyph* glyph)
|
|
||||||
glyph->fTop = -SkToS16(SkFDot6Floor(bbox.yMax));
|
|
||||||
glyph->fLeft = SkToS16(SkFDot6Floor(bbox.xMin));
|
|
||||||
|
|
||||||
- if (isLCD(fRec) &&
|
|
||||||
- gSetLcdFilter &&
|
|
||||||
- (fLcdFilter == FT_LCD_FILTER_DEFAULT ||
|
|
||||||
- fLcdFilter == FT_LCD_FILTER_LIGHT)) {
|
|
||||||
+ if (isLCD(fRec)) {
|
|
||||||
if (fRec.fFlags & kLCD_Vertical_Flag) {
|
|
||||||
glyph->fTop -= 1;
|
|
||||||
glyph->fHeight += 2;
|
|
|
@ -1,15 +0,0 @@
|
||||||
diff --git i/old-configure.in w/old-configure.in
|
|
||||||
index 0a06e470d2085922..d41c8e9d5dd2dbfb 100644
|
|
||||||
--- i/old-configure.in
|
|
||||||
+++ w/old-configure.in
|
|
||||||
@@ -2020,9 +2020,7 @@ if test -n "$_USE_SYSTEM_NSS"; then
|
|
||||||
AM_PATH_NSS(3.31, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
|
|
||||||
fi
|
|
||||||
|
|
||||||
-if test -n "$MOZ_SYSTEM_NSS"; then
|
|
||||||
- NSS_LIBS="$NSS_LIBS -lcrmf"
|
|
||||||
-else
|
|
||||||
+if test -z "$MOZ_SYSTEM_NSS"; then
|
|
||||||
NSS_CFLAGS="-I${DIST}/include/nss"
|
|
||||||
case "${OS_ARCH}" in
|
|
||||||
# Only few platforms have been tested with GYP
|
|
48
extra/firefox/no-plt.diff
Normal file
48
extra/firefox/no-plt.diff
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
diff --git i/security/nss/lib/freebl/mpi/mpi_x86.s w/security/nss/lib/freebl/mpi/mpi_x86.s
|
||||||
|
index 8f7e2130c3264754..b3ca1ce5b41b3771 100644
|
||||||
|
--- i/security/nss/lib/freebl/mpi/mpi_x86.s
|
||||||
|
+++ w/security/nss/lib/freebl/mpi/mpi_x86.s
|
||||||
|
@@ -22,22 +22,41 @@ is_sse: .long -1
|
||||||
|
#
|
||||||
|
.ifndef NO_PIC
|
||||||
|
.macro GET var,reg
|
||||||
|
- movl \var@GOTOFF(%ebx),\reg
|
||||||
|
+ call thunk.ax
|
||||||
|
+ addl $_GLOBAL_OFFSET_TABLE_, %eax
|
||||||
|
+ movl \var@GOTOFF(%eax),\reg
|
||||||
|
.endm
|
||||||
|
.macro PUT reg,var
|
||||||
|
- movl \reg,\var@GOTOFF(%ebx)
|
||||||
|
+ call thunk.dx
|
||||||
|
+ addl $_GLOBAL_OFFSET_TABLE_, %edx
|
||||||
|
+ movl \reg,\var@GOTOFF(%edx)
|
||||||
|
.endm
|
||||||
|
.else
|
||||||
|
.macro GET var,reg
|
||||||
|
movl \var,\reg
|
||||||
|
.endm
|
||||||
|
.macro PUT reg,var
|
||||||
|
movl \reg,\var
|
||||||
|
.endm
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
+.ifndef NO_PIC
|
||||||
|
+.globl thunk.ax
|
||||||
|
+.hidden thunk.ax
|
||||||
|
+.type thunk.ax, @function
|
||||||
|
+thunk.ax:
|
||||||
|
+ movl (%esp),%eax
|
||||||
|
+ ret
|
||||||
|
+
|
||||||
|
+.globl thunk.dx
|
||||||
|
+.hidden thunk.dx
|
||||||
|
+.type thunk.dx, @function
|
||||||
|
+thunk.dx:
|
||||||
|
+ movl (%esp),%edx
|
||||||
|
+ ret
|
||||||
|
+.endif
|
||||||
|
|
||||||
|
# ebp - 36: caller's esi
|
||||||
|
# ebp - 32: caller's edi
|
50
extra/firefox/plugin-crash.diff
Normal file
50
extra/firefox/plugin-crash.diff
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User Jan Steffens <jan.steffens@gmail.com>
|
||||||
|
# Date 1505475854 -7200
|
||||||
|
# Node ID 3cd2263687293a229277037090add3bea2531057
|
||||||
|
# Parent 70f5f23a429f3d621e44307c191fa84c77fb2f61
|
||||||
|
Bug 1400175 - Stub gdk_screen_get_monitor_workarea in mozgtk2; r?karlt
|
||||||
|
|
||||||
|
MozReview-Commit-ID: 72K6U17JuoK
|
||||||
|
|
||||||
|
diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c
|
||||||
|
--- a/widget/gtk/mozgtk/mozgtk.c
|
||||||
|
+++ b/widget/gtk/mozgtk/mozgtk.c
|
||||||
|
@@ -56,17 +56,16 @@
|
||||||
|
STUB(gdk_screen_get_default)
|
||||||
|
STUB(gdk_screen_get_display)
|
||||||
|
STUB(gdk_screen_get_font_options)
|
||||||
|
STUB(gdk_screen_get_height)
|
||||||
|
STUB(gdk_screen_get_height_mm)
|
||||||
|
STUB(gdk_screen_get_n_monitors)
|
||||||
|
STUB(gdk_screen_get_monitor_at_window)
|
||||||
|
STUB(gdk_screen_get_monitor_geometry)
|
||||||
|
-STUB(gdk_screen_get_monitor_workarea)
|
||||||
|
STUB(gdk_screen_get_monitor_height_mm)
|
||||||
|
STUB(gdk_screen_get_number)
|
||||||
|
STUB(gdk_screen_get_resolution)
|
||||||
|
STUB(gdk_screen_get_rgba_visual)
|
||||||
|
STUB(gdk_screen_get_root_window)
|
||||||
|
STUB(gdk_screen_get_system_visual)
|
||||||
|
STUB(gdk_screen_get_width)
|
||||||
|
STUB(gdk_screen_height)
|
||||||
|
@@ -514,16 +513,17 @@
|
||||||
|
#ifdef GTK3_SYMBOLS
|
||||||
|
STUB(gdk_device_get_source)
|
||||||
|
STUB(gdk_device_manager_get_client_pointer)
|
||||||
|
STUB(gdk_disable_multidevice)
|
||||||
|
STUB(gdk_device_manager_list_devices)
|
||||||
|
STUB(gdk_display_get_device_manager)
|
||||||
|
STUB(gdk_error_trap_pop_ignored)
|
||||||
|
STUB(gdk_event_get_source_device)
|
||||||
|
+STUB(gdk_screen_get_monitor_workarea)
|
||||||
|
STUB(gdk_window_get_type)
|
||||||
|
STUB(gdk_window_get_window_type)
|
||||||
|
STUB(gdk_x11_window_get_xid)
|
||||||
|
STUB(gdk_x11_display_get_type)
|
||||||
|
STUB(gdk_wayland_display_get_type)
|
||||||
|
STUB(gtk_box_new)
|
||||||
|
STUB(gtk_cairo_should_draw_window)
|
||||||
|
STUB(gtk_cairo_transform_to_window)
|
||||||
|
|
Loading…
Reference in a new issue