[webkit-reviews] review requested: [Bug 34405] MediaControlTimeDisplayElement should defer time formatting to the theme : [Attachment 47811] Initial Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 31 20:53:03 PST 2010


Nick Young <nicholas.young at nokia.com> has asked  for review:
Bug 34405: MediaControlTimeDisplayElement should defer time formatting to the
theme
https://bugs.webkit.org/show_bug.cgi?id=34405

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

------- Additional Comments from Nick Young <nicholas.young at nokia.com>
This patch addresses the problem by introducing three new virtual methods to
RenderTheme:

virtual String formatMediaControlsTime(float time);
virtual String formatMediaControlsCurrentTime(float currentTime, float
duration);
virtual String formatMediaControlsRemainingTime(float currentTime, float
duration);

The first method can be reimplemented by those only wishing to change how the
times are formatted.
The latter two methods can be reimplemented by those wishing to change what
times are shown in each element.

The motivating use case for this patch is to hide the time remaining element
and augment the current time element -

String RenderThemeXX::formatMediaCurrentTime(float currentTime, float duration)

{
    return formatMediaTime(currentTime) + " / " + formatMediaTime(duration);
}


More information about the webkit-reviews mailing list