Closed Bug 706731 Opened 13 years ago Closed 13 years ago

Add support for defaultMuted attribute

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: drexler, Assigned: drexler)

References

()

Details

(Keywords: dev-doc-complete, Whiteboard: [mentor=jdm] [lang=c++])

Attachments

(1 file, 4 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:8.0) Gecko/20100101 Firefox/8.0 Build ID: 20111104165243 Steps to reproduce: This is a follow up from Bug 689834
Component: General → Video/Audio
Product: Firefox → Core
QA Contact: general → video.audio
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [mentor=jdm] [lang=c++]
Attachment #578362 - Flags: feedback?(josh)
Depends on: 689834
No longer depends on: 689834
Unsure whether i could say it fully depended on the 689834 as NS_IMPL_BOOL_ATTR needed it for resolving the muted attribute passed to it.
Attachment #578362 - Flags: review?(kinetik)
Attachment #578362 - Flags: feedback?(josh)
Attachment #578362 - Flags: feedback+
(In reply to andrew (:drexler) from comment #2) > Unsure whether i could say it fully depended on the 689834 as > NS_IMPL_BOOL_ATTR needed it for resolving the muted attribute passed to it. Right, this patch depends on that patch because you need the muted atom. I've readded it. I thought it'd be simpler to split this out from bug 689834, but I was probably wrong as the trickier part is actually that bug and splitting things may have added to the confusion, sorry. + Support for defaultMuted attribute Please include the bug number in the commit message. +[scriptable, uuid(dcf812f5-373b-4Fc1-9a60-59078af33bf7)] Why's 'F' in caps?
Depends on: 689834
(In reply to Matthew Gregan [:kinetik] from comment #3) > +[scriptable, uuid(dcf812f5-373b-4Fc1-9a60-59078af33bf7)] > > Why's 'F' in caps? Oh missed that. Visual Studio's GUID generator has it in caps so manually changed it. I will resubmit the patch with the changes.
Attachment #578362 - Attachment is obsolete: true
Attachment #578362 - Flags: review?(kinetik)
Attachment #578980 - Flags: review?(kinetik)
Can you please write a mochitest and add it to content/media/test? If you need a base, test_paused.html is a simple one to start from. The main things to test is that <audio> and <audio muted> start in the expected states, and that toggling defaultMuted does not affect muted (and vice versa).
Sure will do that.
Assignee: nobody → andrew.quartey
Attached patch Patch v3 (obsolete) — Splinter Review
defaultMuted attribute implementation and associated test.
Attachment #578980 - Attachment is obsolete: true
Attachment #578980 - Flags: review?(kinetik)
Attachment #579823 - Flags: review?(kinetik)
Looks good, thanks. I'll hang off on r+ing until we've got bug 689834 sorted out.
+ v1.defaultMuted = true; + a1.defaultMuted = true; + ok(v1.defaultMuted, "v1.defaultMuted should be true"); + ok(a1.defaultMuted, "a1.defaultMuted should be true"); Can you also add a hasAttribute("muted") test here. That'll prove that the defaultMuted DOM attribute is correctly mapped to the muted content attribute. Also, check that the muted DOM attribute remains false. + v2.defaultMuted = false; + a2.defaultMuted = false; + ok(!v2.defaultMuted, "v2.defaultMuted should be false"); + ok(v2.muted, "v2.muted should be true"); + ok(!a2.defaultMuted, "a2.defaultMuted should be false"); + ok(a2.muted, "a2.muted should be true"); And for this, a !hasAttribute("muted").
Attached patch Patch v4 (obsolete) — Splinter Review
Added hasAttribute() checks to test_defaultMuted.html
Attachment #579823 - Attachment is obsolete: true
Attachment #579823 - Flags: review?(kinetik)
Attachment #581535 - Flags: review?(kinetik)
Attachment #581535 - Flags: review?(kinetik) → review+
Attached patch Patch v5Splinter Review
Added extra checks for state of muted attribute in test_defaultMuted.html per bz's suggestion in comment 35 of bug 689834.
Attachment #581535 - Attachment is obsolete: true
Attachment #581844 - Flags: review?(bzbarsky)
Comment on attachment 581844 [details] [diff] [review] Patch v5 r=me
Attachment #581844 - Flags: review?(bzbarsky) → review+
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla11
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Depends on: 711446
Keywords: dev-doc-needed
OS: Windows Vista → All
Hardware: x86 → All
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: