Diff
Modified: trunk/LayoutTests/ChangeLog (245963 => 245964)
--- trunk/LayoutTests/ChangeLog 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/LayoutTests/ChangeLog 2019-05-31 15:20:48 UTC (rev 245964)
@@ -1,3 +1,16 @@
+2019-05-31 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r245946.
+
+ Breaks the watchOS build.
+
+ Reverted changeset:
+
+ "Add an option to mute audio capture automatically when page
+ is not visible"
+ https://bugs.webkit.org/show_bug.cgi?id=198307
+ https://trac.webkit.org/changeset/245946
+
2019-05-31 Per Arne Vollan <pvol...@apple.com>
[Win10] Some tests are failing only on specific machines
Deleted: trunk/LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab-expected.txt (245963 => 245964)
--- trunk/LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab-expected.txt 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab-expected.txt 2019-05-31 15:20:48 UTC (rev 245964)
@@ -1,7 +0,0 @@
-
-PASS Setup stream
-PASS Hide page, video and audio should be muted
-PASS Show page, video and audio should be unmuted
-PASS Hide and mute page, video and audio should be muted
-PASS Show page, video and audio should remain muted
-
Deleted: trunk/LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab.html (245963 => 245964)
--- trunk/LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab.html 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab.html 2019-05-31 15:20:48 UTC (rev 245964)
@@ -1,72 +0,0 @@
-
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>Don't unmute audio when a tab becomes visible unless it was muted when the tab was hidden</title>
- <script src=""
- <script src=""
- </head>
- <body>
- <script>
- let audioTrack;
- let videoTrack;
-
- promise_test((t) => {
- if (window.testRunner)
- testRunner.setUserMediaPermission(true);
- if (!window.internals)
- return Promise.reject("this test needs internals API");
-
- internals.setShouldInterruptAudioOnPageVisibilityChange(true);
-
- return navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then((stream) => {
- audioTrack = stream.getAudioTracks()[0];
- videoTrack = stream.getVideoTracks()[0];
-
- assert_false(audioTrack.muted, "audio track is active");
- assert_false(videoTrack.muted, "video track is active");
- })
-
- .then(() => {
- test(() => {
- if (window.internals)
- window.internals.setPageVisibility(false);
- assert_true(audioTrack.muted, "audio track is muted");
- assert_true(videoTrack.muted, "video track is muted");
- }, "Hide page, video and audio should be muted");
- })
-
- .then(() => {
- test(() => {
- if (window.internals)
- window.internals.setPageVisibility(true);
- assert_false(audioTrack.muted, "audio track is active");
- assert_false(videoTrack.muted, "video track is active");
- }, "Show page, video and audio should be unmuted");
- })
-
- .then(() => {
- test(() => {
- if (window.internals) {
- window.internals.setPageVisibility(false);
- window.internals.setPageMuted("capturedevices");
- }
- assert_true(audioTrack.muted, "audio track is muted");
- assert_true(videoTrack.muted, "video track is muted");
- }, "Hide and mute page, video and audio should be muted");
- })
-
- .then(() => {
- test(() => {
- if (window.internals)
- window.internals.setPageVisibility(true);
- assert_true(audioTrack.muted, "audio track is muted");
- assert_true(videoTrack.muted, "video track is muted");
- }, "Show page, video and audio should remain muted");
- })
- }, "Setup stream");
-
- </script>
- </body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (245963 => 245964)
--- trunk/Source/WebCore/ChangeLog 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/ChangeLog 2019-05-31 15:20:48 UTC (rev 245964)
@@ -1,3 +1,16 @@
+2019-05-31 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r245946.
+
+ Breaks the watchOS build.
+
+ Reverted changeset:
+
+ "Add an option to mute audio capture automatically when page
+ is not visible"
+ https://bugs.webkit.org/show_bug.cgi?id=198307
+ https://trac.webkit.org/changeset/245946
+
2019-05-31 Zalan Bujtas <za...@apple.com>
[LFC[IFC] Do not reuse the same Line object.
Modified: trunk/Source/WebCore/SourcesCocoa.txt (245963 => 245964)
--- trunk/Source/WebCore/SourcesCocoa.txt 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/SourcesCocoa.txt 2019-05-31 15:20:48 UTC (rev 245964)
@@ -542,7 +542,6 @@
platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp
platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm
platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp
-platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm
platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp
platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp
platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (245963 => 245964)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-05-31 15:20:48 UTC (rev 245964)
@@ -7278,7 +7278,6 @@
4162A44F101145AE00DFF3ED /* DedicatedWorkerGlobalScope.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DedicatedWorkerGlobalScope.idl; sourceTree = "<group>"; };
4162A4551011464700DFF3ED /* JSDedicatedWorkerGlobalScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDedicatedWorkerGlobalScope.cpp; sourceTree = "<group>"; };
4162A4561011464700DFF3ED /* JSDedicatedWorkerGlobalScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDedicatedWorkerGlobalScope.h; sourceTree = "<group>"; };
- 416CE4A4229DF12E00A8A686 /* RealtimeMediaSourceCenterMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RealtimeMediaSourceCenterMac.mm; sourceTree = "<group>"; };
416D759F20C6441300D02D2C /* NetworkLoadInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkLoadInformation.h; sourceTree = "<group>"; };
416E0B37209BC3C2004A95D9 /* FetchIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchIdentifier.h; sourceTree = "<group>"; };
416E29A5102FA962007FC14E /* WorkerReportingProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerReportingProxy.h; sourceTree = "<group>"; };
@@ -15883,7 +15882,6 @@
5CDD833A1E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.h */,
5CDD83391E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.mm */,
4A0FFAA31AAF5EF60062803B /* RealtimeMediaSourceCenterMac.cpp */,
- 416CE4A4229DF12E00A8A686 /* RealtimeMediaSourceCenterMac.mm */,
41103AA71E39790A00769F14 /* RealtimeOutgoingAudioSourceCocoa.cpp */,
41103AA81E39790A00769F14 /* RealtimeOutgoingAudioSourceCocoa.h */,
5CDD833B1E4324BB00621B83 /* RealtimeOutgoingVideoSourceCocoa.cpp */,
@@ -16388,6 +16386,8 @@
115CFA9A208BC140001E6991 /* inlineformatting */ = {
isa = PBXGroup;
children = (
+ 6F0CD694229ED32700C5994E /* InlineLine.h */,
+ 6F0CD692229ED31900C5994E /* InlineLine.cpp */,
6FE7DDDD20EC6E8B008B5B4E /* text */,
6F7CA3C9208C2B2E002F29AB /* InlineFormattingContext.cpp */,
6F7CA3C8208C2B2E002F29AB /* InlineFormattingContext.h */,
@@ -16398,8 +16398,6 @@
1123AFDD209ABBBA00736ACC /* InlineInvalidation.cpp */,
1123AFDC209ABBBA00736ACC /* InlineInvalidation.h */,
6FE7CFA02177EEF1005B1573 /* InlineItem.h */,
- 6F0CD692229ED31900C5994E /* InlineLine.cpp */,
- 6F0CD694229ED32700C5994E /* InlineLine.h */,
6FB47E612277425A00C7BCB0 /* InlineLineBox.h */,
6FE198132178397B00446F08 /* InlineLineBreaker.cpp */,
6FE198152178397C00446F08 /* InlineLineBreaker.h */,
@@ -28193,6 +28191,7 @@
714C7C661FDAD2A100F2BEE1 /* AnimationPlaybackEvent.h in Headers */,
714C7C671FDAD2A900F2BEE1 /* AnimationPlaybackEventInit.h in Headers */,
71025ECD1F99F0CE004A250C /* AnimationTimeline.h in Headers */,
+ 6F0CD695229ED32700C5994E /* InlineLine.h in Headers */,
0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */,
57152B5A21CB3E88000C37CA /* ApduCommand.h in Headers */,
57152B5C21CC1902000C37CA /* ApduResponse.h in Headers */,
@@ -29498,7 +29497,6 @@
11310CF820BA4A6A0065A8D0 /* InlineInvalidation.h in Headers */,
6FE7CFA22177EEF2005B1573 /* InlineItem.h in Headers */,
BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */,
- 6F0CD695229ED32700C5994E /* InlineLine.h in Headers */,
6FB47E632277425A00C7BCB0 /* InlineLineBox.h in Headers */,
6FE198172178397C00446F08 /* InlineLineBreaker.h in Headers */,
AA4C3A770B2B1679002334A2 /* InlineStyleSheetOwner.h in Headers */,
Modified: trunk/Source/WebCore/dom/Document.cpp (245963 => 245964)
--- trunk/Source/WebCore/dom/Document.cpp 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/dom/Document.cpp 2019-05-31 15:20:48 UTC (rev 245964)
@@ -7648,7 +7648,7 @@
if (!page())
return;
- RealtimeMediaSourceCenter::singleton().setCapturePageState(hidden(), page()->isMediaCaptureMuted());
+ RealtimeMediaSourceCenter::singleton().setVideoCapturePageState(hidden(), page()->isMediaCaptureMuted());
#endif
}
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (245963 => 245964)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -357,9 +357,6 @@
bool pageAtRuleSupportEnabled() const { return m_pageAtRuleSupportEnabled; }
void setPageAtRuleSupportEnabled(bool isEnabled) { m_pageAtRuleSupportEnabled = isEnabled; }
- bool interruptAudioOnPageVisibilityChangeEnabled() const { return m_interruptAudioOnPageVisibilityChangeEnabled; }
- void setInterruptAudioOnPageVisibilityChangeEnabled(bool enabled) { m_interruptAudioOnPageVisibilityChangeEnabled = enabled; }
-
WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
private:
@@ -543,7 +540,6 @@
bool m_isITPFirstPartyWebsiteDataRemovalEnabled { false };
bool m_referrerPolicyAttributeEnabled { false };
- bool m_interruptAudioOnPageVisibilityChangeEnabled { false };
friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
};
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp 2019-05-31 15:20:48 UTC (rev 245964)
@@ -38,7 +38,6 @@
#include "CaptureDeviceManager.h"
#include "Logging.h"
#include "MediaStreamPrivate.h"
-#include "RuntimeEnabledFeatures.h"
#include <wtf/SHA1.h>
namespace WebCore {
@@ -263,10 +262,8 @@
validHandler(WTFMove(audioDevices), WTFMove(videoDevices), WTFMove(deviceIdentifierHashSalt));
}
-void RealtimeMediaSourceCenter::setCapturePageState(bool interrupted, bool pageMuted)
+void RealtimeMediaSourceCenter::setVideoCapturePageState(bool interrupted, bool pageMuted)
{
- if (RuntimeEnabledFeatures::sharedFeatures().interruptAudioOnPageVisibilityChangeEnabled())
- audioCaptureFactory().setAudioCapturePageState(interrupted, pageMuted);
videoCaptureFactory().setVideoCapturePageState(interrupted, pageMuted);
}
@@ -320,13 +317,6 @@
return m_displayCaptureFactoryOverride ? *m_displayCaptureFactoryOverride : defaultDisplayCaptureFactory();
}
-#if !PLATFORM(COCOA)
-bool RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange()
-{
- return false;
-}
-#endif
-
} // namespace WebCore
#endif // ENABLE(MEDIA_STREAM)
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -86,12 +86,10 @@
WEBCORE_EXPORT void setDevicesChangedObserver(std::function<void()>&&);
- void setCapturePageState(bool interrupted, bool pageMuted);
+ void setVideoCapturePageState(bool, bool);
void captureDevicesChanged();
- WEBCORE_EXPORT static bool shouldInterruptAudioOnPageVisibilityChange();
-
private:
RealtimeMediaSourceCenter();
friend class NeverDestroyed<RealtimeMediaSourceCenter>;
@@ -115,8 +113,6 @@
AudioCaptureFactory* m_audioCaptureFactoryOverride { nullptr };
VideoCaptureFactory* m_videoCaptureFactoryOverride { nullptr };
DisplayCaptureFactory* m_displayCaptureFactoryOverride { nullptr };
-
- bool m_shouldInterruptAudioOnPageVisibilityChange { false };
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceFactory.h (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceFactory.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceFactory.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -57,11 +57,6 @@
virtual ~AudioCaptureFactory() = default;
virtual CaptureSourceOrError createAudioCaptureSource(const CaptureDevice&, String&&, const MediaConstraints*) = 0;
virtual CaptureDeviceManager& audioCaptureDeviceManager() = 0;
- virtual void setAudioCapturePageState(bool interrupted, bool pageMuted)
- {
- UNUSED_PARAM(interrupted);
- UNUSED_PARAM(pageMuted);
- }
protected:
AudioCaptureFactory() = default;
@@ -76,11 +71,7 @@
virtual ~VideoCaptureFactory() = default;
virtual CaptureSourceOrError createVideoCaptureSource(const CaptureDevice&, String&&, const MediaConstraints*) = 0;
virtual CaptureDeviceManager& videoCaptureDeviceManager() = 0;
- virtual void setVideoCapturePageState(bool interrupted, bool pageMuted)
- {
- UNUSED_PARAM(interrupted);
- UNUSED_PARAM(pageMuted);
- }
+ virtual void setVideoCapturePageState(bool, bool) { }
protected:
VideoCaptureFactory() = default;
@@ -91,6 +82,7 @@
virtual ~DisplayCaptureFactory() = default;
virtual CaptureSourceOrError createDisplayCaptureSource(const CaptureDevice&, const MediaConstraints*) = 0;
virtual CaptureDeviceManager& displayCaptureDeviceManager() = 0;
+ virtual void setDisplayCapturePageState(bool , bool) { }
protected:
DisplayCaptureFactory() = default;
Modified: trunk/Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm 2019-05-31 15:20:48 UTC (rev 245964)
@@ -126,12 +126,6 @@
return factory.get();
}
-void CoreAudioCaptureSourceFactory::setAudioCapturePageState(bool interrupted, bool pageMuted)
-{
- if (auto* activeSource = this->activeSource())
- activeSource->setInterrupted(interrupted, pageMuted);
}
-}
-
#endif // ENABLE(MEDIA_STREAM) && PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -142,9 +142,6 @@
}
CaptureDeviceManager& audioCaptureDeviceManager() final;
-#if PLATFORM(IOS_FAMILY)
- void setAudioCapturePageState(bool interrupted, bool pageMuted) final;
-#endif
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 2019-05-31 15:20:48 UTC (rev 245964)
@@ -38,7 +38,6 @@
#include "DisplayCaptureManagerCocoa.h"
#include "Logging.h"
#include "MediaStreamPrivate.h"
-#include "RuntimeEnabledFeatures.h"
#include "ScreenDisplayCaptureSourceMac.h"
#include "WindowDisplayCaptureSourceMac.h"
#include <wtf/MainThread.h>
Deleted: trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm (245963 => 245964)
--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm 2019-05-31 15:20:48 UTC (rev 245964)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RealtimeMediaSourceCenter.h"
-
-#if ENABLE(MEDIA_STREAM)
-
-namespace WebCore {
-
-bool RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange()
-{
-#if PLATFORM(IOS)
- NSArray *modes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"];
- if (!modes)
- return true;
-
- int modesCount = [modes count];
- for (int i = 0; i < modesCount; i++) {
- if ([[modes objectAtIndex:i] isEqual: @"audio"])
- return false;
- }
- return true;
-#else
- return false;
-#endif
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
Modified: trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp (245963 => 245964)
--- trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp 2019-05-31 15:20:48 UTC (rev 245964)
@@ -96,7 +96,7 @@
private:
#if PLATFORM(IOS_FAMILY)
- void setVideoCapturePageState(bool interrupted, bool pageMuted) final
+ void setVideoCapturePageState(bool interrupted, bool pageMuted)
{
if (activeSource())
activeSource()->setInterrupted(interrupted, pageMuted);
@@ -139,13 +139,6 @@
return MockRealtimeAudioSource::create(String { device.persistentId() }, String { device.label() }, WTFMove(hashSalt), constraints);
}
private:
-#if PLATFORM(IOS_FAMILY)
- void setAudioCapturePageState(bool interrupted, bool pageMuted) final
- {
- if (activeSource())
- activeSource()->setInterrupted(interrupted, pageMuted);
- }
-#endif
CaptureDeviceManager& audioCaptureDeviceManager() final { return MockRealtimeMediaSourceCenter::singleton().audioCaptureDeviceManager(); }
};
Modified: trunk/Source/WebCore/testing/Internals.cpp (245963 => 245964)
--- trunk/Source/WebCore/testing/Internals.cpp 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/testing/Internals.cpp 2019-05-31 15:20:48 UTC (rev 245964)
@@ -532,10 +532,6 @@
page.setFullscreenControlsHidden(false);
MediaEngineConfigurationFactory::disableMock();
-
-#if ENABLE(MEDIA_STREAM)
- RuntimeEnabledFeatures::sharedFeatures().setInterruptAudioOnPageVisibilityChangeEnabled(false);
-#endif
}
Internals::Internals(Document& document)
@@ -1506,10 +1502,6 @@
#endif
#if ENABLE(MEDIA_STREAM)
-void Internals::setShouldInterruptAudioOnPageVisibilityChange(bool shouldInterrupt)
-{
- RuntimeEnabledFeatures::sharedFeatures().setInterruptAudioOnPageVisibilityChangeEnabled(shouldInterrupt);
-}
void Internals::setMockMediaCaptureDevicesEnabled(bool enabled)
{
Modified: trunk/Source/WebCore/testing/Internals.h (245963 => 245964)
--- trunk/Source/WebCore/testing/Internals.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/testing/Internals.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -516,7 +516,6 @@
#endif
#if ENABLE(MEDIA_STREAM)
- void setShouldInterruptAudioOnPageVisibilityChange(bool);
void setMockMediaCaptureDevicesEnabled(bool);
void setMediaCaptureRequiresSecureConnection(bool);
void setCustomPrivateRecorderCreator();
Modified: trunk/Source/WebCore/testing/Internals.idl (245963 => 245964)
--- trunk/Source/WebCore/testing/Internals.idl 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebCore/testing/Internals.idl 2019-05-31 15:20:48 UTC (rev 245964)
@@ -672,7 +672,6 @@
[Conditional=WEB_RTC] void setH264HardwareEncoderAllowed(boolean allowed);
[Conditional=WEB_RTC] void applyRotationForOutgoingVideoSources(RTCPeerConnection connection);
- [Conditional=MEDIA_STREAM] void setShouldInterruptAudioOnPageVisibilityChange(boolean shouldInterrupt);
[Conditional=MEDIA_STREAM] void setCameraMediaStreamTrackOrientation(MediaStreamTrack track, short orientation);
[Conditional=MEDIA_STREAM] void observeMediaStreamTrack(MediaStreamTrack track);
[Conditional=MEDIA_STREAM] Promise<ImageData> grabNextMediaStreamTrackFrame();
Modified: trunk/Source/WebKit/ChangeLog (245963 => 245964)
--- trunk/Source/WebKit/ChangeLog 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/ChangeLog 2019-05-31 15:20:48 UTC (rev 245964)
@@ -1,3 +1,16 @@
+2019-05-31 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r245946.
+
+ Breaks the watchOS build.
+
+ Reverted changeset:
+
+ "Add an option to mute audio capture automatically when page
+ is not visible"
+ https://bugs.webkit.org/show_bug.cgi?id=198307
+ https://trac.webkit.org/changeset/245946
+
2019-05-31 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] WPERenderer: ensure we complete the last frame when leaving AC mode
Modified: trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb (245963 => 245964)
--- trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb 2019-05-31 15:20:48 UTC (rev 245964)
@@ -36,7 +36,6 @@
// FIXME: These should added via options in WebPreferences.yaml, rather than hardcoded.
#include <WebCore/DeprecatedGlobalSettings.h>
#include <WebCore/LibWebRTCProvider.h>
-#include <WebCore/RealtimeMediaSourceCenter.h>
#include <WebCore/SecurityOrigin.h>
#include <WebCore/Settings.h>
#include <WebCore/TextEncodingRegistry.h>
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (245963 => 245964)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-05-31 15:20:48 UTC (rev 245964)
@@ -545,12 +545,6 @@
webcoreBinding: RuntimeEnabledFeatures
condition: ENABLE(WEB_RTC)
-InterruptAudioOnPageVisibilityChangeEnabled:
- type: bool
- defaultValue: WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange()
- webcoreBinding: RuntimeEnabledFeatures
- condition: ENABLE(MEDIA_STREAM)
-
WebRTCUnifiedPlanEnabled:
type: bool
defaultValue: true
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (245963 => 245964)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2019-05-31 15:20:48 UTC (rev 245964)
@@ -649,16 +649,6 @@
_preferences->setInactiveMediaCaptureSteamRepromptIntervalInMinutes(interval);
}
-- (BOOL)_interruptAudioOnPageVisibilityChangeEnabled
-{
- return _preferences->interruptAudioOnPageVisibilityChangeEnabled();
-}
-
-- (void)_setInterruptAudioOnPageVisibilityChangeEnabled:(BOOL)enabled
-{
- _preferences->setInterruptAudioOnPageVisibilityChangeEnabled(enabled);
-}
-
- (BOOL)_enumeratingAllNetworkInterfacesEnabled
{
return _preferences->enumeratingAllNetworkInterfacesEnabled();
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (245963 => 245964)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -120,7 +120,6 @@
@property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
@property (nonatomic, setter=_setWebRTCLegacyAPIEnabled:) BOOL _webRTCLegacyAPIEnabled WK_API_AVAILABLE(macos(10.13), ios(11.0));
@property (nonatomic, setter=_setInactiveMediaCaptureSteamRepromptIntervalInMinutes:) double _inactiveMediaCaptureSteamRepromptIntervalInMinutes WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
-@property (nonatomic, setter=_setInterruptAudioOnPageVisibilityChangeEnabled:) BOOL _interruptAudioOnPageVisibilityChangeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, setter=_setJavaScriptCanAccessClipboard:) BOOL _javaScriptCanAccessClipboard WK_API_AVAILABLE(macos(10.13), ios(11.0));
@property (nonatomic, setter=_setDOMPasteAllowed:) BOOL _domPasteAllowed WK_API_AVAILABLE(macos(10.13), ios(11.0));
Modified: trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp (245963 => 245964)
--- trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp 2019-05-31 15:20:48 UTC (rev 245964)
@@ -366,20 +366,6 @@
source->applyConstraintsFailed(WTFMove(failedConstraint), WTFMove(message));
}
-#if PLATFORM(IOS)
-void UserMediaCaptureManager::setAudioCapturePageState(bool interrupted, bool pageMuted)
-{
- if (auto* activeSource = static_cast<AudioCaptureFactory*>(this)->activeSource())
- activeSource->setInterrupted(interrupted, pageMuted);
}
-void UserMediaCaptureManager::setVideoCapturePageState(bool interrupted, bool pageMuted)
-{
- if (auto* activeSource = static_cast<VideoCaptureFactory*>(this)->activeSource())
- activeSource->setInterrupted(interrupted, pageMuted);
-}
#endif
-
-}
-
-#endif
Modified: trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h (245963 => 245964)
--- trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h 2019-05-31 14:42:45 UTC (rev 245963)
+++ trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h 2019-05-31 15:20:48 UTC (rev 245964)
@@ -79,11 +79,6 @@
WebCore::CaptureDeviceManager& videoCaptureDeviceManager() final { return m_noOpCaptureDeviceManager; }
WebCore::CaptureDeviceManager& displayCaptureDeviceManager() final { return m_noOpCaptureDeviceManager; }
-#if PLATFORM(IOS_FAMILY)
- void setAudioCapturePageState(bool interrupted, bool pageMuted) final;
- void setVideoCapturePageState(bool interrupted, bool pageMuted) final;
-#endif
-
// IPC::MessageReceiver
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;