Bug 30965

Summary: Make MediaPlayer constructor private
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

Eric Carlson
Reported 2009-10-30 14:47:21 PDT
Every time the media element opens a new movie is creates a new MediaPlayer object, which it stores in an OwnPtr<>. It does this manually, so the code is ugly and confusing: m_player.clear(); m_player.set(new MediaPlayer(this)); MediaPlayer constructor should be made private, and it should have a static create() method that returns a PassOwnPtr<> so that it can be assigned to m_player instead of using OwnPtr<>::set().
Attachments
proposed patch (2.58 KB, patch)
2009-10-30 14:54 PDT, Eric Carlson
darin: review+
Eric Carlson
Comment 1 2009-10-30 14:54:52 PDT
Created attachment 42238 [details] proposed patch
Eric Carlson
Comment 2 2009-10-30 15:04:33 PDT
Sending WebCore/ChangeLog Sending WebCore/html/HTMLMediaElement.cpp Sending WebCore/platform/graphics/MediaPlayer.h Transmitting file data ... Committed revision 50357. trac.webkit.org/changeset/50357
Note You need to log in before you can comment on or make changes to this bug.