Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (290951 => 290952)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-07 22:11:12 UTC (rev 290951)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-07 22:11:16 UTC (rev 290952)
@@ -1,5 +1,48 @@
2022-03-07 Russell Epstein <[email protected]>
+ Cherry-pick r290778. rdar://problem/88297045
+
+ macOS Safari 15.2 Audio Echo Issue after camera pause/unpause
+ https://bugs.webkit.org/show_bug.cgi?id=235544
+ <rdar://problem/88297045>
+
+ Reviewed by Eric Carlson.
+
+ Source/WebCore:
+
+ After https://commits.webkit.org/r275600, the muted state of MediaPlayer would be set to the page muted state
+ without taking into consideration HTMLMediaElement.muted.
+ Update the call site to use effectiveMuted instead.
+ Add internals API to write a corresponding layout test.
+
+ Test: fast/mediastream/mediastreamtrack-audiovideo-mutepage.html
+
+ * html/HTMLMediaElement.cpp:
+ * testing/Internals.cpp:
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
+ LayoutTests:
+
+ * fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt: Added.
+ * fast/mediastream/mediastreamtrack-audiovideo-mutepage.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-03 Youenn Fablet <[email protected]>
+
+ macOS Safari 15.2 Audio Echo Issue after camera pause/unpause
+ https://bugs.webkit.org/show_bug.cgi?id=235544
+ <rdar://problem/88297045>
+
+ Reviewed by Eric Carlson.
+
+ * fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt: Added.
+ * fast/mediastream/mediastreamtrack-audiovideo-mutepage.html: Added.
+
+2022-03-07 Russell Epstein <[email protected]>
+
Cherry-pick r290765. rdar://problem/89232969
Throw proper exception on failed removeEntry() calls
Added: branches/safari-613-branch/LayoutTests/fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt (0 => 290952)
--- branches/safari-613-branch/LayoutTests/fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt 2022-03-07 22:11:16 UTC (rev 290952)
@@ -0,0 +1,4 @@
+
+
+PASS Muting then unmuting a page should not change media element muted state if HTMLMediaElement.muted is true
+
Added: branches/safari-613-branch/LayoutTests/fast/mediastream/mediastreamtrack-audiovideo-mutepage.html (0 => 290952)
--- branches/safari-613-branch/LayoutTests/fast/mediastream/mediastreamtrack-audiovideo-mutepage.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/mediastream/mediastreamtrack-audiovideo-mutepage.html 2022-03-07 22:11:16 UTC (rev 290952)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <script src=""
+ <script src=""
+</head>
+<body>
+ <video id='video' autoplay playsinline muted></video>
+ <script>
+ promise_test(async (t) => {
+ video.srcObject = await navigator.mediaDevices.getUserMedia({ video: true, audio: true });
+ await video.play();
+
+ if (!window.internals)
+ return;
+
+ assert_true(internals.isPlayerMuted(video), "test1");
+
+ internals.setPageMuted("capturedevices");
+ await new Promise(resolve => video.srcObject.getAudioTracks()[0]._onmute_ = resolve);
+
+ assert_true(internals.isPlayerMuted(video), "test2");
+
+ internals.setPageMuted("");
+ await new Promise(resolve => video.srcObject.getAudioTracks()[0]._onunmute_ = resolve);
+
+ assert_true(internals.isPlayerMuted(video), "test3");
+ }, "Muting then unmuting a page should not change media element muted state if HTMLMediaElement.muted is true");
+ </script>
+</body>
+</html>
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (290951 => 290952)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-07 22:11:12 UTC (rev 290951)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-07 22:11:16 UTC (rev 290952)
@@ -1,5 +1,57 @@
2022-03-07 Russell Epstein <[email protected]>
+ Cherry-pick r290778. rdar://problem/88297045
+
+ macOS Safari 15.2 Audio Echo Issue after camera pause/unpause
+ https://bugs.webkit.org/show_bug.cgi?id=235544
+ <rdar://problem/88297045>
+
+ Reviewed by Eric Carlson.
+
+ Source/WebCore:
+
+ After https://commits.webkit.org/r275600, the muted state of MediaPlayer would be set to the page muted state
+ without taking into consideration HTMLMediaElement.muted.
+ Update the call site to use effectiveMuted instead.
+ Add internals API to write a corresponding layout test.
+
+ Test: fast/mediastream/mediastreamtrack-audiovideo-mutepage.html
+
+ * html/HTMLMediaElement.cpp:
+ * testing/Internals.cpp:
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
+ LayoutTests:
+
+ * fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt: Added.
+ * fast/mediastream/mediastreamtrack-audiovideo-mutepage.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-03 Youenn Fablet <[email protected]>
+
+ macOS Safari 15.2 Audio Echo Issue after camera pause/unpause
+ https://bugs.webkit.org/show_bug.cgi?id=235544
+ <rdar://problem/88297045>
+
+ Reviewed by Eric Carlson.
+
+ After https://commits.webkit.org/r275600, the muted state of MediaPlayer would be set to the page muted state
+ without taking into consideration HTMLMediaElement.muted.
+ Update the call site to use effectiveMuted instead.
+ Add internals API to write a corresponding layout test.
+
+ Test: fast/mediastream/mediastreamtrack-audiovideo-mutepage.html
+
+ * html/HTMLMediaElement.cpp:
+ * testing/Internals.cpp:
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
+2022-03-07 Russell Epstein <[email protected]>
+
Cherry-pick r290706. rdar://problem/89566459
REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
Modified: branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp (290951 => 290952)
--- branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp 2022-03-07 22:11:12 UTC (rev 290951)
+++ branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp 2022-03-07 22:11:16 UTC (rev 290952)
@@ -8163,10 +8163,10 @@
void HTMLMediaElement::pageMutedStateDidChange()
{
- if (Page* page = document().page()) {
+ if (auto* page = document().page()) {
// Propagate the new state to the platform player.
if (m_player)
- m_player->setMuted(page->isAudioMuted());
+ m_player->setMuted(effectiveMuted());
if (hasAudio() && !muted() && page->isAudioMuted())
userDidInterfereWithAutoplay();
}
Modified: branches/safari-613-branch/Source/WebCore/testing/Internals.cpp (290951 => 290952)
--- branches/safari-613-branch/Source/WebCore/testing/Internals.cpp 2022-03-07 22:11:12 UTC (rev 290951)
+++ branches/safari-613-branch/Source/WebCore/testing/Internals.cpp 2022-03-07 22:11:16 UTC (rev 290952)
@@ -4462,17 +4462,22 @@
#endif
}
-bool Internals::elementIsBlockingDisplaySleep(HTMLMediaElement& element) const
+bool Internals::elementIsBlockingDisplaySleep(const HTMLMediaElement& element) const
{
return element.isDisablingSleep();
}
-bool Internals::isPlayerVisibleInViewport(HTMLMediaElement& element) const
+bool Internals::isPlayerVisibleInViewport(const HTMLMediaElement& element) const
{
auto player = element.player();
return player && player->isVisibleInViewport();
}
+bool Internals::isPlayerMuted(const HTMLMediaElement& element) const
+{
+ auto player = element.player();
+ return player && player->muted();
+}
#endif // ENABLE(VIDEO)
#if ENABLE(WEB_AUDIO)
Modified: branches/safari-613-branch/Source/WebCore/testing/Internals.h (290951 => 290952)
--- branches/safari-613-branch/Source/WebCore/testing/Internals.h 2022-03-07 22:11:12 UTC (rev 290951)
+++ branches/safari-613-branch/Source/WebCore/testing/Internals.h 2022-03-07 22:11:16 UTC (rev 290952)
@@ -727,8 +727,9 @@
void setMediaElementRestrictions(HTMLMediaElement&, StringView restrictionsString);
ExceptionOr<void> postRemoteControlCommand(const String&, float argument);
void activeAudioRouteDidChange(bool shouldPause);
- bool elementIsBlockingDisplaySleep(HTMLMediaElement&) const;
- bool isPlayerVisibleInViewport(HTMLMediaElement&) const;
+ bool elementIsBlockingDisplaySleep(const HTMLMediaElement&) const;
+ bool isPlayerVisibleInViewport(const HTMLMediaElement&) const;
+ bool isPlayerMuted(const HTMLMediaElement&) const;
#endif
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
Modified: branches/safari-613-branch/Source/WebCore/testing/Internals.idl (290951 => 290952)
--- branches/safari-613-branch/Source/WebCore/testing/Internals.idl 2022-03-07 22:11:12 UTC (rev 290951)
+++ branches/safari-613-branch/Source/WebCore/testing/Internals.idl 2022-03-07 22:11:16 UTC (rev 290952)
@@ -806,6 +806,7 @@
[Conditional=VIDEO] undefined simulateSystemWake();
[Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
[Conditional=VIDEO] boolean isPlayerVisibleInViewport(HTMLMediaElement element);
+ [Conditional=VIDEO] boolean isPlayerMuted(HTMLMediaElement element);
MockPageOverlay installMockPageOverlay(PageOverlayType type);
DOMString pageOverlayLayerTreeAsText(optional unsigned short flags = 0);