[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric.carlson at apple.com eric.carlson at apple.com
Thu Feb 4 21:23:19 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 87689013cbc68979a17a99716bfddd1b82e35571
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 21 15:01:06 2010 +0000

    2010-01-21  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Darin Adler.
    
            Cleanup MediaPlayer and MediaPlayerPrivateInterface to remove dead methods
            https://bugs.webkit.org/show_bug.cgi?id=30106
    
            No new tests, only dead code was removed.
    
            * platform/graphics/MediaPlayer.cpp:
            * platform/graphics/MediaPlayer.h:
            * platform/graphics/MediaPlayerPrivate.h:
            * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
            * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
            * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
            * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
            (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
            (WebCore::MediaPlayerPrivate::currentTime):
            (WebCore::MediaPlayerPrivate::doSeek):
            * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
            * platform/graphics/wince/MediaPlayerPrivateWince.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53625 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 456cee1..9985897 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-01-21  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Cleanup MediaPlayer and MediaPlayerPrivateInterface to remove dead methods
+        https://bugs.webkit.org/show_bug.cgi?id=30106
+
+        No new tests, only dead code was removed.
+
+        * platform/graphics/MediaPlayer.cpp:
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/MediaPlayerPrivate.h:
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+        * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::currentTime):
+        (WebCore::MediaPlayerPrivate::doSeek):
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+        * platform/graphics/wince/MediaPlayerPrivateWince.h:
+
 2010-01-21  Iain Campbell <iain.campbell at accenture.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index a9a288e..c26a26f 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -81,8 +81,6 @@ public:
     virtual void seek(float) { }
     virtual bool seeking() const { return false; }
 
-    virtual void setEndTime(float) { }
-
     virtual void setRate(float) { }
     virtual void setPreservesPitch(bool) { }
     virtual bool paused() const { return false; }
@@ -98,9 +96,6 @@ public:
     virtual float maxTimeSeekable() const { return 0; }
     virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create(); }
 
-    virtual int dataRate() const { return 0; }
-
-    virtual bool totalBytesKnown() const { return false; }
     virtual unsigned totalBytes() const { return 0; }
     virtual unsigned bytesLoaded() const { return 0; }
 
@@ -415,16 +410,6 @@ void MediaPlayer::setPreservesPitch(bool preservesPitch)
     m_private->setPreservesPitch(preservesPitch);
 }
 
-int MediaPlayer::dataRate() const
-{
-    return m_private->dataRate();
-}
-
-void MediaPlayer::setEndTime(float time)
-{
-    m_private->setEndTime(time);
-}
-
 PassRefPtr<TimeRanges> MediaPlayer::buffered()
 {
     return m_private->buffered();
@@ -440,16 +425,6 @@ unsigned MediaPlayer::bytesLoaded()
     return m_private->bytesLoaded();
 }
 
-bool MediaPlayer::totalBytesKnown()
-{
-    return m_private->totalBytesKnown();
-}
-
-unsigned MediaPlayer::totalBytes()
-{
-    return m_private->totalBytes();
-}
-
 void MediaPlayer::setSize(const IntSize& size)
 { 
     m_size = size;
diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h
index 0e5460d..fa85cfd 100644
--- a/WebCore/platform/graphics/MediaPlayer.h
+++ b/WebCore/platform/graphics/MediaPlayer.h
@@ -163,8 +163,6 @@ public:
 
     float startTime() const;
     
-    void setEndTime(float time);
-    
     float rate() const;
     void setRate(float);
 
@@ -175,8 +173,6 @@ public:
     float maxTimeSeekable();
 
     unsigned bytesLoaded();
-    bool totalBytesKnown();
-    unsigned totalBytes();
     
     float volume() const;
     void setVolume(float);
@@ -184,8 +180,6 @@ public:
     bool hasClosedCaptions() const;
     void setClosedCaptionsVisible(bool closedCaptionsVisible);
 
-    int dataRate() const;
-
     bool autobuffer() const;    
     void setAutobuffer(bool);
 
diff --git a/WebCore/platform/graphics/MediaPlayerPrivate.h b/WebCore/platform/graphics/MediaPlayerPrivate.h
index e8b472c..6cf12ba 100644
--- a/WebCore/platform/graphics/MediaPlayerPrivate.h
+++ b/WebCore/platform/graphics/MediaPlayerPrivate.h
@@ -67,8 +67,6 @@ public:
 
     virtual float startTime() const { return 0; }
 
-    virtual void setEndTime(float) = 0;
-
     virtual void setRate(float) = 0;
     virtual void setPreservesPitch(bool) { }
 
@@ -85,10 +83,6 @@ public:
     virtual float maxTimeSeekable() const = 0;
     virtual PassRefPtr<TimeRanges> buffered() const = 0;
 
-    virtual int dataRate() const = 0;
-
-    virtual bool totalBytesKnown() const { return totalBytes() > 0; }
-    virtual unsigned totalBytes() const = 0;
     virtual unsigned bytesLoaded() const = 0;
 
     virtual void setSize(const IntSize&) = 0;
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index 1ed4941..facf738 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -386,11 +386,6 @@ void MediaPlayerPrivate::seek(float time)
     }
 }
 
-void MediaPlayerPrivate::setEndTime(float time)
-{
-    notImplemented();
-}
-
 void MediaPlayerPrivate::startEndPointTimerIfNeeded()
 {
     notImplemented();
@@ -536,12 +531,6 @@ void MediaPlayerPrivate::setRate(float rate)
         g_object_set(m_playBin, "mute", mute, NULL);
 }
 
-int MediaPlayerPrivate::dataRate() const
-{
-    notImplemented();
-    return 1;
-}
-
 MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const
 {
     return m_networkState;
@@ -599,12 +588,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
     return 1; // totalBytes() * maxTime / dur;
 }
 
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
-    LOG_VERBOSE(Media, "totalBytesKnown");
-    return totalBytes() > 0;
-}
-
 unsigned MediaPlayerPrivate::totalBytes() const
 {
     LOG_VERBOSE(Media, "totalBytes");
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
index 369a960..278bd1c 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
@@ -72,21 +72,17 @@ class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
             float duration() const;
             float currentTime() const;
             void seek(float);
-            void setEndTime(float);
 
             void setRate(float);
             void setVolume(float);
             void volumeChanged();
 
-            int dataRate() const;
-
             MediaPlayer::NetworkState networkState() const;
             MediaPlayer::ReadyState readyState() const;
 
             PassRefPtr<TimeRanges> buffered() const;
             float maxTimeSeekable() const;
             unsigned bytesLoaded() const;
-            bool totalBytesKnown() const;
             unsigned totalBytes() const;
 
             void setVisible(bool);
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
index 48cac4c..e9f64be 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
@@ -104,17 +104,12 @@ private:
     bool hasClosedCaptions() const;
     void setClosedCaptionsVisible(bool);
 
-    void setEndTime(float time);
-
-    int dataRate() const;
-    
     MediaPlayer::NetworkState networkState() const { return m_networkState; }
     MediaPlayer::ReadyState readyState() const { return m_readyState; }
     
     PassRefPtr<TimeRanges> buffered() const;
     float maxTimeSeekable() const;
     unsigned bytesLoaded() const;
-    bool totalBytesKnown() const;
     unsigned totalBytes() const;
     
     void setVisible(bool);
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index 43f9fb7..701f779 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -689,10 +689,6 @@ void MediaPlayerPrivate::seekTimerFired(Timer<MediaPlayerPrivate>*)
     }
 }
 
-void MediaPlayerPrivate::setEndTime(float)
-{
-}
-
 bool MediaPlayerPrivate::paused() const
 {
     if (!metaDataAvailable())
@@ -798,13 +794,6 @@ void MediaPlayerPrivate::setPreservesPitch(bool preservesPitch)
     createQTMovie([movieAttributes valueForKey:QTMovieURLAttribute], movieAttributes);
 }
 
-int MediaPlayerPrivate::dataRate() const
-{
-    if (!metaDataAvailable())
-        return 0;
-    return wkQTMovieDataRate(m_qtMovie.get()); 
-}
-
 PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const
 {
     RefPtr<TimeRanges> timeRanges = TimeRanges::create();
@@ -841,11 +830,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
     return totalBytes() * maxTimeLoaded() / dur;
 }
 
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
-    return totalBytes() > 0;
-}
-
 unsigned MediaPlayerPrivate::totalBytes() const
 {
     if (!metaDataAvailable())
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
index 85ced26..3ea9afb 100644
--- a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+++ b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
@@ -259,11 +259,6 @@ float MediaPlayerPrivate::currentTime() const
     return currentTime;
 }
 
-void MediaPlayerPrivate::setEndTime(float)
-{
-    notImplemented();
-}
-
 PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const
 {
     notImplemented();
@@ -282,12 +277,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
     return 0;
 }
 
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
-    //notImplemented();
-    return false;
-}
-
 unsigned MediaPlayerPrivate::totalBytes() const
 {
     //notImplemented();
@@ -311,14 +300,6 @@ void MediaPlayerPrivate::setMuted(bool muted)
     m_audioOutput->setMuted(muted);
 }
 
-
-int MediaPlayerPrivate::dataRate() const
-{
-    // This is not used at the moment
-    return 0;
-}
-
-
 MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const
 {
     const QMetaObject* metaObj = this->metaObject();
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
index e1193b6..e7630a1 100644
--- a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
+++ b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
@@ -94,21 +94,17 @@ namespace WebCore {
         float duration() const;
         float currentTime() const;
         void seek(float);
-        void setEndTime(float);
 
         void setRate(float);
         void setVolume(float);
         void setMuted(bool);
 
-        int dataRate() const;
-
         MediaPlayer::NetworkState networkState() const;
         MediaPlayer::ReadyState readyState() const;
 
         PassRefPtr<TimeRanges> buffered() const;
         float maxTimeSeekable() const;
         unsigned bytesLoaded() const;
-        bool totalBytesKnown() const;
         unsigned totalBytes() const;
 
         void setVisible(bool);
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
index 7f20418..84cd2a3 100644
--- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
+++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
@@ -67,7 +67,6 @@ void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar)
 MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
     : m_player(player)
     , m_seekTo(-1)
-    , m_endTime(numeric_limits<float>::infinity())
     , m_seekTimer(this, &MediaPlayerPrivate::seekTimerFired)
     , m_networkState(MediaPlayer::Empty)
     , m_readyState(MediaPlayer::HaveNothing)
@@ -206,7 +205,7 @@ float MediaPlayerPrivate::currentTime() const
 {
     if (!m_qtMovie)
         return 0;
-    return min(m_qtMovie->currentTime(), m_endTime);
+    return m_qtMovie->currentTime();
 }
 
 void MediaPlayerPrivate::seek(float time)
@@ -234,7 +233,7 @@ void MediaPlayerPrivate::doSeek()
     m_qtMovie->setCurrentTime(m_seekTo);
     float timeAfterSeek = currentTime();
     // restore playback only if not at end, othewise QTMovie will loop
-    if (oldRate && timeAfterSeek < duration() && timeAfterSeek < m_endTime)
+    if (oldRate && timeAfterSeek < duration())
         m_qtMovie->setRate(oldRate);
     cancelSeek();
 }
@@ -266,11 +265,6 @@ void MediaPlayerPrivate::seekTimerFired(Timer<MediaPlayerPrivate>*)
     }
 }
 
-void MediaPlayerPrivate::setEndTime(float time)
-{
-    m_endTime = time;
-}
-
 bool MediaPlayerPrivate::paused() const
 {
     if (!m_qtMovie)
@@ -344,12 +338,6 @@ void MediaPlayerPrivate::setClosedCaptionsVisible(bool visible)
     m_qtMovie->setClosedCaptionsVisible(visible);
 }
 
-int MediaPlayerPrivate::dataRate() const
-{
-    // This is not used at the moment
-    return 0;
-}
-
 PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const
 {
     RefPtr<TimeRanges> timeRanges = TimeRanges::create();
@@ -384,11 +372,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
     return totalBytes() * maxTime / dur;
 }
 
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
-    return totalBytes() > 0;
-}
-
 unsigned MediaPlayerPrivate::totalBytes() const
 {
     if (!m_qtMovie)
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
index c035bf1..14c3ef5 100644
--- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
+++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
@@ -72,21 +72,17 @@ private:
     float duration() const;
     float currentTime() const;
     void seek(float time);
-    void setEndTime(float);
     
     void setRate(float);
     void setVolume(float);
     void setPreservesPitch(bool);
     
-    int dataRate() const;
-    
     MediaPlayer::NetworkState networkState() const { return m_networkState; }
     MediaPlayer::ReadyState readyState() const { return m_readyState; }
     
     PassRefPtr<TimeRanges> buffered() const;
     float maxTimeSeekable() const;
     unsigned bytesLoaded() const;
-    bool totalBytesKnown() const;
     unsigned totalBytes() const;
     
     void setVisible(bool);
@@ -123,7 +119,6 @@ private:
     MediaPlayer* m_player;
     OwnPtr<QTMovieWin> m_qtMovie;
     float m_seekTo;
-    float m_endTime;
     Timer<MediaPlayerPrivate> m_seekTimer;
     MediaPlayer::NetworkState m_networkState;
     MediaPlayer::ReadyState m_readyState;
diff --git a/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h b/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h
index 2d6c358..a657e3e 100644
--- a/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h
+++ b/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h
@@ -61,20 +61,16 @@ namespace WebCore {
         float duration() const;
         float currentTime() const;
         void seek(float time);
-        void setEndTime(float);
 
         void setRate(float);
         void setVolume(float);
 
-        int dataRate() const;
-
         MediaPlayer::NetworkState networkState() const { return m_networkState; }
         MediaPlayer::ReadyState readyState() const { return m_readyState; }
 
         PassRefPtr<TimeRanges> buffered() const;
         float maxTimeSeekable() const;
         unsigned bytesLoaded() const;
-        bool totalBytesKnown() const;
         unsigned totalBytes() const;
 
         void setVisible(bool);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list