Diff
Modified: trunk/Source/WebCore/ChangeLog (247799 => 247800)
--- trunk/Source/WebCore/ChangeLog 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/ChangeLog 2019-07-24 23:51:24 UTC (rev 247800)
@@ -1,3 +1,25 @@
+2019-07-24 Youenn Fablet <[email protected]>
+
+ Remove MediaPlayerPrivate::supportsMuting()
+ https://bugs.webkit.org/show_bug.cgi?id=200005
+
+ Reviewed by Eric Carlson.
+
+ Remove no longer needed interface method.
+ No change of behavior.
+
+ * WebCore.order:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::setVolume):
+ (WebCore::MediaPlayer::setMuted):
+ * platform/graphics/MediaPlayerPrivate.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
+
2019-07-24 Tim Horton <[email protected]>
Daring Fireball long press highlights are unnecessarily inflated due to false illegibility
Modified: trunk/Source/WebCore/WebCore.order (247799 => 247800)
--- trunk/Source/WebCore/WebCore.order 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/WebCore.order 2019-07-24 23:51:24 UTC (rev 247800)
@@ -15119,7 +15119,6 @@
__ZN7WebCore11MediaPlayer17setPreservesPitchEb
__ZN7WebCore22NullMediaPlayerPrivate17setPreservesPitchEb
__ZN7WebCore11MediaPlayer8setMutedEb
-__ZNK7WebCore22NullMediaPlayerPrivate14supportsMutingEv
__ZN7WebCore27MediaPlayerPrivateInterface9setVolumeEf
__ZN7WebCore11MediaPlayer9setVolumeEd
__ZN7WebCore22NullMediaPlayerPrivate15setVolumeDoubleEd
@@ -15865,7 +15864,6 @@
__ZN7WebCore27MediaPlayerPrivateInterface13setRateDoubleEd
__ZN7WebCore30MediaPlayerPrivateAVFoundation7setRateEf
__ZN7WebCore34MediaPlayerPrivateAVFoundationObjC10updateRateEv
-__ZNK7WebCore27MediaPlayerPrivateInterface14supportsMutingEv
__ZN7WebCore34MediaPlayerPrivateAVFoundationObjC9setVolumeEf
__ZN7WebCore11MediaPlayer4playEv
__ZN7WebCore30MediaPlayerPrivateAVFoundation4playEv
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2019-07-24 23:51:24 UTC (rev 247800)
@@ -100,71 +100,70 @@
// a null player to make MediaPlayer logic simpler
-class NullMediaPlayerPrivate : public MediaPlayerPrivateInterface {
+class NullMediaPlayerPrivate final : public MediaPlayerPrivateInterface {
public:
explicit NullMediaPlayerPrivate(MediaPlayer*) { }
- void load(const String&) override { }
+ void load(const String&) final { }
#if ENABLE(MEDIA_SOURCE)
- void load(const String&, MediaSourcePrivateClient*) override { }
+ void load(const String&, MediaSourcePrivateClient*) final { }
#endif
#if ENABLE(MEDIA_STREAM)
- void load(MediaStreamPrivate&) override { }
+ void load(MediaStreamPrivate&) final { }
#endif
- void cancelLoad() override { }
+ void cancelLoad() final { }
- void prepareToPlay() override { }
- void play() override { }
- void pause() override { }
+ void prepareToPlay() final { }
+ void play() final { }
+ void pause() final { }
- PlatformLayer* platformLayer() const override { return 0; }
+ PlatformLayer* platformLayer() const final { return 0; }
- FloatSize naturalSize() const override { return FloatSize(); }
+ FloatSize naturalSize() const final { return FloatSize(); }
- bool hasVideo() const override { return false; }
- bool hasAudio() const override { return false; }
+ bool hasVideo() const final { return false; }
+ bool hasAudio() const final { return false; }
- void setVisible(bool) override { }
+ void setVisible(bool) final { }
- double durationDouble() const override { return 0; }
+ double durationDouble() const final { return 0; }
- double currentTimeDouble() const override { return 0; }
- void seekDouble(double) override { }
- bool seeking() const override { return false; }
+ double currentTimeDouble() const final { return 0; }
+ void seekDouble(double) final { }
+ bool seeking() const final { return false; }
- void setRateDouble(double) override { }
- void setPreservesPitch(bool) override { }
- bool paused() const override { return true; }
+ void setRateDouble(double) final { }
+ void setPreservesPitch(bool) final { }
+ bool paused() const final { return true; }
- void setVolumeDouble(double) override { }
+ void setVolumeDouble(double) final { }
- bool supportsMuting() const override { return false; }
- void setMuted(bool) override { }
+ void setMuted(bool) final { }
- bool hasClosedCaptions() const override { return false; }
- void setClosedCaptionsVisible(bool) override { };
+ bool hasClosedCaptions() const final { return false; }
+ void setClosedCaptionsVisible(bool) final { };
- MediaPlayer::NetworkState networkState() const override { return MediaPlayer::Empty; }
- MediaPlayer::ReadyState readyState() const override { return MediaPlayer::HaveNothing; }
+ MediaPlayer::NetworkState networkState() const final { return MediaPlayer::Empty; }
+ MediaPlayer::ReadyState readyState() const final { return MediaPlayer::HaveNothing; }
- float maxTimeSeekable() const override { return 0; }
- double minTimeSeekable() const override { return 0; }
- std::unique_ptr<PlatformTimeRanges> buffered() const override { return std::make_unique<PlatformTimeRanges>(); }
+ float maxTimeSeekable() const final { return 0; }
+ double minTimeSeekable() const final { return 0; }
+ std::unique_ptr<PlatformTimeRanges> buffered() const final { return std::make_unique<PlatformTimeRanges>(); }
- double seekableTimeRangesLastModifiedTime() const override { return 0; }
- double liveUpdateInterval() const override { return 0; }
+ double seekableTimeRangesLastModifiedTime() const final { return 0; }
+ double liveUpdateInterval() const final { return 0; }
- unsigned long long totalBytes() const override { return 0; }
- bool didLoadingProgress() const override { return false; }
+ unsigned long long totalBytes() const final { return 0; }
+ bool didLoadingProgress() const final { return false; }
- void setSize(const IntSize&) override { }
+ void setSize(const IntSize&) final { }
- void paint(GraphicsContext&, const FloatRect&) override { }
+ void paint(GraphicsContext&, const FloatRect&) final { }
- bool canLoadPoster() const override { return false; }
- void setPoster(const String&) override { }
+ bool canLoadPoster() const final { return false; }
+ void setPoster(const String&) final { }
- bool hasSingleSecurityOrigin() const override { return true; }
+ bool hasSingleSecurityOrigin() const final { return true; }
};
class NullMediaPlayerClient : public MediaPlayerClient {
@@ -777,9 +776,7 @@
void MediaPlayer::setVolume(double volume)
{
m_volume = volume;
-
- if (m_private->supportsMuting() || !m_muted)
- m_private->setVolumeDouble(volume);
+ m_private->setVolumeDouble(volume);
}
bool MediaPlayer::muted() const
@@ -791,10 +788,7 @@
{
m_muted = muted;
- if (m_private->supportsMuting())
- m_private->setMuted(muted);
- else
- m_private->setVolume(muted ? 0 : m_volume);
+ m_private->setMuted(muted);
}
bool MediaPlayer::hasClosedCaptions() const
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h 2019-07-24 23:51:24 UTC (rev 247800)
@@ -118,7 +118,6 @@
virtual float volume() const { return 1; }
#endif
- virtual bool supportsMuting() const { return false; }
virtual void setMuted(bool) { }
virtual bool hasClosedCaptions() const { return false; }
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2019-07-24 23:51:24 UTC (rev 247800)
@@ -171,7 +171,6 @@
bool platformPaused() const override;
MediaTime currentMediaTime() const override;
void setVolume(float) override;
- bool supportsMuting() const override { return true; }
void setMuted(bool) override;
void setClosedCaptionsVisible(bool) override;
void paint(GraphicsContext&, const FloatRect&) override;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h 2019-07-24 23:51:24 UTC (rev 247800)
@@ -189,7 +189,6 @@
bool paused() const override;
void setVolume(float volume) override;
- bool supportsMuting() const override { return true; }
void setMuted(bool) override;
bool supportsScanning() const override;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h 2019-07-24 23:51:24 UTC (rev 247800)
@@ -121,7 +121,6 @@
void setVolume(float) override;
void setMuted(bool) override;
- bool supportsMuting() const override { return true; }
bool supportsScanning() const override { return false; }
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h 2019-07-24 23:51:24 UTC (rev 247800)
@@ -112,7 +112,6 @@
bool ensureGstGLContext();
GstContext* requestGLContext(const char* contextType);
#endif
- bool supportsMuting() const override { return true; }
void setMuted(bool) override;
bool muted() const;
Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp 2019-07-24 23:51:24 UTC (rev 247800)
@@ -279,11 +279,6 @@
m_volume = volume;
}
-bool MediaPlayerPrivateMediaFoundation::supportsMuting() const
-{
- return true;
-}
-
void MediaPlayerPrivateMediaFoundation::setMuted(bool muted)
{
setAllChannelVolumes(muted ? 0.0 : m_volume);
Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h (247799 => 247800)
--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h 2019-07-24 23:51:13 UTC (rev 247799)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h 2019-07-24 23:51:24 UTC (rev 247800)
@@ -46,7 +46,7 @@
namespace WebCore {
-class MediaPlayerPrivateMediaFoundation : public MediaPlayerPrivateInterface, public CanMakeWeakPtr<MediaPlayerPrivateMediaFoundation> {
+class MediaPlayerPrivateMediaFoundation final : public MediaPlayerPrivateInterface, public CanMakeWeakPtr<MediaPlayerPrivateMediaFoundation> {
public:
explicit MediaPlayerPrivateMediaFoundation(MediaPlayer*);
~MediaPlayerPrivateMediaFoundation();
@@ -56,49 +56,48 @@
static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
static bool isAvailable();
- void load(const String& url) override;
- void cancelLoad() override;
+ void load(const String& url) final;
+ void cancelLoad() final;
- void play() override;
- void pause() override;
+ void play() final;
+ void pause() final;
- bool supportsFullscreen() const override;
+ bool supportsFullscreen() const final;
- FloatSize naturalSize() const override;
+ FloatSize naturalSize() const final;
- bool hasVideo() const override;
- bool hasAudio() const override;
+ bool hasVideo() const final;
+ bool hasAudio() const final;
- void setVisible(bool) override;
+ void setVisible(bool) final;
- bool seeking() const override;
- void seek(float) override;
+ bool seeking() const final;
+ void seek(float) final;
- void setRate(float) override;
+ void setRate(float) final;
- float duration() const override;
+ float duration() const final;
- float currentTime() const override;
+ float currentTime() const final;
- bool paused() const override;
+ bool paused() const final;
- void setVolume(float) override;
+ void setVolume(float) final;
- bool supportsMuting() const override;
- void setMuted(bool) override;
+ void setMuted(bool) final;
- MediaPlayer::NetworkState networkState() const override;
- MediaPlayer::ReadyState readyState() const override;
+ MediaPlayer::NetworkState networkState() const final;
+ MediaPlayer::ReadyState readyState() const final;
- float maxTimeSeekable() const override;
+ float maxTimeSeekable() const final;
- std::unique_ptr<PlatformTimeRanges> buffered() const override;
+ std::unique_ptr<PlatformTimeRanges> buffered() const final;
- bool didLoadingProgress() const override;
+ bool didLoadingProgress() const final;
- void setSize(const IntSize&) override;
+ void setSize(const IntSize&) final;
- void paint(GraphicsContext&, const FloatRect&) override;
+ void paint(GraphicsContext&, const FloatRect&) final;
private:
WeakPtr<MediaPlayerPrivateMediaFoundation> m_weakThis;