Bug 24042

Summary: MediaPlayer should cache plug-in proxy
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
proposed patch simon.fraser: review+

Description Eric Carlson 2009-02-19 14:05:56 PST
The changes in https://bugs.webkit.org/show_bug.cgi?id=23917 assume that HTMLMediaElement::finishParsingChildren is always called before the plug-in gets instantiated and calls HTMLMediaElement::setMediaPlayerProxy. This is not true on all platforms because of threading latency, so MediaPlayer.cpp should cache the plug-in proxy so it can pass it to the media engine at a later time.
Comment 1 Eric Carlson 2009-02-19 17:05:42 PST
Created attachment 27817 [details]
proposed patch
Comment 2 Simon Fraser (smfr) 2009-02-20 12:05:10 PST
Comment on attachment 27817 [details]
proposed patch


> Index: WebCore/platform/graphics/MediaPlayer.cpp
> ===================================================================

> +#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
> +    virtual void setPoster(const String&) { }

setPoster(const String& /*url*/) would be slightly clearer.


> Index: WebCore/platform/graphics/MediaPlayer.h
> ===================================================================
> --- WebCore/platform/graphics/MediaPlayer.h	(revision 41083)
> +++ WebCore/platform/graphics/MediaPlayer.h	(working copy)
> @@ -149,6 +149,9 @@ private:
>      bool m_visible;
>      float m_rate;
>      float m_volume;
> +#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
> +    WebMediaPlayerProxy* m_playerProxy;
> +#endif

Maybe add a comment to say that m_playerProxy is not owned and where
it comes from?
Comment 3 Eric Carlson 2009-02-20 13:13:58 PST
Committed revision 41118.