[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric.carlson at apple.com eric.carlson at apple.com
Wed Apr 7 23:17:01 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 00af9fdbe11de3ed826ba2eb749a39f310f09358
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 30 22:03:37 2009 +0000

    2009-10-30  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Darin Adler.
    
            Make MediaPlayer constructor private
            https://bugs.webkit.org/show_bug.cgi?id=30965
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::loadResource):
            (WebCore::HTMLMediaElement::finishParsingChildren): Use MediaPlayer::create.
    
            * platform/graphics/MediaPlayer.h:
            (WebCore::MediaPlayer::create): New.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50357 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 06c8386..1d2c8ff 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-30  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Make MediaPlayer constructor private
+        https://bugs.webkit.org/show_bug.cgi?id=30965
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::loadResource): 
+        (WebCore::HTMLMediaElement::finishParsingChildren): Use MediaPlayer::create.
+
+        * platform/graphics/MediaPlayer.h:
+        (WebCore::MediaPlayer::create): New.
+
 2009-10-29  Jon Honeycutt  <jhoneycutt at apple.com>
 
         MSAA: Accessibility of headings is not correct
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 729aceb..86785a1 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -582,11 +582,10 @@ void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& content
         startProgressEventTimer();
 
 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-    m_player.clear();
-    m_player.set(new MediaPlayer(this));
+    m_player = MediaPlayer::create(this);
 #else
     if (!m_player)
-        m_player.set(new MediaPlayer(this));
+        m_player = MediaPlayer::create(this);
 #endif
 
     m_player->setPreservesPitch(m_webkitPreservesPitch);
@@ -1784,7 +1783,7 @@ void HTMLMediaElement::finishParsingChildren()
 {
     HTMLElement::finishParsingChildren();
     if (!m_player)
-        m_player.set(new MediaPlayer(this));
+        m_player = MediaPlayer::create(this);
     
     document()->updateStyleIfNeeded();
     if (m_needWidgetUpdate && renderer())
diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h
index 4cc6476..51165b5 100644
--- a/WebCore/platform/graphics/MediaPlayer.h
+++ b/WebCore/platform/graphics/MediaPlayer.h
@@ -37,6 +37,7 @@
 #include <wtf/HashSet.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
 
 #ifdef __OBJC__
 @class QTMovie;
@@ -115,7 +116,11 @@ public:
 
 class MediaPlayer : public Noncopyable {
 public:
-    MediaPlayer(MediaPlayerClient*);
+
+    static PassOwnPtr<MediaPlayer> create(MediaPlayerClient* client)
+    {
+        return new MediaPlayer(client);
+    }
     virtual ~MediaPlayer();
 
     // media engine support
@@ -223,6 +228,8 @@ public:
     bool hasSingleSecurityOrigin() const;
 
 private:
+    MediaPlayer(MediaPlayerClient*);
+
     static void initializeMediaEngines();
 
     MediaPlayerClient* m_mediaPlayerClient;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list