Commit 5b1001dc authored by adele@apple.com's avatar adele@apple.com
Browse files

2008-04-17 Eric Carlson <eric.carlson@apple.com>

        Reviewed by Adele. 

        Fix for <rdar://problem/5861642> QTMovieWin returns uninitialized values

        * platform/graphics/win/QTMovieWin.cpp:
        (QTMovieWin::rate):
        (QTMovieWin::setRate):
        (QTMovieWin::setVolume):
        (QTMovieWin::getNaturalSize):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f398cfd9
2008-04-17 Eric Carlson <eric.carlson@apple.com>
Reviewed by Adele.
Fix for <rdar://problem/5861642> QTMovieWin returns uninitialized values
* platform/graphics/win/QTMovieWin.cpp:
(QTMovieWin::rate):
(QTMovieWin::setRate):
(QTMovieWin::setVolume):
(QTMovieWin::getNaturalSize):
2008-04-17 Marco Barisione <marco.barisione@collabora.co.uk>
 
Reviewed by Alp Toker.
......@@ -320,11 +320,15 @@ void QTMovieWin::pause()
float QTMovieWin::rate() const
{
if (!m_private->m_movie)
return 0;
return FixedToFloat(GetMovieRate(m_private->m_movie));
}
void QTMovieWin::setRate(float rate)
{
if (!m_private->m_movie)
return;
SetMovieRate(m_private->m_movie, FloatToFixed(rate));
updateTaskTimer();
}
......@@ -359,6 +363,8 @@ void QTMovieWin::setCurrentTime(float time) const
void QTMovieWin::setVolume(float volume)
{
if (!m_private->m_movie)
return;
SetMovieVolume(m_private->m_movie, static_cast<short>(volume * 256));
}
......@@ -385,8 +391,10 @@ long QTMovieWin::loadState() const
void QTMovieWin::getNaturalSize(int& width, int& height)
{
Rect rect;
GetMovieNaturalBoundsRect(m_private->m_movie, &rect);
Rect rect = { 0, };
if (m_private->m_movie)
GetMovieNaturalBoundsRect(m_private->m_movie, &rect);
width = rect.right;
height = rect.bottom;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment