mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 835454 - [Audio] AudioChannelService didn't notify agents to call getMuted() when a content channel's visibility is changed. r=baku, a=tef+
This commit is contained in:
parent
d6685ce0c8
commit
5435174ea2
@ -147,11 +147,12 @@ AudioChannelService::GetMuted(AudioChannelAgent* aAgent, bool aElementHidden)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool muted = GetMutedInternal(data->mType, CONTENT_PARENT_NO_CHILD_ID,
|
||||
aElementHidden, data->mElementHidden);
|
||||
|
||||
bool oldElementHidden = data->mElementHidden;
|
||||
// Update visibility.
|
||||
data->mElementHidden = aElementHidden;
|
||||
|
||||
bool muted = GetMutedInternal(data->mType, CONTENT_PARENT_NO_CHILD_ID,
|
||||
aElementHidden, oldElementHidden);
|
||||
data->mMuted = muted;
|
||||
|
||||
SendAudioChannelChangedNotification();
|
||||
@ -192,6 +193,10 @@ AudioChannelService::GetMutedInternal(AudioChannelType aType, uint64_t aChildID,
|
||||
mActiveContentChildIDsFrozen = true;
|
||||
}
|
||||
|
||||
if (newType != oldType && aType == AUDIO_CHANNEL_CONTENT) {
|
||||
Notify();
|
||||
}
|
||||
|
||||
// Let play any visible audio channel.
|
||||
if (!aElementHidden) {
|
||||
return false;
|
||||
|
@ -66,13 +66,14 @@ AudioChannelServiceChild::GetMuted(AudioChannelAgent* aAgent, bool aElementHidde
|
||||
|
||||
ContentChild *cc = ContentChild::GetSingleton();
|
||||
bool muted = true;
|
||||
|
||||
if (cc) {
|
||||
cc->SendAudioChannelGetMuted(data->mType, aElementHidden, data->mElementHidden, &muted);
|
||||
}
|
||||
bool oldElementHidden = data->mElementHidden;
|
||||
|
||||
// Update visibility.
|
||||
data->mElementHidden = aElementHidden;
|
||||
|
||||
if (cc) {
|
||||
cc->SendAudioChannelGetMuted(data->mType, aElementHidden, oldElementHidden, &muted);
|
||||
}
|
||||
data->mMuted = muted;
|
||||
|
||||
if (cc) {
|
||||
|
Loading…
Reference in New Issue
Block a user