[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:30:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 20aceb8b09184cc1a3419f42a6d50ac18896d689
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 28 02:55:55 2010 +0000
2010-01-27 Nicholas Young <nicholas.young at 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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d6e22f7..8ba12d1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-27 Nicholas Young <nicholas.young at 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.
+
2010-01-27 John Abd-El-Malek <jam at chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/rendering/RenderMedia.cpp b/WebCore/rendering/RenderMedia.cpp
index 8e4e7af..8acebfb 100644
--- a/WebCore/rendering/RenderMedia.cpp
+++ b/WebCore/rendering/RenderMedia.cpp
@@ -45,9 +45,6 @@ using namespace HTMLNames;
static const double cTimeUpdateRepeatDelay = 0.2;
static const double cOpacityAnimationRepeatDelay = 0.05;
-// FIXME get this from style
-static const double cOpacityAnimationDurationFadeIn = 0.1;
-static const double cOpacityAnimationDurationFadeOut = 0.3;
RenderMedia::RenderMedia(HTMLMediaElement* video)
: RenderImage(video)
@@ -55,7 +52,7 @@ RenderMedia::RenderMedia(HTMLMediaElement* video)
, m_opacityAnimationTimer(this, &RenderMedia::opacityAnimationTimerFired)
, m_mouseOver(false)
, m_opacityAnimationStartTime(0)
- , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
+ , m_opacityAnimationDuration(0)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
@@ -67,7 +64,7 @@ RenderMedia::RenderMedia(HTMLMediaElement* video, const IntSize& intrinsicSize)
, m_opacityAnimationTimer(this, &RenderMedia::opacityAnimationTimerFired)
, m_mouseOver(false)
, m_opacityAnimationStartTime(0)
- , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
+ , m_opacityAnimationDuration(0)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
@@ -453,9 +450,9 @@ void RenderMedia::updateControlVisibility()
}
if (animateFrom < animateTo)
- m_opacityAnimationDuration = cOpacityAnimationDurationFadeIn;
+ m_opacityAnimationDuration = m_panel->renderer()->theme()->mediaControlsFadeInDuration();
else
- m_opacityAnimationDuration = cOpacityAnimationDurationFadeOut;
+ m_opacityAnimationDuration = m_panel->renderer()->theme()->mediaControlsFadeOutDuration();
m_opacityAnimationFrom = animateFrom;
m_opacityAnimationTo = animateTo;
diff --git a/WebCore/rendering/RenderTheme.h b/WebCore/rendering/RenderTheme.h
index ac53c99..ee39d0c 100644
--- a/WebCore/rendering/RenderTheme.h
+++ b/WebCore/rendering/RenderTheme.h
@@ -173,6 +173,8 @@ public:
// Media controls
virtual bool hitTestMediaControlPart(RenderObject*, const IntPoint& absPoint);
virtual bool shouldRenderMediaControlPart(ControlPart, Element*);
+ virtual double mediaControlsFadeInDuration() { return 0.1; }
+ virtual double mediaControlsFadeOutDuration() { return 0.3; }
#endif
protected:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list