Bug 58369 - Add 'muted' content attribute to HTMLMediaElement
Summary: Add 'muted' content attribute to HTMLMediaElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: HTML5, InRadar
Depends on:
Blocks:
 
Reported: 2011-04-12 13:30 PDT by Eric Carlson
Modified: 2011-09-01 11:13 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (10.54 KB, patch)
2011-09-01 09:49 PDT, Eric Carlson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2011-04-12 13:30:21 PDT
http://html5.org/tools/web-apps-tracker?from=5990&to=5991 added a 'muted' content attribute.
Comment 1 Eric Carlson 2011-09-01 09:49:51 PDT
Created attachment 105981 [details]
Proposed patch
Comment 2 Radar WebKit Bug Importer 2011-09-01 09:58:38 PDT
<rdar://problem/10060343>
Comment 3 Darin Adler 2011-09-01 10:16:40 PDT
Comment on attachment 105981 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=105981&action=review

> Source/WebCore/html/HTMLMediaElement.idl:81
> +    attribute boolean defaultMuted;

If you wrote this:

    attribute [Reflect=muted] boolean defaultMuted;

Then you would not need to add the HTMLMediaElement::defaultMuted and HTMLMediaElement::setDefaultMuted functions. How about doing it that way?
Comment 4 Darin Adler 2011-09-01 10:17:21 PDT
Comment on attachment 105981 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=105981&action=review

> Source/WebCore/html/HTMLMediaElement.cpp:812
> +    if (hasAttribute(mutedAttr))

This can be fastHasAttribute since style attributes and SVG animated attributes are not involved. Faster.
Comment 5 Eric Carlson 2011-09-01 11:12:17 PDT
(In reply to comment #3)
> (From update of attachment 105981 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=105981&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.idl:81
> > +    attribute boolean defaultMuted;
> 
> If you wrote this:
> 
>     attribute [Reflect=muted] boolean defaultMuted;
> 
> Then you would not need to add the HTMLMediaElement::defaultMuted and HTMLMediaElement::setDefaultMuted functions. How about doing it that way?

Good suggestion, thanks!


(In reply to comment #4)
> (From update of attachment 105981 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=105981&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:812
> > +    if (hasAttribute(mutedAttr))
> 
> This can be fastHasAttribute since style attributes and SVG animated attributes are not involved. Faster.

Another good suggestion, unfortunately I missed it before I submitted. I will fix this in a follow-up patch.
Comment 6 Eric Carlson 2011-09-01 11:12:40 PDT
 https://bugs.webkit.org/show_bug.cgi?id=58369
Comment 7 Eric Carlson 2011-09-01 11:13:12 PDT
With the correct url this time: http://trac.webkit.org/changeset/94318