WebKit Bugzilla
Attachment 361927 Details for
Bug 194600
: Revert r240434
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
revert-volume-change-ios-patch.txt (text/plain), 3.73 KB, created by
Eric Carlson
on 2019-02-13 11:12:08 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2019-02-13 11:12:08 PST
Size:
3.73 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3078ce9844b..57b743639c6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-13 Eric Carlson <eric.carlson@apple.com> >+ >+ Revert r240434 >+ https://bugs.webkit.org/show_bug.cgi?id=194600 >+ <rdar://problem/48044566> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::setVolume): >+ (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged): >+ (WebCore::HTMLMediaElement::updateVolume): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): >+ > 2019-02-12 Rob Buis <rbuis@igalia.com> > > Implement serializing in MIME type parser >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index 1b6f798455d..3d1e343284b 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -3722,11 +3722,7 @@ ExceptionOr<void> HTMLMediaElement::setVolume(double volume) > if (!(volume >= 0 && volume <= 1)) > return Exception { IndexSizeError }; > >-#if PLATFORM(IOS_FAMILY) >- if (!processingUserGestureForMedia()) >- return { }; >-#endif >- >+#if !PLATFORM(IOS_FAMILY) > if (m_volume == volume) > return { }; > >@@ -3742,7 +3738,7 @@ ExceptionOr<void> HTMLMediaElement::setVolume(double volume) > pauseInternal(); > setAutoplayEventPlaybackState(AutoplayEventPlaybackState::PreventedAutoplay); > } >- >+#endif > return { }; > } > >@@ -4933,9 +4929,9 @@ void HTMLMediaElement::mediaPlayerVolumeChanged(MediaPlayer*) > > beginProcessingMediaPlayerCallback(); > if (m_player) { >- double volume = m_player->volume(); >- if (volume != m_volume) { >- m_volume = volume; >+ double vol = m_player->volume(); >+ if (vol != m_volume) { >+ m_volume = vol; > updateVolume(); > scheduleEvent(eventNames().volumechangeEvent); > } >@@ -5348,7 +5344,14 @@ void HTMLMediaElement::updateVolume() > { > if (!m_player) > return; >- >+#if PLATFORM(IOS_FAMILY) >+ // Only the user can change audio volume so update the cached volume and post the changed event. >+ float volume = m_player->volume(); >+ if (m_volume != volume) { >+ m_volume = volume; >+ scheduleEvent(eventNames().volumechangeEvent); >+ } >+#else > // Avoid recursion when the player reports volume changes. > if (!processingMediaPlayerCallback()) { > Page* page = document().page(); >@@ -5377,6 +5380,7 @@ void HTMLMediaElement::updateVolume() > > if (hasMediaControls()) > mediaControls()->changedVolume(); >+#endif > } > > void HTMLMediaElement::scheduleUpdatePlayState() >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index fd484d7340e..5f25e0003f8 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -1380,14 +1380,15 @@ void MediaPlayerPrivateAVFoundationObjC::seekToTime(const MediaTime& time, const > void MediaPlayerPrivateAVFoundationObjC::setVolume(float volume) > { > #if PLATFORM(IOS_FAMILY) >- if ([[PAL::getUIDeviceClass() currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPad) >- return; >-#endif >+ UNUSED_PARAM(volume); >+ return; >+#else > > if (!m_avPlayer) > return; > > [m_avPlayer.get() setVolume:volume]; >+#endif > } > > void MediaPlayerPrivateAVFoundationObjC::setMuted(bool muted)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194600
: 361927