RESOLVED FIXED 58369
Add 'muted' content attribute to HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=58369
Summary Add 'muted' content attribute to HTMLMediaElement
Eric Carlson
Reported 2011-04-12 13:30:21 PDT
Attachments
Proposed patch (10.54 KB, patch)
2011-09-01 09:49 PDT, Eric Carlson
darin: review+
Eric Carlson
Comment 1 2011-09-01 09:49:51 PDT
Created attachment 105981 [details] Proposed patch
Radar WebKit Bug Importer
Comment 2 2011-09-01 09:58:38 PDT
Darin Adler
Comment 3 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?
Darin Adler
Comment 4 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.
Eric Carlson
Comment 5 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.
Eric Carlson
Comment 6 2011-09-01 11:12:40 PDT
Eric Carlson
Comment 7 2011-09-01 11:13:12 PDT
With the correct url this time: http://trac.webkit.org/changeset/94318
Note You need to log in before you can comment on or make changes to this bug.