[Webkit-unassigned] [Bug 24955] space bar does not play/pause when in standalone QuickTime movie

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 30 18:16:59 PDT 2009


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





------- Comment #2 from simon.fraser at apple.com  2009-03-30 18:16 PDT -------
(From update of attachment 29102)

> diff --git a/WebCore/loader/MediaDocument.cpp b/WebCore/loader/MediaDocument.cpp
> index b89ac10..85aa48d 100644

> +    if (event->type() == eventNames().keydownEvent && event->isKeyboardEvent()) {
> +        KeyboardEvent* k = static_cast<KeyboardEvent*>(event);

Please use a better variable name than 'k'.

> +        HTMLVideoElement* video;
> +        if (targetNode) {
> +            if (targetNode->hasTagName(videoTag))
> +                video = static_cast<HTMLVideoElement*>(targetNode);
> +            else {
> +                RefPtr<NodeList> nodeList = targetNode->getElementsByTagName("video");
> +                if (nodeList.get()->length() > 0)
> +                    video = static_cast<HTMLVideoElement*>(nodeList.get()->item(0));

When does this happen? When the event target is the document? Since this is
MediaDocument.cpp,
can you get to the media element directly?

> +            }
> +        }

What about standalone audio?

> +        if (video) {
> +            if (k->keyIdentifier() == "U+0020") { // space

This is convention used elsewhere?

r- for now, but I think it's generally sound.


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



More information about the webkit-unassigned mailing list