summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2020-11-25 10:42:45 +0100
committerMartin Stransky <stransky@redhat.com>2020-11-25 10:42:45 +0100
commite36bb4e6344cd1ea8722bd669daab0dbf236936e (patch)
treee63178b25dbb46f2a33a2bc160cc0e59d1c2c8aa
parentExport MOZ_GMP_PATH from /usr/bin/firefox script (https://pagure.io/fedora-w... (diff)
downloadlibrewolf-fedora-ff-e36bb4e6344cd1ea8722bd669daab0dbf236936e.tar.gz
librewolf-fedora-ff-e36bb4e6344cd1ea8722bd669daab0dbf236936e.tar.bz2
librewolf-fedora-ff-e36bb4e6344cd1ea8722bd669daab0dbf236936e.zip
Added fix for rhbz#1900542
-rw-r--r--firefox.spec7
-rw-r--r--pw6.patch120
-rw-r--r--pw7.patch95
3 files changed, 108 insertions, 114 deletions
diff --git a/firefox.spec b/firefox.spec
index 2085eee..70d030d 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -125,7 +125,7 @@ ExcludeArch: aarch64
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 83.0
-Release: 7%{?pre_tag}%{?dist}
+Release: 8%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@@ -198,7 +198,6 @@ Patch452: pw3.patch
Patch453: pw4.patch
Patch454: pw5.patch
Patch455: pw6.patch
-Patch456: pw7.patch
#VA-API patches
Patch584: firefox-disable-ffvpx-with-vapi.patch
@@ -420,7 +419,6 @@ This package contains results of tests executed during build.
%patch453 -p1 -b .pw4
%patch454 -p1 -b .pw5
%patch455 -p1 -b .pw6
-%patch456 -p1 -b .pw7
# VA-API fixes
%patch584 -p1 -b .firefox-disable-ffvpx-with-vapi
@@ -996,6 +994,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Wed Nov 25 2020 Martin Stransky <stransky@redhat.com> - 83.0-8
+- Added fix for rhbz#1900542
+
* Wed Nov 25 2020 Martin Stransky <stransky@redhat.com> - 83.0-7
- Export MOZ_GMP_PATH from /usr/bin/firefox script
(https://pagure.io/fedora-workstation/issue/126)
diff --git a/pw6.patch b/pw6.patch
index cc0cd7e..90f0879 100644
--- a/pw6.patch
+++ b/pw6.patch
@@ -1,7 +1,7 @@
-diff --git a/browser/actors/WebRTCParent.jsm b/browser/actors/WebRTCParent.jsm
---- a/browser/actors/WebRTCParent.jsm
-+++ b/browser/actors/WebRTCParent.jsm
-@@ -45,6 +45,9 @@
+diff -up firefox-83.0/browser/actors/WebRTCParent.jsm.pw6 firefox-83.0/browser/actors/WebRTCParent.jsm
+--- firefox-83.0/browser/actors/WebRTCParent.jsm.pw6 2020-11-12 19:04:30.000000000 +0100
++++ firefox-83.0/browser/actors/WebRTCParent.jsm 2020-11-25 10:28:32.492865982 +0100
+@@ -45,6 +45,9 @@ XPCOMUtils.defineLazyServiceGetter(
"nsIOSPermissionRequest"
);
@@ -11,7 +11,16 @@ diff --git a/browser/actors/WebRTCParent.jsm b/browser/actors/WebRTCParent.jsm
class WebRTCParent extends JSWindowActorParent {
didDestroy() {
webrtcUI.forgetStreamsFromBrowserContext(this.browsingContext);
-@@ -774,6 +777,23 @@
+@@ -753,6 +756,8 @@ function prompt(aActor, aBrowser, aReque
+ );
+ menupopup.appendChild(doc.createXULElement("menuseparator"));
+
++ let isPipeWire = false;
++
+ // Build the list of 'devices'.
+ let monitorIndex = 1;
+ for (let i = 0; i < devices.length; ++i) {
+@@ -774,6 +779,29 @@ function prompt(aActor, aBrowser, aReque
}
} else {
name = device.name;
@@ -21,10 +30,16 @@ diff --git a/browser/actors/WebRTCParent.jsm b/browser/actors/WebRTCParent.jsm
+ // Don't mark it as scary as there's an extra confirmation step by
+ // PipeWire portal dialog.
+ if (name == PIPEWIRE_PORTAL_NAME && device.id == PIPEWIRE_ID) {
-+ let sawcStringId = "getUserMedia.sharePipeWirePortal.label";
++ isPipeWire = true;
++ let name;
++ try {
++ name = stringBundle.getString("getUserMedia.sharePipeWirePortal.label");
++ } catch (err) {
++ name = "Use operating system settings"
++ }
+ let item = addDeviceToList(
+ menupopup,
-+ stringBundle.getString(sawcStringId),
++ name,
+ i,
+ type
+ );
@@ -35,10 +50,84 @@ diff --git a/browser/actors/WebRTCParent.jsm b/browser/actors/WebRTCParent.jsm
if (type == "application") {
// The application names returned by the platform are of the form:
// <window count>\x1e<application name>
-diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties
---- a/browser/locales/en-US/chrome/browser/browser.properties
-+++ b/browser/locales/en-US/chrome/browser/browser.properties
-@@ -767,6 +767,7 @@
+@@ -888,39 +916,41 @@ function prompt(aActor, aBrowser, aReque
+ perms.EXPIRE_SESSION
+ );
+
+- video.deviceId = deviceId;
+- let constraints = {
+- video: { mediaSource: type, deviceId: { exact: deviceId } },
+- };
+- chromeWin.navigator.mediaDevices.getUserMedia(constraints).then(
+- stream => {
+- if (video.deviceId != deviceId) {
+- // The user has selected a different device or closed the panel
+- // before getUserMedia finished.
+- stream.getTracks().forEach(t => t.stop());
+- return;
+- }
+- video.srcObject = stream;
+- video.stream = stream;
+- doc.getElementById("webRTC-preview").hidden = false;
+- video.onloadedmetadata = function(e) {
+- video.play();
+- };
+- },
+- err => {
+- if (
+- err.name == "OverconstrainedError" &&
+- err.constraint == "deviceId"
+- ) {
+- // Window has disappeared since enumeration, which can happen.
+- // No preview for you.
+- return;
++ if (!isPipeWire) {
++ video.deviceId = deviceId;
++ let constraints = {
++ video: { mediaSource: type, deviceId: { exact: deviceId } },
++ };
++ chromeWin.navigator.mediaDevices.getUserMedia(constraints).then(
++ stream => {
++ if (video.deviceId != deviceId) {
++ // The user has selected a different device or closed the panel
++ // before getUserMedia finished.
++ stream.getTracks().forEach(t => t.stop());
++ return;
++ }
++ video.srcObject = stream;
++ video.stream = stream;
++ doc.getElementById("webRTC-preview").hidden = false;
++ video.onloadedmetadata = function(e) {
++ video.play();
++ };
++ },
++ err => {
++ if (
++ err.name == "OverconstrainedError" &&
++ err.constraint == "deviceId"
++ ) {
++ // Window has disappeared since enumeration, which can happen.
++ // No preview for you.
++ return;
++ }
++ Cu.reportError(
++ `error in preview: ${err.message} ${err.constraint}`
++ );
+ }
+- Cu.reportError(
+- `error in preview: ${err.message} ${err.constraint}`
+- );
+- }
+- );
++ );
++ }
+ };
+ menupopup.addEventListener("command", menupopup._commandEventListener);
+ }
+diff -up firefox-83.0/browser/locales/en-US/chrome/browser/browser.properties.pw6 firefox-83.0/browser/locales/en-US/chrome/browser/browser.properties
+--- firefox-83.0/browser/locales/en-US/chrome/browser/browser.properties.pw6 2020-11-12 19:04:30.000000000 +0100
++++ firefox-83.0/browser/locales/en-US/chrome/browser/browser.properties 2020-11-25 09:24:26.378857626 +0100
+@@ -764,6 +764,7 @@ getUserMedia.selectWindowOrScreen.label=
getUserMedia.selectWindowOrScreen.accesskey=W
getUserMedia.pickWindowOrScreen.label = Select Window or Screen
getUserMedia.shareEntireScreen.label = Entire screen
@@ -46,10 +135,10 @@ diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/l
# LOCALIZATION NOTE (getUserMedia.shareMonitor.label):
# %S is screen number (digits 1, 2, etc)
# Example: Screen 1, Screen 2,..
-diff --git a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
---- a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
-+++ b/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
-@@ -898,17 +898,17 @@
+diff -up firefox-83.0/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.pw6 firefox-83.0/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+--- firefox-83.0/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.pw6 2020-11-25 09:24:26.358857788 +0100
++++ firefox-83.0/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc 2020-11-25 09:24:26.378857626 +0100
+@@ -879,17 +879,17 @@ void BaseCapturerPipeWire::CaptureFrame(
callback_->OnCaptureResult(Result::SUCCESS, std::move(result));
}
@@ -72,4 +161,3 @@ diff --git a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_cap
}
// static
-
diff --git a/pw7.patch b/pw7.patch
deleted file mode 100644
index db75dea..0000000
--- a/pw7.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-diff --git a/browser/actors/WebRTCParent.jsm b/browser/actors/WebRTCParent.jsm
---- a/browser/actors/WebRTCParent.jsm
-+++ b/browser/actors/WebRTCParent.jsm
-@@ -756,6 +756,8 @@
- );
- menupopup.appendChild(doc.createXULElement("menuseparator"));
-
-+ let isPipeWire = false;
-+
- // Build the list of 'devices'.
- let monitorIndex = 1;
- for (let i = 0; i < devices.length; ++i) {
-@@ -783,6 +785,7 @@
- // Don't mark it as scary as there's an extra confirmation step by
- // PipeWire portal dialog.
- if (name == PIPEWIRE_PORTAL_NAME && device.id == PIPEWIRE_ID) {
-+ isPipeWire = true;
- let sawcStringId = "getUserMedia.sharePipeWirePortal.label";
- let item = addDeviceToList(
- menupopup,
-@@ -908,39 +911,41 @@
- perms.EXPIRE_SESSION
- );
-
-- video.deviceId = deviceId;
-- let constraints = {
-- video: { mediaSource: type, deviceId: { exact: deviceId } },
-- };
-- chromeWin.navigator.mediaDevices.getUserMedia(constraints).then(
-- stream => {
-- if (video.deviceId != deviceId) {
-- // The user has selected a different device or closed the panel
-- // before getUserMedia finished.
-- stream.getTracks().forEach(t => t.stop());
-- return;
-+ if (!isPipeWire) {
-+ video.deviceId = deviceId;
-+ let constraints = {
-+ video: { mediaSource: type, deviceId: { exact: deviceId } },
-+ };
-+ chromeWin.navigator.mediaDevices.getUserMedia(constraints).then(
-+ stream => {
-+ if (video.deviceId != deviceId) {
-+ // The user has selected a different device or closed the panel
-+ // before getUserMedia finished.
-+ stream.getTracks().forEach(t => t.stop());
-+ return;
-+ }
-+ video.srcObject = stream;
-+ video.stream = stream;
-+ doc.getElementById("webRTC-preview").hidden = false;
-+ video.onloadedmetadata = function(e) {
-+ video.play();
-+ };
-+ },
-+ err => {
-+ if (
-+ err.name == "OverconstrainedError" &&
-+ err.constraint == "deviceId"
-+ ) {
-+ // Window has disappeared since enumeration, which can happen.
-+ // No preview for you.
-+ return;
-+ }
-+ Cu.reportError(
-+ `error in preview: ${err.message} ${err.constraint}`
-+ );
- }
-- video.srcObject = stream;
-- video.stream = stream;
-- doc.getElementById("webRTC-preview").hidden = false;
-- video.onloadedmetadata = function(e) {
-- video.play();
-- };
-- },
-- err => {
-- if (
-- err.name == "OverconstrainedError" &&
-- err.constraint == "deviceId"
-- ) {
-- // Window has disappeared since enumeration, which can happen.
-- // No preview for you.
-- return;
-- }
-- Cu.reportError(
-- `error in preview: ${err.message} ${err.constraint}`
-- );
-- }
-- );
-+ );
-+ }
- };
- menupopup.addEventListener("command", menupopup._commandEventListener);
- }
-
bgstack15