Title: [268196] trunk
Revision
268196
Author
peng.l...@apple.com
Date
2020-10-08 11:18:55 -0700 (Thu, 08 Oct 2020)

Log Message

RemoteAudioSession::category() returns an incorrect value after category changing
https://bugs.webkit.org/show_bug.cgi?id=217459

Reviewed by Youenn Fablet.

Source/WebKit:

No new tests, covered by existing tests.

* WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::setCategory): Update `m_configuration.category`
and `m_configuration.routeSharingPolicy` so that RemoteAudioSession::category()
will return the correct value.
* WebProcess/GPU/media/RemoteAudioSession.h:

LayoutTests:

* gpu-process/TestExpectations: Minor clean-up and unskip some tests after fixing
the bug of RemoteAudioSession::category().
* platform/mac/media/audio-session-category-audio-autoplay.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (268195 => 268196)


--- trunk/LayoutTests/ChangeLog	2020-10-08 18:18:30 UTC (rev 268195)
+++ trunk/LayoutTests/ChangeLog	2020-10-08 18:18:55 UTC (rev 268196)
@@ -1,3 +1,14 @@
+2020-10-08  Peng Liu  <peng.l...@apple.com>
+
+        RemoteAudioSession::category() returns an incorrect value after category changing
+        https://bugs.webkit.org/show_bug.cgi?id=217459
+
+        Reviewed by Youenn Fablet.
+
+        * gpu-process/TestExpectations: Minor clean-up and unskip some tests after fixing
+        the bug of RemoteAudioSession::category().
+        * platform/mac/media/audio-session-category-audio-autoplay.html:
+
 2020-10-08  Karl Rackler  <rack...@apple.com>
 
         Move test expectations from ios-wk2 to ios-simulator-wk2

Modified: trunk/LayoutTests/gpu-process/TestExpectations (268195 => 268196)


--- trunk/LayoutTests/gpu-process/TestExpectations	2020-10-08 18:18:30 UTC (rev 268195)
+++ trunk/LayoutTests/gpu-process/TestExpectations	2020-10-08 18:18:55 UTC (rev 268196)
@@ -143,7 +143,6 @@
 media/modern-media-controls/media-controller/ios/media-controller-scale-factor.html [ Skip ]
 media/modern-media-controls/media-controller/ios/media-controller-stop-updates-in-fullscreen.html [ Skip ]
 media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html [ Skip ]
-media/modern-media-controls/media-controller/media-controller-auto-hide.html [ Crash ]
 media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html [ Skip ]
 media/modern-media-controls/media-controller/media-controller-fullscreen-change.html [ Skip ]
 media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html [ Skip ]
@@ -159,6 +158,7 @@
 media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html [ Skip ]
 media/modern-media-controls/placard-support/placard-support-airplay.html [ Skip ]
 media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
+media/modern-media-controls/placard/placard-ltr.html [ Skip ]
 media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Skip ]
 media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html [ Skip ]
 media/modern-media-controls/start-support/start-support-fullscreen.html [ Skip ]
@@ -238,11 +238,6 @@
 media/W3C/video/events/event_progress_manual.html [ Skip ]
 media/W3C/video/networkState/networkState_during_progress.html [ Skip ]
 media/W3C/video/networkState/networkState_during_loadstart.html [ Skip ]
-
-platform/mac/media [ Pass ]
-platform/mac/media/audio-session-category-audio-autoplay.html [ Skip ]
-platform/mac/media/audio-session-category-video-paused.html [ Skip ]
-platform/mac/media/audio-session-category-video-track-change.html [ Skip ]
 platform/mac/media/audio-session-deactivated-when-suspended.html [ Skip ]
 platform/mac/media/video-best-element-for-playback-controls-purpose.html [ Skip ]
 platform/mac/media/media-source [ Skip ]

Modified: trunk/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html (268195 => 268196)


--- trunk/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html	2020-10-08 18:18:30 UTC (rev 268195)
+++ trunk/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html	2020-10-08 18:18:55 UTC (rev 268196)
@@ -20,6 +20,6 @@
     </script>
 </head>
 <body _onload_="go()">
-    <audio controls></video>
+    <audio controls></audio>
 </body>
 </html>

Modified: trunk/Source/WebKit/ChangeLog (268195 => 268196)


--- trunk/Source/WebKit/ChangeLog	2020-10-08 18:18:30 UTC (rev 268195)
+++ trunk/Source/WebKit/ChangeLog	2020-10-08 18:18:55 UTC (rev 268196)
@@ -1,3 +1,18 @@
+2020-10-08  Peng Liu  <peng.l...@apple.com>
+
+        RemoteAudioSession::category() returns an incorrect value after category changing
+        https://bugs.webkit.org/show_bug.cgi?id=217459
+
+        Reviewed by Youenn Fablet.
+
+        No new tests, covered by existing tests.
+
+        * WebProcess/GPU/media/RemoteAudioSession.cpp:
+        (WebKit::RemoteAudioSession::setCategory): Update `m_configuration.category`
+        and `m_configuration.routeSharingPolicy` so that RemoteAudioSession::category()
+        will return the correct value.
+        * WebProcess/GPU/media/RemoteAudioSession.h:
+
 2020-10-08  Aditya Keerthi  <akeer...@apple.com>
 
         [iOS] Blurring a text input and focusing a date input changes the scrollable area

Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp (268195 => 268196)


--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp	2020-10-08 18:18:30 UTC (rev 268195)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp	2020-10-08 18:18:55 UTC (rev 268196)
@@ -65,12 +65,13 @@
 
 void RemoteAudioSession::setCategory(CategoryType type, RouteSharingPolicy policy)
 {
-    if (type == m_category && policy == m_routeSharingPolicy)
+    if (type == m_configuration.category && policy == m_configuration.routeSharingPolicy)
         return;
 
-    m_category = type;
-    m_routeSharingPolicy = policy;
-    connection().send(Messages::RemoteAudioSessionProxy::SetCategory(m_category, m_routeSharingPolicy), { });
+    m_configuration.category = type;
+    m_configuration.routeSharingPolicy = policy;
+
+    connection().send(Messages::RemoteAudioSessionProxy::SetCategory(type, policy), { });
 }
 
 void RemoteAudioSession::setPreferredBufferSize(size_t size)

Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.h (268195 => 268196)


--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.h	2020-10-08 18:18:30 UTC (rev 268195)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.h	2020-10-08 18:18:55 UTC (rev 268196)
@@ -76,8 +76,6 @@
 
     WebProcess& m_process;
     RemoteAudioSessionConfiguration m_configuration;
-    WebCore::AudioSession::CategoryType m_category;
-    WebCore::RouteSharingPolicy m_routeSharingPolicy;
 };
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to