mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 06:18:38 +09:00
No issue - Cloned <audio>/<video> elements should respect muted attribute.
This commit is contained in:
parent
a29afdfafe
commit
1bdfca3920
1 changed files with 7 additions and 1 deletions
|
|
@ -5695,8 +5695,14 @@ HTMLMediaElement::CopyInnerTo(Element* aDest)
|
|||
{
|
||||
nsresult rv = nsGenericHTMLElement::CopyInnerTo(aDest);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Make sure cloned <audio> and <video> respect their "muted" attribute.
|
||||
HTMLMediaElement* dest = static_cast<HTMLMediaElement*>(aDest);
|
||||
if (HasAttr(nsGkAtoms::muted)) {
|
||||
dest->mMuted |= MUTED_BY_CONTENT;
|
||||
}
|
||||
|
||||
if (aDest->OwnerDoc()->IsStaticDocument()) {
|
||||
HTMLMediaElement* dest = static_cast<HTMLMediaElement*>(aDest);
|
||||
dest->SetMediaInfo(mMediaInfo);
|
||||
}
|
||||
return rv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue