Bug 88724

Summary: Update the time display of Chromium media controls
Product: WebKit Reporter: Silvia Pfeiffer <silviapf>
Component: MediaAssignee: Silvia Pfeiffer <silviapf>
Status: RESOLVED FIXED    
Severity: Normal CC: annacc, cmarcelo, dglazkov, eric.carlson, eric, feature-media-reviews, macpherson, menard, scherkus, silviapfeiffer1, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 87683, 87835, 88297, 88623    
Bug Blocks: 84672, 88743, 88818, 89050    
Attachments:
Description Flags
Full patch for layout tests
none
Use this for review
none
Full patch for layout tests - rebased to TOT
none
Full patch for layout tests - with skia fixes from test
none
Review this, including the fixes for skia.
none
full patch with int cast fix
none
patch for cq
none
patch for cq none

Description Silvia Pfeiffer 2012-06-10 00:10:20 PDT
This is a fifth patch for the introduction of the new Chromium video controls, master bug at https://bugs.webkit.org/show_bug.cgi?id=84672 .

This changes the format of the time digits that are displayed. They are different for media files of different duration. For non-autoplaying videos, the duration is shown before playback is started.
Comment 1 Silvia Pfeiffer 2012-06-10 01:38:44 PDT
Created attachment 146727 [details]
Full patch for layout tests
Comment 2 Silvia Pfeiffer 2012-06-10 01:50:42 PDT
Created attachment 146728 [details]
Use this for review

This is the difference to the previous patch. It will not pass the test - refer to the full patch for that.
Comment 3 Silvia Pfeiffer 2012-06-10 21:14:51 PDT
Created attachment 146774 [details]
Full patch for layout tests - rebased to TOT
Comment 4 Silvia Pfeiffer 2012-06-10 21:15:25 PDT
Comment on attachment 146728 [details]
Use this for review

Still the correct diff.
Comment 5 WebKit Review Bot 2012-06-10 22:13:05 PDT
Comment on attachment 146774 [details]
Full patch for layout tests - rebased to TOT

Attachment 146774 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12939268
Comment 6 Silvia Pfeiffer 2012-06-11 06:04:22 PDT
Created attachment 146840 [details]
Full patch for layout tests - with skia fixes from test
Comment 7 Silvia Pfeiffer 2012-06-11 06:11:30 PDT
Created attachment 146842 [details]
Review this, including the fixes for skia.

Review this, including the fixes for skia.
Comment 8 Eric Carlson 2012-06-11 09:43:41 PDT
Comment on attachment 146842 [details]
Review this, including the fixes for skia.

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

r=me with the suggested changes.

> Source/WebCore/rendering/RenderMediaControlsChromium.cpp:357
> +    int seconds = (int)fabsf(time);

WebKit C++ code should use C++-style casts rather than C-style cast

> Source/WebCore/rendering/RenderMediaControlsChromium.cpp:363
> +    int durationSecs = (int)fabsf(duration);

Ditto.
Comment 9 Silvia Pfeiffer 2012-06-12 01:19:01 PDT
Created attachment 147032 [details]
full patch with int cast fix
Comment 10 Silvia Pfeiffer 2012-06-12 01:20:15 PDT
(In reply to comment #8)
> (From update of attachment 146842 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=146842&action=review
> 
> r=me with the suggested changes.
> 
> > Source/WebCore/rendering/RenderMediaControlsChromium.cpp:357
> > +    int seconds = (int)fabsf(time);
> 
> WebKit C++ code should use C++-style casts rather than C-style cast
> 
> > Source/WebCore/rendering/RenderMediaControlsChromium.cpp:363
> > +    int durationSecs = (int)fabsf(duration);
> 
> Ditto.

Done.
Comment 11 WebKit Review Bot 2012-06-12 01:40:23 PDT
Comment on attachment 147032 [details]
full patch with int cast fix

Attachment 147032 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12941574
Comment 12 Silvia Pfeiffer 2012-06-13 16:54:20 PDT
Created attachment 147444 [details]
patch for cq
Comment 13 Silvia Pfeiffer 2012-06-13 18:48:10 PDT
Comment on attachment 147444 [details]
patch for cq

unfortunately introduced a bug in skia - gotta re-upload
Comment 14 Silvia Pfeiffer 2012-06-13 18:53:04 PDT
Created attachment 147464 [details]
patch for cq
Comment 15 WebKit Review Bot 2012-06-14 07:01:53 PDT
Comment on attachment 147464 [details]
patch for cq

Clearing flags on attachment: 147464

Committed r120322: <http://trac.webkit.org/changeset/120322>
Comment 16 WebKit Review Bot 2012-06-14 07:02:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 17 Nico Weber 2013-04-23 17:29:13 PDT
Comment on attachment 147464 [details]
patch for cq

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

> Source/WebCore/rendering/RenderThemeChromiumMac.mm:239
> +    return RenderThemeChromiumMac::formatMediaControlsRemainingTime(currentTime, duration);

Do you mean RenderMediaControlsChromium::formatMediaControlsRemainingTime() here? As is, this is an infinite recursion, right? (Is this not covered by tests?)
Comment 18 Silvia Pfeiffer 2013-04-27 01:03:12 PDT
(In reply to comment #17)
> (From update of attachment 147464 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=147464&action=review
> 
> > Source/WebCore/rendering/RenderThemeChromiumMac.mm:239
> > +    return RenderThemeChromiumMac::formatMediaControlsRemainingTime(currentTime, duration);
> 
> Do you mean RenderMediaControlsChromium::formatMediaControlsRemainingTime() here? As is, this is an infinite recursion, right? (Is this not covered by tests?)

Right, nice find. This was in preparation for a feature where we would toggle between current time and remaining time, but wasn't ever used. Thanks for taking care of it.