[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 17:58:48 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 306c4943be9263e3f1dd45857af8609987479930
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 25 03:34:34 2010 +0000
2010-02-24 Nicholas Young <nicholas.young at nokia.com>
Reviewed by Eric Carlson.
supportsMuting() should be an internal interface between MediaPlayer and MediaPlayerPrivate.
https://bugs.webkit.org/show_bug.cgi?id=35327
No new tests. Refactoring Only.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted): Do not check supportsMuting()
(WebCore::HTMLMediaElement::updateVolume): Set volume and muted
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setVolume): Check supportsMuting()
(WebCore::MediaPlayer::setMuted): Check supportsMuting()
* platform/graphics/MediaPlayer.h: Remove supportsMuting()
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 66a7eaf..388ec22 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-02-24 Nicholas Young <nicholas.young at nokia.com>
+
+ Reviewed by Eric Carlson.
+
+ supportsMuting() should be an internal interface between MediaPlayer and MediaPlayerPrivate.
+ https://bugs.webkit.org/show_bug.cgi?id=35327
+
+ No new tests. Refactoring Only.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setMuted): Do not check supportsMuting()
+ (WebCore::HTMLMediaElement::updateVolume): Set volume and muted
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::setVolume): Check supportsMuting()
+ (WebCore::MediaPlayer::setMuted): Check supportsMuting()
+ * platform/graphics/MediaPlayer.h: Remove supportsMuting()
+
2010-02-24 Adam Barth <abarth at webkit.org>
Reviewed by Darin Fisher.
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index ab88f12..e22aa5c 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -1235,7 +1235,7 @@ void HTMLMediaElement::setMuted(bool muted)
m_muted = muted;
// Avoid recursion when the player reports volume changes.
if (!processingMediaPlayerCallback()) {
- if (m_player && m_player->supportsMuting()) {
+ if (m_player) {
m_player->setMuted(m_muted);
if (renderer())
renderer()->updateFromElement();
@@ -1639,7 +1639,8 @@ void HTMLMediaElement::updateVolume()
Page* page = document()->page();
float volumeMultiplier = page ? page->mediaVolume() : 1;
- m_player->setVolume(m_muted ? 0 : m_volume * volumeMultiplier);
+ m_player->setMuted(m_muted);
+ m_player->setVolume(m_volume * volumeMultiplier);
}
if (renderer())
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index ff9303a..6998570 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -398,7 +398,9 @@ float MediaPlayer::volume() const
void MediaPlayer::setVolume(float volume)
{
m_volume = volume;
- m_private->setVolume(volume);
+
+ if (m_private->supportsMuting() || !m_muted)
+ m_private->setVolume(volume);
}
bool MediaPlayer::muted() const
@@ -406,15 +408,14 @@ bool MediaPlayer::muted() const
return m_muted;
}
-bool MediaPlayer::supportsMuting() const
-{
- return m_private->supportsMuting();
-}
-
void MediaPlayer::setMuted(bool muted)
{
m_muted = muted;
- m_private->setMuted(muted);
+
+ if (m_private->supportsMuting())
+ m_private->setMuted(muted);
+ else
+ m_private->setVolume(muted ? 0 : m_volume);
}
bool MediaPlayer::hasClosedCaptions() const
diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h
index 1ca4576..3aaa2af 100644
--- a/WebCore/platform/graphics/MediaPlayer.h
+++ b/WebCore/platform/graphics/MediaPlayer.h
@@ -184,7 +184,6 @@ public:
float volume() const;
void setVolume(float);
- bool supportsMuting() const;
bool muted() const;
void setMuted(bool);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list