Changeset 74643 in webkit


Ignore:
Timestamp:
Dec 24, 2010 11:02:25 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-24 Carlos Garcia Campos <cgarcia@igalia.com>

Reviewed by Xan Lopez.

[GTK] Show current time / total in media player
https://bugs.webkit.org/show_bug.cgi?id=51535

  • css/mediaControlsGtk.css: (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
  • platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::formatMediaControlsCurrentTime): (WebCore::RenderThemeGtk::paintMediaCurrentTime):
  • platform/gtk/RenderThemeGtk.h:
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74642 r74643  
     12010-12-24  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Show current time / total in media player
     6        https://bugs.webkit.org/show_bug.cgi?id=51535
     7
     8        * css/mediaControlsGtk.css:
     9        (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
     10        * platform/gtk/RenderThemeGtk.cpp:
     11        (WebCore::RenderThemeGtk::formatMediaControlsCurrentTime):
     12        (WebCore::RenderThemeGtk::paintMediaCurrentTime):
     13        * platform/gtk/RenderThemeGtk.h:
     14
    1152010-12-24  Jan Erik Hanssen  <jhanssen@sencha.com>
    216
  • trunk/WebCore/css/mediaControlsGtk.css

    r54878 r74643  
    5050}
    5151
     52audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display {
     53    -webkit-appearance: media-current-time-display;
     54    -webkit-user-select: none;
     55    display: inline-block;
     56    height: 20px;
     57
     58    padding: 5px;
     59
     60    text-align: center;
     61    font-size: 10px;
     62}
     63
    5264audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button {
    5365    width: 20px;
  • trunk/WebCore/platform/gtk/RenderThemeGtk.cpp

    r74311 r74643  
    10071007    return false;
    10081008}
     1009
     1010String RenderThemeGtk::formatMediaControlsCurrentTime(float currentTime, float duration) const
     1011{
     1012    return formatMediaControlsTime(currentTime) + " / " + formatMediaControlsTime(duration);
     1013}
     1014
     1015bool RenderThemeGtk::paintMediaCurrentTime(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
     1016{
     1017    GraphicsContext* context = paintInfo.context;
     1018
     1019    context->fillRect(FloatRect(rect), m_panelColor, ColorSpaceDeviceRGB);
     1020    return false;
     1021}
    10091022#endif
    10101023
  • trunk/WebCore/platform/gtk/RenderThemeGtk.h

    r74129 r74643  
    8282#if ENABLE(VIDEO)
    8383    virtual String extraMediaControlsStyleSheet();
     84    virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const;
    8485#endif
    8586
     
    148149    virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
    149150    virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
     151    virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&);
    150152#endif
    151153
Note: See TracChangeset for help on using the changeset viewer.