diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | clip-ft-glyph.diff | 147 | ||||
-rw-r--r-- | harmony-fix.diff | 43 |
4 files changed, 7 insertions, 212 deletions
@@ -1,7 +1,7 @@ pkgbase = firefox-esr pkgdesc = Standalone web browser from mozilla.org, Extended Support Release - pkgver = 52.3.0 - pkgrel = 6 + pkgver = 52.4.0 + pkgrel = 1 url = https://www.mozilla.org/en-US/firefox/organizations/ arch = i686 arch = x86_64 @@ -44,28 +44,23 @@ pkgbase = firefox-esr conflicts = firefox options = !emptydirs options = !makeflags - source = https://ftp.mozilla.org/pub/firefox/releases/52.3.0esr/source/firefox-52.3.0esr.source.tar.xz + source = https://ftp.mozilla.org/pub/firefox/releases/52.4.0esr/source/firefox-52.4.0esr.source.tar.xz source = firefox.desktop source = firefox-symbolic.svg source = 0001-Bug-54395-remove-hardcoded-flag-lcrmf.patch source = firefox-install-dir.patch source = fix-wifi-scanner.diff source = glibc-2.26-fix.diff - source = clip-ft-glyph.diff - source = harmony-fix.diff source = rust-i686.patch source = make_SystemResourceMonitor.stop_more_resilient_to_errors.patch validpgpkeys = 2B90598A745E992F315E22C58AB132963A06537A - sha256sums = c16bc86d6cb8c2199ed1435ab80a9ae65f9324c820ea0eeb38bf89a97d253b5b + sha256sums = 58ae7cb6c2fb81d22762ab3c60e46cadbe7c5b687f24c2823d9533ec998a21ee sha256sums = c202e5e18da1eeddd2e1d81cb3436813f11e44585ca7357c4c5f1bddd4bec826 sha256sums = a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9 sha256sums = 93c495526c1a1227f76dda5f3a43b433bc7cf217aaf74bd06b8fc187d285f593 sha256sums = d86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd sha256sums = 9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8 - sha256sums = 37e127dbed0285dc48e8033959a84e241c3e5cf0ce9544a172e640b54d3dfe0e sha256sums = cd7ff441da66a287f8712e60cdc9e216c30355d521051e2eaae28a66d81915e8 - sha256sums = dc4feddbf22ea11ae2513c68b7f3fc9047850d055a7f30d31a7ee94d7d5de12a - sha256sums = 8ed42e75b577d57e4b07f1d70137cb8e82f757abb616f1cfea694a041ad5679e sha256sums = f61ea706ce6905f568b9bdafd1b044b58f20737426f0aa5019ddb9b64031a269 sha256sums = 7760ebe71f4057cbd2f52b715abaf0d944c14c39e2bb2a5322114ad8451e12d9 @@ -4,8 +4,8 @@ # Contributor: Jakub Schmidtke <sjakub@gmail.com> pkgname=firefox-esr -pkgver=52.3.0 -pkgrel=6 +pkgver=52.4.0 +pkgrel=1 pkgdesc="Standalone web browser from mozilla.org, Extended Support Release" arch=(i686 x86_64) license=(MPL GPL LGPL) @@ -25,19 +25,15 @@ source=(https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox 0001-Bug-54395-remove-hardcoded-flag-lcrmf.patch firefox-install-dir.patch fix-wifi-scanner.diff glibc-2.26-fix.diff - clip-ft-glyph.diff - harmony-fix.diff rust-i686.patch make_SystemResourceMonitor.stop_more_resilient_to_errors.patch) -sha256sums=('c16bc86d6cb8c2199ed1435ab80a9ae65f9324c820ea0eeb38bf89a97d253b5b' +sha256sums=('58ae7cb6c2fb81d22762ab3c60e46cadbe7c5b687f24c2823d9533ec998a21ee' 'c202e5e18da1eeddd2e1d81cb3436813f11e44585ca7357c4c5f1bddd4bec826' 'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9' '93c495526c1a1227f76dda5f3a43b433bc7cf217aaf74bd06b8fc187d285f593' 'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd' '9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8' 'cd7ff441da66a287f8712e60cdc9e216c30355d521051e2eaae28a66d81915e8' - 'dc4feddbf22ea11ae2513c68b7f3fc9047850d055a7f30d31a7ee94d7d5de12a' - '8ed42e75b577d57e4b07f1d70137cb8e82f757abb616f1cfea694a041ad5679e' 'f61ea706ce6905f568b9bdafd1b044b58f20737426f0aa5019ddb9b64031a269' '7760ebe71f4057cbd2f52b715abaf0d944c14c39e2bb2a5322114ad8451e12d9') validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A') @@ -72,12 +68,6 @@ prepare() { # https://bugzilla.mozilla.org/show_bug.cgi?id=1394149 patch -d toolkit/crashreporter/google-breakpad/src/client -Np4 < ../glibc-2.26-fix.diff - # https://bugzilla.mozilla.org/show_bug.cgi?id=1393467 - patch -Np1 -i ../clip-ft-glyph.diff - - # https://bugzilla.mozilla.org/show_bug.cgi?id=1400721 - patch -Np1 -i ../harmony-fix.diff - # Build with the rust targets we actually ship patch -Np1 -i ../rust-i686.patch diff --git a/clip-ft-glyph.diff b/clip-ft-glyph.diff deleted file mode 100644 index deecd1251cc4..000000000000 --- a/clip-ft-glyph.diff +++ /dev/null @@ -1,147 +0,0 @@ -# HG changeset patch -# User Lee Salzman <lsalzman@mozilla.com> -# Date 1504640559 14400 -# Tue Sep 05 15:42:39 2017 -0400 -# Node ID 923246286b9858fb103e100f886c03714b97b5ec -# Parent 3fff2b174212af40a7b7ba75a047db431f81c780 -clip FreeType glyph bitmap to mask in Skia (52 ESR) - -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 -@@ -350,58 +350,118 @@ 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_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V : FT_RENDER_MODE_LCD); -+ 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) { -+ return; -+ } -+ - SkMask mask; - glyph.toMask(&mask); -+ -+ 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); - } - } 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); - diff --git a/harmony-fix.diff b/harmony-fix.diff deleted file mode 100644 index 22f2e17af5fc..000000000000 --- a/harmony-fix.diff +++ /dev/null @@ -1,43 +0,0 @@ -# HG changeset patch -# User Lee Salzman <lsalzman@mozilla.com> -# Date 1505762237 14400 -# Mon Sep 18 15:17:17 2017 -0400 -# Node ID b48346dc7742fbbc8284a907983098856503a4f1 -# Parent 60baec2de6577d8a109e417545ad1b6542481068 -fix Skia's glyph LCD filter padding for FreeType 2.8.1 - -MozReview-Commit-ID: JFvnANsTS0r - -diff --git a/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp b/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp ---- a/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp -+++ b/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp -@@ -661,20 +661,25 @@ void SkScalerContext_CairoFT::generateMe - bbox.yMin &= ~63; - bbox.xMax = (bbox.xMax + 63) & ~63; - bbox.yMax = (bbox.yMax + 63) & ~63; - glyph->fWidth = SkToU16(SkFDot6Floor(bbox.xMax - bbox.xMin)); - glyph->fHeight = SkToU16(SkFDot6Floor(bbox.yMax - bbox.yMin)); - 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)) { -+ // In FreeType < 2.8.1, LCD filtering, if explicitly used, may -+ // add padding to the glyph. When not used, there is no padding. -+ // As of 2.8.1, LCD filtering is now always supported and may -+ // add padding even if an LCD filter is not explicitly set. -+ // Regardless, if no LCD filtering is used, or if LCD filtering -+ // doesn't add padding, it is safe to modify the glyph's bounds -+ // here. generateGlyphImage will detect if the mask is smaller -+ // than the bounds and clip things appropriately. - if (fRec.fFlags & kLCD_Vertical_Flag) { - glyph->fTop -= 1; - glyph->fHeight += 2; - } else { - glyph->fLeft -= 1; - glyph->fWidth += 2; - } - } |