[webkit-reviews] review denied: [Bug 90498] add a setting to allow user to play a media by clicking on it : [Attachment 150677] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 3 15:30:21 PDT 2012


Adam Barth <abarth at webkit.org> has denied Min Qin <qinmin at chromium.org>'s
request for review:
Bug 90498: add a setting to allow user to play a media by clicking on it
https://bugs.webkit.org/show_bug.cgi?id=90498

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

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


A few details below.

> Source/WebCore/html/HTMLMediaElement.cpp:3853
> +    if (document()->settings() &&
document()->settings()->mediaClickToPlayEnabled() && event->type() ==
eventNames().clickEvent && !hasEventListeners(eventNames().clickEvent) &&
canPlay()) {

Is !hasEventListeners(eventNames().clickEvent)	needed here?  I guess folks who
handle the click event won't be preventing the default if there isn't one
currently...

> Source/WebCore/testing/InternalSettings.cpp:371
> +fprintf(stderr, "InternalSettings::setMediaClickToPlayEnabled");

We should probably remove this line before landing.

> Source/WebCore/testing/InternalSettings.cpp:373
> +    settings()->setMediaClickToPlayEnabled(enabled);

Please reset this setting to its default value in InternalSettings::restoreTo

> LayoutTests/media/video-click-to-play-enabled.html:14
> +	       function cleanClickToPlayRequirement() {
> +		   if (window.internals) 
> +		      
window.internals.settings.setMediaClickToPlayEnabled(false);
> +	       }

Rather than doing this in each test, we have the InternalsSettings object do
this work for us.

> LayoutTests/media/video-click-to-play-enabled.html:21
> +		   video.dispatchEvent(mouseClick);
> +		   testExpected("video.paused", false);

Can you add a test case for when the video element has a click event listener?


More information about the webkit-reviews mailing list