[webkit-reviews] review denied: [Bug 79167] Expose a setting to exempt media playback from user gesture requirement after a user gesture is initiated on loading/playing a media : [Attachment 128092] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 21 19:44:42 PST 2012


Adam Barth <abarth at webkit.org> has denied Min Qin <qinmin at chromium.org>'s
request for review:
Bug 79167: Expose a setting to exempt media playback from user gesture
requirement after a user gesture is initiated on loading/playing a media
https://bugs.webkit.org/show_bug.cgi?id=79167

Attachment 128092: Patch
https://bugs.webkit.org/attachment.cgi?id=128092&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=128092&action=review


You seem to be missing the changes to Source/WebKit/chromium/public, which is
presumably useful to you.

> ChangeLog:1
> +2012-02-21  Min Qin	<qinmin at google.com>

This isn't the right ChangeLog file.  These comments should be in
Source/WebCore/ChangeLog.  I wonder how you came to edit this file... 
./Tools/Scripts/prepare-ChangeLog should have edited the right file.

> Source/WebCore/html/HTMLMediaElement.cpp:261
> +    if (document->settings() &&
document->settings()->exemptUserGestureForPlaybackAfterInitiated())
> +	   m_userGestureExemptedForPlaybackAfterInitiated = true;
> +    else
> +	   m_userGestureExemptedForPlaybackAfterInitiated = false;
> +	   

Why not just:

m_userGestureExemptedForPlaybackAfterInitiated = document->settings() &&
document->settings()->exemptUserGestureForPlaybackAfterInitiated();

?

> Source/WebCore/html/HTMLMediaElement.cpp:2077
> -    if (userGestureRequiredForRateChange() &&
!ScriptController::processingUserGesture())
> +    if (userGestureRequiredForRateChange() &&
!ScriptController::processingUserGesture() && !m_userGestureExempted)

Should userGestureRequiredForRateChange() read m_userGestureExempted rather
than use reading it directly?

> Source/WebCore/html/HTMLMediaElement.h:596
> +    bool m_userGestureExemptedForPlaybackAfterInitiated: 1;
> +    bool m_userGestureExempted: 1;

m_userGestureExemptedForPlaybackAfterInitiated doesn't seem to be initialized
in the constructor.

I'm not in love with these variable names.  Maybe....

m_userGestureExemptedForPlaybackAfterInitiated ->
m_shouldSkipUserGestureChecksAfterFirstUserGesture
m_userGestureExempted -> m_skipUserGestureChecks

?


More information about the webkit-reviews mailing list