extra/firefox to 113.0-1

This commit is contained in:
Kevin Mihelich 2023-05-09 19:04:04 +00:00
parent f954f3383c
commit 07959ef1a3
3 changed files with 48 additions and 90 deletions

View file

@ -1,81 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: stransky <stransky@redhat.com>
Date: Thu, 30 Mar 2023 11:49:53 +0000
Subject: [PATCH] Bug 1803016 [Wayland] Don't commit wl_buffer if buffer scale
doesn't match its size r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173814
---
widget/gtk/MozContainerWayland.cpp | 7 +++++++
widget/gtk/MozContainerWayland.h | 3 +++
widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp | 17 ++++++++++++++---
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp
index 2a4a492077c3..0d9aacc954b7 100644
--- a/widget/gtk/MozContainerWayland.cpp
+++ b/widget/gtk/MozContainerWayland.cpp
@@ -597,6 +597,13 @@ void moz_container_wayland_set_scale_factor(MozContainer* container) {
}
}
+bool moz_container_wayland_size_matches_scale_factor_locked(
+ const MutexAutoLock& aProofOfLock, MozContainer* container, int aWidth,
+ int aHeight) {
+ return aWidth % container->wl_container.buffer_scale == 0 &&
+ aHeight % container->wl_container.buffer_scale == 0;
+}
+
static bool moz_container_wayland_surface_create_locked(
const MutexAutoLock& aProofOfLock, MozContainer* container) {
MozContainerWayland* wl_container = &container->wl_container;
diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h
index d3c49baae8ac..369d40a55250 100644
--- a/widget/gtk/MozContainerWayland.h
+++ b/widget/gtk/MozContainerWayland.h
@@ -85,6 +85,9 @@ bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container,
void moz_container_wayland_set_scale_factor(MozContainer* container);
void moz_container_wayland_set_scale_factor_locked(
const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container);
+bool moz_container_wayland_size_matches_scale_factor_locked(
+ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container,
+ int aWidth, int aHeight);
void moz_container_wayland_add_initial_draw_callback_locked(
MozContainer* container, const std::function<void(void)>& initial_draw_cb);
diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
index 85ab1942d9e6..31091f4b9848 100644
--- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
+++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
@@ -285,8 +285,8 @@ void WindowSurfaceWaylandMB::Commit(
mFrameInProcess = false;
MozContainer* container = mWindow->GetMozContainer();
- MozContainerSurfaceLock lock(container);
- struct wl_surface* waylandSurface = lock.GetSurface();
+ MozContainerSurfaceLock MozContainerLock(container);
+ struct wl_surface* waylandSurface = MozContainerLock.GetSurface();
if (!waylandSurface) {
LOGWAYLAND(
"WindowSurfaceWaylandMB::Commit [%p] frame queued: can't lock "
@@ -319,8 +319,19 @@ void WindowSurfaceWaylandMB::Commit(
}
}
+ // aProofOfLock is a kind of substitution of MozContainerSurfaceLock.
+ // MozContainer is locked but MozContainerSurfaceLock doen't convert to
+ // MutexAutoLock& so we use aProofOfLock here.
moz_container_wayland_set_scale_factor_locked(aProofOfLock, container);
- mInProgressBuffer->AttachAndCommit(waylandSurface);
+
+ // It's possible that scale factor changed between Lock() and Commit()
+ // but window size is the same.
+ // Don't attach such buffer as it may have incorrect size,
+ // we'll paint new content soon.
+ if (moz_container_wayland_size_matches_scale_factor_locked(
+ aProofOfLock, container, mWindowSize.width, mWindowSize.height)) {
+ mInProgressBuffer->AttachAndCommit(waylandSurface);
+ }
mInProgressBuffer->ResetBufferAge();
mFrontBuffer = mInProgressBuffer;

View file

@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: ahochheiden <ahochheiden@mozilla.com>
Date: Sat, 6 May 2023 21:07:09 +0000
Subject: [PATCH] Bug 1831691 - Use the vendored 'glean_parser' for all of
`mach` r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D177340
---
python/sites/build.txt | 1 -
python/sites/mach.txt | 1 +
python/sites/python-test.txt | 1 -
3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/python/sites/build.txt b/python/sites/build.txt
index b43f7680d200..4e6f6c51d9ad 100644
--- a/python/sites/build.txt
+++ b/python/sites/build.txt
@@ -1,2 +1 @@
-vendored:third_party/python/glean_parser
pth:third_party/python/vsdownload
diff --git a/python/sites/mach.txt b/python/sites/mach.txt
index b9fafd0b9c59..a18691184312 100644
--- a/python/sites/mach.txt
+++ b/python/sites/mach.txt
@@ -78,6 +78,7 @@ vendored:third_party/python/esprima
vendored:third_party/python/fluent.migrate
vendored:third_party/python/fluent.syntax
vendored:third_party/python/giturlparse
+vendored:third_party/python/glean_parser
vendored:third_party/python/gyp/pylib
vendored:third_party/python/idna
vendored:third_party/python/importlib_metadata
diff --git a/python/sites/python-test.txt b/python/sites/python-test.txt
index 48cdcd2b8f48..74889365a22b 100644
--- a/python/sites/python-test.txt
+++ b/python/sites/python-test.txt
@@ -1,2 +1 @@
-vendored:third_party/python/glean_parser
pypi:pytest==7.0.1

View file

@ -10,8 +10,8 @@
highmem=1 highmem=1
pkgname=firefox pkgname=firefox
pkgver=112.0.2 pkgver=113.0
pkgrel=2 pkgrel=1
pkgdesc="Standalone web browser from mozilla.org" pkgdesc="Standalone web browser from mozilla.org"
url="https://www.mozilla.org/firefox/" url="https://www.mozilla.org/firefox/"
arch=(x86_64) arch=(x86_64)
@ -69,21 +69,21 @@ source=(
https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz{,.asc} https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz{,.asc}
$pkgname.desktop $pkgname.desktop
identity-icons-brand.svg identity-icons-brand.svg
0001-Bug-1803016-Wayland-Don-t-commit-wl_buffer-if-buffer.patch 0001-Bug-1831691-Use-the-vendored-glean_parser-for-all-of.patch
) )
validpgpkeys=( validpgpkeys=(
'14F26682D0916CDD81E37B6D61B7B526D98F0353' # Mozilla Software Releases <release@mozilla.com> '14F26682D0916CDD81E37B6D61B7B526D98F0353' # Mozilla Software Releases <release@mozilla.com>
) )
sha256sums=('e6a4819a3b82b1ca6c45296e50e6c9ab653306eeb540e50ba8683e339565992e' sha256sums=('7a266044cb9d0c63079b3453507ea0c80a23389f4cbf6a4f6fd15146c6072627'
'SKIP' 'SKIP'
'298eae9de76ec53182f38d5c549d0379569916eebf62149f9d7f4a7edef36abf' '298eae9de76ec53182f38d5c549d0379569916eebf62149f9d7f4a7edef36abf'
'a9b8b4a0a1f4a7b4af77d5fc70c2686d624038909263c795ecc81e0aec7711e9' 'a9b8b4a0a1f4a7b4af77d5fc70c2686d624038909263c795ecc81e0aec7711e9'
'bfe15651a99ac6d0037867c9db00a0d4340353cdc0ac4a39e43ad61cc2589ed6') '1976c0c5e98b0f67e83de778a4fd7729de9b140efa47b77b5879ea2e907987e9')
b2sums=('44f2fae6c7260a1a6cad24ee31bbd52bc7efad15ac5b9f64f4bceabda7a371f20a490512cee324e53373b9a96fd218572c1478b76e5931383dbef00cc25743aa' b2sums=('1506901352ea84b8016080aa81a0f431b8620c64c0c54364ec56d1878b6413ad965c2d9f39a9bb06d2356c206702283400918b4fb0fa3dac380360f54e60b146'
'SKIP' 'SKIP'
'e18f2c22e394ca3b6758bc130245b254947e4d15921be3da443d6d7c3c4b0d22ead1b39fbc10a4f896edd19e2a1dffbd1cbb34dc4beb0621a6ddb70ccc53b3a7' 'e18f2c22e394ca3b6758bc130245b254947e4d15921be3da443d6d7c3c4b0d22ead1b39fbc10a4f896edd19e2a1dffbd1cbb34dc4beb0621a6ddb70ccc53b3a7'
'63a8dd9d8910f9efb353bed452d8b4b2a2da435857ccee083fc0c557f8c4c1339ca593b463db320f70387a1b63f1a79e709e9d12c69520993e26d85a3d742e34' '63a8dd9d8910f9efb353bed452d8b4b2a2da435857ccee083fc0c557f8c4c1339ca593b463db320f70387a1b63f1a79e709e9d12c69520993e26d85a3d742e34'
'ab11b185f32da7a10c22a075d2bf16adadfcfc2d197fc88bd61a03d1873d5cd914cd96edf8af9f054a3cab12629f3f5c29d70d0dce0f0f4bef85f1cfc5a219ee') '4ac97b908afb915911212686e41c09137bfa909023dc6fa0808cb6cb12f2dcef9597f0d679c98ad1a6b110d11a92025435cd30dd7b87194428b693c555e2bae7')
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please # Note: These are for Arch Linux use ONLY. For your own distribution, please
@ -102,8 +102,8 @@ prepare() {
mkdir mozbuild mkdir mozbuild
cd firefox-$pkgver cd firefox-$pkgver
# https://bugzilla.mozilla.org/show_bug.cgi?id=1803016 # https://bugzilla.mozilla.org/show_bug.cgi?id=1831691
patch -Np1 -i ../0001-Bug-1803016-Wayland-Don-t-commit-wl_buffer-if-buffer.patch patch -Np1 -i ../0001-Bug-1831691-Use-the-vendored-glean_parser-for-all-of.patch
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