[Webkit-unassigned] [Bug 90498] add a setting to allow user to play a media by clicking on it

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


https://bugs.webkit.org/show_bug.cgi?id=90498


Adam Barth <abarth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #150677|review?                     |review-
               Flag|                            |




--- Comment #3 from Adam Barth <abarth at webkit.org>  2012-07-03 15:30:22 PST ---
(From update of attachment 150677)
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?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list