Bug 56810

Summary: [EFL] Add seek forward / backword buttons to MediaControl UI
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric, kenneth, leandro, lucas.de.marchi, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 55463    
Bug Blocks:    
Attachments:
Description Flags
Proposed Patch
none
Screen Capture - Seek Button
none
Modified Patch
none
Modified Patch
eric: review-
Current MediaControl button for EFL port
none
Modified Patch none

Description Gyuyoung Kim 2011-03-22 01:46:56 PDT
Add seek forward | backword buttons to media control.
Comment 1 Gyuyoung Kim 2011-03-22 01:52:12 PDT
Created attachment 86440 [details]
Proposed Patch
Comment 2 Gyuyoung Kim 2011-03-22 01:55:02 PDT
Created attachment 86442 [details]
Screen Capture - Seek Button
Comment 3 Gyuyoung Kim 2011-03-26 05:09:17 PDT
Created attachment 87024 [details]
Modified Patch

Demarchi, I make new patch. Please review.
Comment 4 Lucas De Marchi 2011-03-29 05:06:31 PDT
Comment on attachment 87024 [details]
Modified Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=87024&action=review

> Source/WebCore/ChangeLog:8
> +        [EFL] Add seek forward / backword buttons to MediaControl UI.
> +        https://bugs.webkit.org/show_bug.cgi?id=56810
> +
> +        Add seek forward / backword buttons to media control.

typo: backword

> Source/WebCore/platform/efl/RenderThemeEfl.cpp:1139
> +    MediaControlPlayButtonElement* button = static_cast<MediaControlPlayButtonElement*>(node);

MediaControlSeekButtonElement, no?

> Source/WebCore/platform/efl/RenderThemeEfl.cpp:1152
> +    MediaControlPlayButtonElement* button = static_cast<MediaControlPlayButtonElement*>(node);

Same here

> Source/WebKit/efl/ChangeLog:5
> +
> +        [EFL] Add seek forward / backword buttons to MediaControl UI.

typo, as above

> Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbutton/seek_button.edc:58
> +         program {
> +             signal: "seekforward";
> +             action: STATE_SET "seekforward" 0.0;
> +             target: "seek_button";
> +         }
> +         program {
> +             signal: "seekbackward";
> +             action: STATE_SET "seekbackward" 0.0;
> +             target: "seek_button";
> +         }

Contrary to Mute/Unmute and Play/Pause, for me it seems weird to share the same button to seek forward/backward.
Comment 5 Gyuyoung Kim 2011-03-29 19:39:29 PDT
Created attachment 87453 [details]
Modified Patch

Ok, I make new patch according to your comment. BTW, I change FormType names of media control in order to avoid to duplicate between FormType and MediaControlElementType.
Comment 6 Lucas De Marchi 2011-04-04 18:39:48 PDT
Comment on attachment 87453 [details]
Modified Patch

LGTM
Comment 7 Gyuyoung Kim 2011-04-04 18:44:18 PDT
Created attachment 88178 [details]
Current MediaControl button for EFL port
Comment 8 Gyuyoung Kim 2011-04-04 18:48:58 PDT
(In reply to comment #6)
> (From update of attachment 87453 [details])
> LGTM

Hello Antonio,

Please review this patch. :-)
Comment 9 Eric Seidel (no email) 2011-04-07 21:37:07 PDT
Comment on attachment 87453 [details]
Modified Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=87453&action=review

Seems reasonable.

> Source/WebCore/platform/efl/RenderThemeEfl.cpp:1140
> +    MediaControlSeekButtonElement* button = static_cast<MediaControlSeekButtonElement*>(node);

Shouldn't we check the type here?

> Source/WebCore/platform/efl/RenderThemeEfl.cpp:1153
> +    MediaControlSeekButtonElement* button = static_cast<MediaControlSeekButtonElement*>(node);

again, typecheck?
Comment 10 Eric Seidel (no email) 2011-04-07 21:39:11 PDT
Comment on attachment 87453 [details]
Modified Patch

Please check the types, since clearly in an earlier version of the patch we got them wrong. :)
Comment 11 Gyuyoung Kim 2011-04-07 22:09:44 PDT
(In reply to comment #10)
> (From update of attachment 87453 [details])
> Please check the types, since clearly in an earlier version of the patch we got them wrong. :)

Hello Eric,

Th
Comment 12 Gyuyoung Kim 2011-04-07 22:12:31 PDT
(In reply to comment #10)
> (From update of attachment 87453 [details])
> Please check the types, since clearly in an earlier version of the patch we got them wrong. :)

Sorry, I don't understand exactly. Do you mean this patch should check if node is media element or not first ?

For example,

 Node* mediaNode = node ? node->shadowAncestorNode() : 0;
 if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
      return 0;
Comment 13 Gyuyoung Kim 2011-04-07 22:57:42 PDT
Created attachment 88769 [details]
Modified Patch

I add type checking condition as below,

 86 +    Node* node = object->node();
 87 +    if (!node || !node->isMediaControlElement())
 88 +        return 0;

Eric, how do you think this ?
Comment 14 WebKit Commit Bot 2011-04-10 18:35:54 PDT
Comment on attachment 88769 [details]
Modified Patch

Clearing flags on attachment: 88769

Committed r83410: <http://trac.webkit.org/changeset/83410>
Comment 15 WebKit Commit Bot 2011-04-10 18:35:59 PDT
All reviewed patches have been landed.  Closing bug.