Title: [203930] trunk/Source/WebCore
- Revision
- 203930
- Author
- dba...@webkit.org
- Date
- 2016-07-29 17:13:49 -0700 (Fri, 29 Jul 2016)
Log Message
[iOS] HTMLMediaElement::updateVolume() calls MediaPlayer::volume() on null media player
https://bugs.webkit.org/show_bug.cgi?id=160353
Reviewed by Eric Carlson.
Using testing functions HTMLMediaElement::updateVolume() can be called on a <video> element
without an associated video. We should support this usage on iOS just as we do for non-iOS
ports.
The use of testing functions to call HTMLMediaElement::updateVolume() on a <video> element
without an associated video is demonstrated by the test LayoutTests/media/video-muted-after-setting-page-muted-state.html.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateVolume):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (203929 => 203930)
--- trunk/Source/WebCore/ChangeLog 2016-07-30 00:11:32 UTC (rev 203929)
+++ trunk/Source/WebCore/ChangeLog 2016-07-30 00:13:49 UTC (rev 203930)
@@ -1,3 +1,20 @@
+2016-07-29 Daniel Bates <daba...@apple.com>
+
+ [iOS] HTMLMediaElement::updateVolume() calls MediaPlayer::volume() on null media player
+ https://bugs.webkit.org/show_bug.cgi?id=160353
+
+ Reviewed by Eric Carlson.
+
+ Using testing functions HTMLMediaElement::updateVolume() can be called on a <video> element
+ without an associated video. We should support this usage on iOS just as we do for non-iOS
+ ports.
+
+ The use of testing functions to call HTMLMediaElement::updateVolume() on a <video> element
+ without an associated video is demonstrated by the test LayoutTests/media/video-muted-after-setting-page-muted-state.html.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::updateVolume):
+
2016-07-29 Wenson Hsieh <wenson_hs...@apple.com>
Media controls are not displayed for some autoplaying videos at certain browser dimensions
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (203929 => 203930)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-07-30 00:11:32 UTC (rev 203929)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-07-30 00:13:49 UTC (rev 203930)
@@ -4816,6 +4816,8 @@
void HTMLMediaElement::updateVolume()
{
+ if (!m_player)
+ return;
#if PLATFORM(IOS)
// Only the user can change audio volume so update the cached volume and post the changed event.
float volume = m_player->volume();
@@ -4824,9 +4826,6 @@
scheduleEvent(eventNames().volumechangeEvent);
}
#else
- if (!m_player)
- return;
-
// Avoid recursion when the player reports volume changes.
if (!processingMediaPlayerCallback()) {
Page* page = document().page();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes