[webkit-reviews] review denied: [Bug 24846] HTMLMediaElement should implement 'autobuffer' attribute : [Attachment 29038] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 28 17:36:28 PDT 2009

Darin Adler <darin at apple.com> has denied Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 24846: HTMLMediaElement should implement 'autobuffer' attribute

Attachment 29038: proposed patch

------- Additional Comments from Darin Adler <darin at apple.com>
> +    setBooleanAttribute(autobufferAttr, b);
> +    if (m_player)
> +	   m_player->setAutobuffer(b);

This is not the right way to bind an attribute to a back-end player property. I
haven't looked at the other attributes to see if you're doing it that way. The
correct place to do the mapping is in the parseMappedAttribute function. The
setter should only set the attribute and the back end effect should be
triggered by parseMappedAttribute.

Otherwise, setting the attribute via setAttribute or by setting the attribute
in the initial document won't work.

> +void MediaPlayer::setAutobuffer(bool b)
> +{
> +    m_autobuffer = b;
> +    m_private->setAutobuffer(b);
> +}

Since we already know the old value here, I suggest we call the private
function only if the value is changing. That way if the private version has to
do some real work it won't get done if there's no change.

review- because of the first comment above

More information about the webkit-reviews mailing list