diff options
author | Danny Rawlins <contact@romster.me> | 2021-07-16 00:05:55 +1000 |
---|---|---|
committer | Danny Rawlins <contact@romster.me> | 2021-07-16 00:06:15 +1000 |
commit | eced507bd88d5c4f05b6b962e72b8de6e95b2a8a (patch) | |
tree | 02f04504a3a2d6a1631c001fd4a514112b88c676 /firefox | |
parent | edf37d1a64c9ab8b3b279e791e6d544f0858ba55 (diff) | |
download | contrib-eced507bd88d5c4f05b6b962e72b8de6e95b2a8a.tar.gz contrib-eced507bd88d5c4f05b6b962e72b8de6e95b2a8a.tar.xz |
firefox: 89.0.2 -> 90.0
Diffstat (limited to 'firefox')
-rw-r--r-- | firefox/.footprint | 2 | ||||
-rw-r--r-- | firefox/.signature | 9 | ||||
-rw-r--r-- | firefox/D116874.diff | 321 | ||||
-rw-r--r-- | firefox/Pkgfile | 11 |
4 files changed, 7 insertions, 336 deletions
diff --git a/firefox/.footprint b/firefox/.footprint index 8177340f5..1a842288d 100644 --- a/firefox/.footprint +++ b/firefox/.footprint @@ -29,8 +29,6 @@ drwxr-xr-x root/root usr/lib/firefox/gmp-clearkey/ drwxr-xr-x root/root usr/lib/firefox/gmp-clearkey/0.1/ -rwxr-xr-x root/root usr/lib/firefox/gmp-clearkey/0.1/libclearkey.so -rw-r--r-- root/root usr/lib/firefox/gmp-clearkey/0.1/manifest.json -drwxr-xr-x root/root usr/lib/firefox/gtk2/ --rwxr-xr-x root/root usr/lib/firefox/gtk2/libmozgtk.so -rwxr-xr-x root/root usr/lib/firefox/liblgpllibs.so -rwxr-xr-x root/root usr/lib/firefox/libmozavcodec.so -rwxr-xr-x root/root usr/lib/firefox/libmozavutil.so diff --git a/firefox/.signature b/firefox/.signature index 01dd7fe97..aadb4838c 100644 --- a/firefox/.signature +++ b/firefox/.signature @@ -1,8 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3xCWmbL5vkGDD0HRqK/fXqoR2sYnerC0dzdeypi2m9GwCmHzkjGbg50i5h1JLg0acJigIWBa+SeXH4nHXR7+VgA= -SHA256 (Pkgfile) = 8997e23118e34f38354cef110400247a4be7267d3e6f9e7d326a94ee4c1bbf84 -SHA256 (.footprint) = 8b8bebe1e51e7e8d82a57e60b95e4fd85c806ecbcbb15ad1774730025ba0e931 -SHA256 (firefox-89.0.2.source.tar.xz) = 3225f583c5e36bdf52ad16f71a2c359deb0c765c38205acdeb6b7b6520ac5494 +RWSagIOpLGJF3yxZjKy+ufEsxjzvb8c+jceamHmtKwcfkQ6Vx/HjMnKmNxzZYWUjPCQvwFCJ7xYfJ4XbfhlzhPtL3IJdBAy2iAQ= +SHA256 (Pkgfile) = b6d345b93d6de21a58f5c2a6703e988de9c6a1c57cb2be301ad663030af014a7 +SHA256 (.footprint) = 27ff13e160720bbfc07289b241337831458e954cc719d7544cc43c1b6ed370a3 +SHA256 (firefox-90.0.source.tar.xz) = 43a943e7d7660c6d7f5b41c95b344b7fd6a4a88ad0bb45dbd844b372ea60d58b SHA256 (firefox.desktop) = 8ba3439f3dfc5cab883641969c93d8d15f8f20d7188d9568346b2edad52d6f91 SHA256 (0001-Use-remoting-name-for-GDK-application-names.patch) = 8b236bbf3ae5cb28d1dd742f543c0079fac06af5aa80bc2051defeba95f0ae21 -SHA256 (D116874.diff) = 8b62624da8a4ed91d3f8208571be1c7d357e528b4174798c6cc346b2728e0983 diff --git a/firefox/D116874.diff b/firefox/D116874.diff deleted file mode 100644 index 0a3080d04..000000000 --- a/firefox/D116874.diff +++ /dev/null @@ -1,321 +0,0 @@ -diff --git a/gfx/thebes/SharedFontList.h b/gfx/thebes/SharedFontList.h ---- a/gfx/thebes/SharedFontList.h -+++ b/gfx/thebes/SharedFontList.h -@@ -157,7 +157,10 @@ - nsCString mDescriptor; // descriptor that can be used to instantiate a - // platform font reference - uint16_t mIndex; // an index used with descriptor (on some platforms) -- bool mFixedPitch; // is the face fixed-pitch (monospaced)? -+#ifdef MOZ_WIDGET_GTK -+ uint16_t mSize; // pixel size if bitmap; zero indicates scalable -+#endif -+ bool mFixedPitch; // is the face fixed-pitch (monospaced)? - mozilla::WeightRange mWeight; // CSS font-weight value - mozilla::StretchRange mStretch; // CSS font-stretch value - mozilla::SlantStyleRange mStyle; // CSS font-style value -@@ -169,11 +172,15 @@ - Face(FontList* aList, const InitData& aData) - : mDescriptor(aList, aData.mDescriptor), - mIndex(aData.mIndex), -+#ifdef MOZ_WIDGET_GTK -+ mSize(aData.mSize), -+#endif - mFixedPitch(aData.mFixedPitch), - mWeight(aData.mWeight), - mStretch(aData.mStretch), - mStyle(aData.mStyle), -- mCharacterMap(Pointer::Null()) {} -+ mCharacterMap(Pointer::Null()) { -+ } - - bool HasValidDescriptor() const { - return !mDescriptor.IsNull() && mIndex != uint16_t(-1); -@@ -183,6 +190,9 @@ - - String mDescriptor; - uint16_t mIndex; -+#ifdef MOZ_WIDGET_GTK -+ uint16_t mSize; -+#endif - bool mFixedPitch; - mozilla::WeightRange mWeight; - mozilla::StretchRange mStretch; -@@ -309,6 +319,11 @@ - void SetupFamilyCharMap(FontList* aList); - - private: -+ // Returns true if there are specifically-sized bitmap faces in the list, -+ // so size selection still needs to be done. (Currently only on Linux.) -+ bool FindAllFacesForStyleInternal(FontList* aList, const gfxFontStyle& aStyle, -+ nsTArray<Face*>& aFaceList) const; -+ - std::atomic<uint32_t> mFaceCount; - String mKey; - String mName; -diff --git a/gfx/thebes/SharedFontList.cpp b/gfx/thebes/SharedFontList.cpp ---- a/gfx/thebes/SharedFontList.cpp -+++ b/gfx/thebes/SharedFontList.cpp -@@ -11,6 +11,7 @@ - #include "mozilla/dom/ContentChild.h" - #include "mozilla/dom/ContentParent.h" - #include "mozilla/Logging.h" -+#include "mozilla/Unused.h" - - #define LOG_FONTLIST(args) \ - MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), LogLevel::Debug, args) -@@ -231,34 +232,46 @@ - } - } - --void Family::FindAllFacesForStyle(FontList* aList, const gfxFontStyle& aStyle, -- nsTArray<Face*>& aFaceList, -- bool aIgnoreSizeTolerance) const { -+bool Family::FindAllFacesForStyleInternal(FontList* aList, -+ const gfxFontStyle& aStyle, -+ nsTArray<Face*>& aFaceList) const { - MOZ_ASSERT(aFaceList.IsEmpty()); - if (!IsInitialized()) { -- return; -+ return false; - } - - Pointer* facePtrs = Faces(aList); - if (!facePtrs) { -- return; -+ return false; - } - -- // If the family has only one face, we simply return it; no further -- // checking needed. -+ // Depending on the kind of family, we have to do varying amounts of work -+ // to figure out what face(s) to use for the requested style properties. -+ -+ // If the family has only one face, we simply use it; no further style -+ // checking needed. (However, for bitmap fonts we may still need to check -+ // whether the size is acceptable.) - if (NumFaces() == 1) { - MOZ_ASSERT(!facePtrs[0].IsNull()); -- aFaceList.AppendElement(static_cast<Face*>(facePtrs[0].ToPtr(aList))); -- return; -+ Face* face = static_cast<Face*>(facePtrs[0].ToPtr(aList)); -+ if (face && face->HasValidDescriptor()) { -+ aFaceList.AppendElement(face); -+#ifdef MOZ_WIDGET_GTK -+ if (face->mSize) { -+ return true; -+ } -+#endif -+ } -+ return false; - } - - // Most families are "simple", having just Regular/Bold/Italic/BoldItalic, - // or some subset of these. In this case, we have exactly 4 entries in - // mAvailableFonts, stored in the above order; note that some of the entries - // may be nullptr. We can then pick the required entry based on whether the -- // request is for bold or non-bold, italic or non-italic, without running the -- // more complex matching algorithm used for larger families with many weights -- // and/or widths. -+ // request is for bold or non-bold, italic or non-italic, without running -+ // the more complex matching algorithm used for larger families with many -+ // weights and/or widths. - - if (mIsSimple) { - // Family has no more than the "standard" 4 faces, at fixed indexes; -@@ -270,15 +283,20 @@ - uint8_t faceIndex = - (wantItalic ? kItalicMask : 0) | (wantBold ? kBoldMask : 0); - -- // if the desired style is available, return it directly -+ // If the desired style is available, use it directly. - Face* face = static_cast<Face*>(facePtrs[faceIndex].ToPtr(aList)); - if (face && face->HasValidDescriptor()) { - aFaceList.AppendElement(face); -- return; -+#ifdef MOZ_WIDGET_GTK -+ if (face->mSize) { -+ return true; -+ } -+#endif -+ return false; - } - -- // order to check fallback faces in a simple family, depending on requested -- // style -+ // Order to check fallback faces in a simple family, depending on the -+ // requested style. - static const uint8_t simpleFallbacks[4][3] = { - {kBoldFaceIndex, kItalicFaceIndex, - kBoldItalicFaceIndex}, // fallback sequence for Regular -@@ -294,7 +312,12 @@ - face = static_cast<Face*>(facePtrs[order[trial]].ToPtr(aList)); - if (face && face->HasValidDescriptor()) { - aFaceList.AppendElement(face); -- return; -+#ifdef MOZ_WIDGET_GTK -+ if (face->mSize) { -+ return true; -+ } -+#endif -+ return false; - } - } - -@@ -302,7 +325,7 @@ - // can happen if we're on a stylo thread and caught the font list being - // updated; in that case we just fail quietly and let font fallback do - // something for the time being. -- return; -+ return false; - } - - // Pick the font(s) that are closest to the desired weight, style, and -@@ -315,9 +338,11 @@ - // normal platform fonts with a single font entry for each - // weight/style/stretch combination, only the last matched font entry will - // be added. -- - double minDistance = INFINITY; - Face* matched = nullptr; -+ // Keep track of whether we've included any non-scalable font resources in -+ // the selected set. -+ bool anyNonScalable = false; - for (uint32_t i = 0; i < NumFaces(); i++) { - Face* face = static_cast<Face*>(facePtrs[i].ToPtr(aList)); - if (face) { -@@ -332,6 +357,11 @@ - } else if (distance == minDistance) { - if (matched) { - aFaceList.AppendElement(matched); -+#ifdef MOZ_WIDGET_GTK -+ if (matched->mSize) { -+ anyNonScalable = true; -+ } -+#endif - } - matched = face; - } -@@ -341,7 +371,69 @@ - MOZ_ASSERT(matched, "didn't match a font within a family"); - if (matched) { - aFaceList.AppendElement(matched); -+#ifdef MOZ_WIDGET_GTK -+ if (matched->mSize) { -+ anyNonScalable = true; -+ } -+#endif - } -+ -+ return anyNonScalable; -+} -+ -+void Family::FindAllFacesForStyle(FontList* aList, const gfxFontStyle& aStyle, -+ nsTArray<Face*>& aFaceList, -+ bool aIgnoreSizeTolerance) const { -+#ifdef MOZ_WIDGET_GTK -+ bool anyNonScalable = -+#else -+ Unused << -+#endif -+ FindAllFacesForStyleInternal(aList, aStyle, aFaceList); -+ -+#ifdef MOZ_WIDGET_GTK -+ // aFaceList now contains whatever faces are the best style match for -+ // the requested style. If specifically-sized bitmap faces are supported, -+ // we need to additionally filter the list to choose the appropriate size. -+ // -+ // It would be slightly more efficient to integrate this directly into the -+ // face-selection algorithm above, but it's a rare case that doesn't apply -+ // at all to most font families. -+ // -+ // Currently we only support pixel-sized bitmap font faces on Linux/Gtk (i.e. -+ // when using the gfxFcPlatformFontList implementation), so this filtering is -+ // not needed on other platforms. -+ // -+ // (Note that color-bitmap emoji fonts like Apple Color Emoji or Noto Color -+ // Emoji don't count here; they package multiple bitmap sizes into a single -+ // OpenType wrapper, so they appear as a single "scalable" face in our list.) -+ if (anyNonScalable) { -+ uint16_t best = 0; -+ gfxFloat dist = 0.0; -+ for (const auto& f : aFaceList) { -+ if (f->mSize == 0) { -+ // Scalable face; no size distance to compute. -+ continue; -+ } -+ gfxFloat d = fabs(gfxFloat(f->mSize) - aStyle.size); -+ if (!aIgnoreSizeTolerance && (d * 5.0 > f->mSize)) { -+ continue; // Too far from the requested size, ignore. -+ } -+ // If we haven't found a "best" bitmap size yet, or if this is a better -+ // match, remember it. -+ if (!best || d < dist) { -+ best = f->mSize; -+ dist = d; -+ } -+ } -+ // Discard all faces except the chosen "best" size; or if no pixel size was -+ // chosen, all except scalable faces. -+ // This may eliminate *all* faces in the family, if all were bitmaps and -+ // none was a good enough size match, in which case we'll fall back to the -+ // next font-family name. -+ aFaceList.RemoveElementsBy([=](const auto& e) { return e->mSize != best; }); -+ } -+#endif - } - - Face* Family::FindFaceForStyle(FontList* aList, const gfxFontStyle& aStyle, -diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp ---- a/gfx/thebes/gfxFcPlatformFontList.cpp -+++ b/gfx/thebes/gfxFcPlatformFontList.cpp -@@ -205,7 +205,8 @@ - - static void GetFontProperties(FcPattern* aFontPattern, WeightRange* aWeight, - StretchRange* aStretch, -- SlantStyleRange* aSlantStyle) { -+ SlantStyleRange* aSlantStyle, -+ uint16_t* aSize = nullptr) { - // weight - int weight; - if (FcPatternGetInteger(aFontPattern, FC_WEIGHT, 0, &weight) != -@@ -231,6 +232,24 @@ - } else if (slant > 0) { - *aSlantStyle = SlantStyleRange(FontSlantStyle::Italic()); - } -+ -+ if (aSize) { -+ // pixel size, or zero if scalable -+ FcBool scalable; -+ if (FcPatternGetBool(aFontPattern, FC_SCALABLE, 0, &scalable) == -+ FcResultMatch && -+ scalable) { -+ *aSize = 0; -+ } else { -+ double size; -+ if (FcPatternGetDouble(aFontPattern, FC_PIXEL_SIZE, 0, &size) == -+ FcResultMatch) { -+ *aSize = uint16_t(NS_round(size)); -+ } else { -+ *aSize = 0; -+ } -+ } -+ } - } - - gfxFontconfigFontEntry::gfxFontconfigFontEntry(const nsACString& aFaceName, -@@ -1667,10 +1686,11 @@ - WeightRange weight(FontWeight::Normal()); - StretchRange stretch(FontStretch::Normal()); - SlantStyleRange style(FontSlantStyle::Normal()); -- GetFontProperties(aPattern, &weight, &stretch, &style); -+ uint16_t size; -+ GetFontProperties(aPattern, &weight, &stretch, &style, &size); - -- auto initData = -- fontlist::Face::InitData{descriptor, 0, false, weight, stretch, style}; -+ auto initData = fontlist::Face::InitData{descriptor, 0, size, false, -+ weight, stretch, style}; - - // Add entries for any other localized family names. (Most fonts only have - // a single family name, so the first call to GetString will usually fail). - diff --git a/firefox/Pkgfile b/firefox/Pkgfile index 17bddc308..476938749 100644 --- a/firefox/Pkgfile +++ b/firefox/Pkgfile @@ -1,16 +1,15 @@ # Description: The Mozilla Firefox browser with Alsa support # URL: https://www.mozilla.com/firefox/ # Maintainer: Danny Rawlins, crux at romster dot me -# Depends on: alsa-lib autoconf-2.13 cbindgen clang dbus-glib gtk libidl libnotify libxkbcommon lld nodejs nss unzip xorg-libxt yasm zip python +# Depends on: alsa-lib autoconf-2.13 cbindgen clang dbus-glib gtk3 libidl libnotify libxkbcommon lld nodejs nss unzip xorg-libxt yasm zip python # Optional: sccache jack name=firefox -version=89.0.2 +version=90.0 release=1 source=(https://archive.mozilla.org/pub/firefox/releases/$version/source/$name-$version.source.tar.xz firefox.desktop - 0001-Use-remoting-name-for-GDK-application-names.patch - D116874.diff) + 0001-Use-remoting-name-for-GDK-application-names.patch) build() { cd firefox-$version @@ -18,10 +17,6 @@ build() { # https://bugzilla.mozilla.org/show_bug.cgi?id=1530052 patch -p1 -i $SRC/0001-Use-remoting-name-for-GDK-application-names.patch - # https://phabricator.services.mozilla.com/D116874 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1714282 - patch -p1 -i $SRC/D116874.diff - if [ $(/usr/bin/python -c "import sys; print sys.stdout.encoding") = 'UTF-8' ]; then printf "\e[031mError: set an UTF-8 locale to compile this!\033[0m\n" exit 1 |