Bug 39457 - REGRESSION(r53637): DivX plug-in fails to start until window is resized
: REGRESSION(r53637): DivX plug-in fails to start until window is resized
Status: RESOLVED FIXED
: WebKit
Plug-ins
: 528+ (Nightly build)
: PC Windows XP
: P2 Normal
Assigned To:
: http://www.divx.com/fr/software/downl...
: InRadar
:
:
  Show dependency treegraph
 
Reported: 2010-05-20 16:47 PST by
Modified: 2010-05-20 20:21 PST (History)


Attachments
patch (3.32 KB, patch)
2010-05-20 17:44 PST, Jon Honeycutt
no flags Review Patch | Details | Formatted Diff | Diff
patch v2 (5.03 KB, patch)
2010-05-20 19:18 PST, Jon Honeycutt
simon.fraser: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-05-20 16:47:15 PST
The video on the page above doesn't start playing until the window is resized.

<rdar://problem/8006102>
------- Comment #1 From 2010-05-20 17:44:02 PST -------
Created an attachment (id=56652) [details]
patch
------- Comment #2 From 2010-05-20 18:26:32 PST -------
(From update of attachment 56652 [details])
> diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
> index 96fa9e4..baef667 100644
> --- a/WebCore/plugins/win/PluginViewWin.cpp
> +++ b/WebCore/plugins/win/PluginViewWin.cpp
> @@ -610,6 +610,9 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
>      if (context->paintingDisabled())
>          return;
>  
> +    // Ensure that we have called SetWindow before we try to paint.
> +    setNPWindowRect(frameRect());

Plugins may do significant work every time setWindow() is called. Can we be smarter about detecting when it needs to be called (e.g .by remembering the last frameRect that we called it with)?
------- Comment #3 From 2010-05-20 19:02:41 PST -------
(In reply to comment #2)
> (From update of attachment 56652 [details] [details])
> > diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
> > index 96fa9e4..baef667 100644
> > --- a/WebCore/plugins/win/PluginViewWin.cpp
> > +++ b/WebCore/plugins/win/PluginViewWin.cpp
> > @@ -610,6 +610,9 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
> >      if (context->paintingDisabled())
> >          return;
> >  
> > +    // Ensure that we have called SetWindow before we try to paint.
> > +    setNPWindowRect(frameRect());
> 
> Plugins may do significant work every time setWindow() is called. Can we be smarter about detecting when it needs to be called (e.g .by remembering the last frameRect that we called it with)?

I'm not sure why setNPWindowRect() doesn't already do this, but I'm wary about changing that. To fix this bug, it should only be necessary to call setNPWindowRect here if we haven't called NPP_SetWindow yet. I'll update the patch to do that.
------- Comment #4 From 2010-05-20 19:18:36 PST -------
Created an attachment (id=56661) [details]
patch v2
------- Comment #5 From 2010-05-20 20:21:20 PST -------
Landed in r59904.