Changeset 53966 in webkit


Ignore:
Timestamp:
Jan 27, 2010 6:55:55 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-27 Nicholas Young <nicholas.young@nokia.com>

Reviewed by Eric Carlson.

Make media controls fade in/out transition duration configurable on a theme level.
https://bugs.webkit.org/show_bug.cgi?id=34196

No new tests needed (I hope).

  • rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): Removed constant from contructor - the initial value is meaningless. (WebCore::RenderMedia::updateControlVisibility): Get fade in/out duration from theme.
  • rendering/RenderTheme.h: (WebCore::RenderTheme::mediaControlsFadeInDuration): New virtual method. (WebCore::RenderTheme::mediaControlsFadeOutDuration): New virtual method.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53965 r53966  
     12010-01-27  Nicholas Young  <nicholas.young@nokia.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        Make media controls fade in/out transition duration configurable on a theme level.
     6        https://bugs.webkit.org/show_bug.cgi?id=34196
     7
     8        No new tests needed (I hope).
     9
     10        * rendering/RenderMedia.cpp:
     11        (WebCore::RenderMedia::RenderMedia): Removed constant from contructor - the initial value is meaningless.
     12        (WebCore::RenderMedia::updateControlVisibility): Get fade in/out duration from theme.
     13        * rendering/RenderTheme.h:
     14        (WebCore::RenderTheme::mediaControlsFadeInDuration): New virtual method.
     15        (WebCore::RenderTheme::mediaControlsFadeOutDuration): New virtual method.
     16
    1172010-01-27  John Abd-El-Malek  <jam@chromium.org>
    218
  • trunk/WebCore/rendering/RenderMedia.cpp

    r53146 r53966  
    4646static const double cTimeUpdateRepeatDelay = 0.2;
    4747static const double cOpacityAnimationRepeatDelay = 0.05;
    48 // FIXME get this from style
    49 static const double cOpacityAnimationDurationFadeIn = 0.1;
    50 static const double cOpacityAnimationDurationFadeOut = 0.3;
    5148
    5249RenderMedia::RenderMedia(HTMLMediaElement* video)
     
    5653    , m_mouseOver(false)
    5754    , m_opacityAnimationStartTime(0)
    58     , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
     55    , m_opacityAnimationDuration(0)
    5956    , m_opacityAnimationFrom(0)
    6057    , m_opacityAnimationTo(1.0f)
     
    6865    , m_mouseOver(false)
    6966    , m_opacityAnimationStartTime(0)
    70     , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
     67    , m_opacityAnimationDuration(0)
    7168    , m_opacityAnimationFrom(0)
    7269    , m_opacityAnimationTo(1.0f)
     
    454451
    455452    if (animateFrom < animateTo)
    456         m_opacityAnimationDuration = cOpacityAnimationDurationFadeIn;
     453        m_opacityAnimationDuration = m_panel->renderer()->theme()->mediaControlsFadeInDuration();
    457454    else
    458         m_opacityAnimationDuration = cOpacityAnimationDurationFadeOut;
     455        m_opacityAnimationDuration = m_panel->renderer()->theme()->mediaControlsFadeOutDuration();
    459456
    460457    m_opacityAnimationFrom = animateFrom;
  • trunk/WebCore/rendering/RenderTheme.h

    r52432 r53966  
    174174    virtual bool hitTestMediaControlPart(RenderObject*, const IntPoint& absPoint);
    175175    virtual bool shouldRenderMediaControlPart(ControlPart, Element*);
     176    virtual double mediaControlsFadeInDuration() { return 0.1; }
     177    virtual double mediaControlsFadeOutDuration() { return 0.3; }
    176178#endif
    177179
Note: See TracChangeset for help on using the changeset viewer.