[webkit-reviews] review denied: [Bug 24063] Allow port to require a user gesture to play/pause an <audio> or <video> element : [Attachment 27833] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 20 12:01:53 PST 2009


Simon Fraser (smfr) <simon.fraser at apple.com> has denied Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 24063: Allow port to require a user gesture to play/pause an <audio> or
<video> element
https://bugs.webkit.org/show_bug.cgi?id=24063

Attachment 27833: proposed patch
https://bugs.webkit.org/attachment.cgi?id=27833&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
> Index: WebCore/html/HTMLMediaElement.cpp
> ===================================================================

>  void HTMLMediaElement::loadTimerFired(Timer<HTMLMediaElement>*)
>  {
>      ExceptionCode ec;
> +
> +    ++m_internalCall;
>      load(ec);
> +    --m_internalCall;

I think it would be better for load() to wrap a loadInternal().
load() could do the permissions checking, and loadInternal() should
always load. Same with play() and pause().

> Index: WebCore/html/HTMLMediaElement.h
> ===================================================================

> +    enum BehaviorRestrictions 
>      { 
> -	   NoLoadRestriction = 0,
> -	   RequireUserGestureLoadRestriction = 1 << 0, 
> +	   NoRestrictions = 0,
> +	   RequireUserGestureLoadRestriction = 1 << 0,

RequireUserGestureForLoadRestriction
> +	   RequireUserGestureRateChangeRestriction = 1 << 1,
RequireUserGestureForRateChangeRestriction

>      };
>  
>  
> @@ -237,7 +238,7 @@ protected:
>  
>      OwnPtr<MediaPlayer> m_player;
>  
> -    LoadRestrictions m_loadRestrictions;
> +    BehaviorRestrictions m_Restrictions;

m_Restrictions -> m_restrictions


More information about the webkit-reviews mailing list