Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 86ec6ffd1cbf01b7fa3a9448b3b356fe1b01e574..879fecbdafd51ac767f5acd5d6333521d834998c 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -3287,15 +3287,20 @@ void HTMLMediaElement::updateVolume() |
| double HTMLMediaElement::playerVolume() const |
| { |
| - double volumeMultiplier = 1; |
| - bool shouldMute = m_muted; |
| + // Spec reference: http://whatwg.org/c#effective-media-volume |
| - if (m_mediaController) { |
| - volumeMultiplier *= m_mediaController->volume(); |
| - shouldMute = m_mediaController->muted(); |
|
acolwell GONE FROM CHROMIUM
2014/08/06 23:51:05
So is the bug here then? IIUC the media controller
philipj_slow
2014/08/07 07:34:23
Precisely, the media element's and the media contr
|
| - } |
| + if (m_muted) |
| + return 0; |
| + |
| + if (m_mediaController && m_mediaController->muted()) |
| + return 0; |
| + |
| + double volume = m_volume; |
| + |
| + if (m_mediaController) |
| + volume *= m_mediaController->volume(); |
| - return shouldMute ? 0 : m_volume * volumeMultiplier; |
| + return volume; |
| } |
| void HTMLMediaElement::updatePlayState() |