From 3e4543020f165af1162f23474e6ad66f391c48ef Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 22 Mar 2023 15:25:27 +0100 Subject: firefox: Rebase mute-by-default patch against v111 Firefox version 111.0 has refactored AutoplayPolicy.cpp a but and there is now a handy "IsWindowAllowedToPlayByUserGesture" function that is more convenient in that we just need to patch it to *always* return false. Signed-off-by: aszlig --- pkgs/aszlig/firefox/mute-by-default.patch | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'pkgs') diff --git a/pkgs/aszlig/firefox/mute-by-default.patch b/pkgs/aszlig/firefox/mute-by-default.patch index 67e6bce4..337ccf0f 100644 --- a/pkgs/aszlig/firefox/mute-by-default.patch +++ b/pkgs/aszlig/firefox/mute-by-default.patch @@ -1,11 +1,15 @@ diff --git a/dom/media/autoplay/AutoplayPolicy.cpp b/dom/media/autoplay/AutoplayPolicy.cpp -index 77c53ce58acd..688af016a72c 100644 +index 8da0e60ead..90991bf1dc 100644 --- a/dom/media/autoplay/AutoplayPolicy.cpp +++ b/dom/media/autoplay/AutoplayPolicy.cpp -@@ -78,15 +78,6 @@ static bool IsWindowAllowedToPlay(nsPIDOMWindowInner* aWindow) { - return true; - } +@@ -69,18 +69,6 @@ static uint32_t SiteAutoplayPerm(nsPIDOMWindowInner* aWindow) { + } + static bool IsWindowAllowedToPlayByUserGesture(nsPIDOMWindowInner* aWindow) { +- if (!aWindow) { +- return false; +- } +- - WindowContext* topContext = - aWindow->GetBrowsingContext()->GetTopWindowContext(); - if (topContext && topContext->HasBeenUserGestureActivated()) { @@ -14,7 +18,6 @@ index 77c53ce58acd..688af016a72c 100644 - "gesture."); - return true; - } -- - Document* currentDoc = aWindow->GetExtantDoc(); - if (!currentDoc) { - return false; + return false; + } + -- cgit 1.4.1