Changeset 59904 in webkit


Ignore:
Timestamp:
May 20, 2010 8:20:27 PM (14 years ago)
Author:
jhoneycutt@apple.com
Message:

REGRESSION(r53637): DivX plug-in fails to start until window is resized
https://bugs.webkit.org/show_bug.cgi?id=39457
<rdar://problem/8006102>

Before r53637, we called Widget::move() (which caused us to call
NPP_SetWindow) before painting a plug-in. r53637 removed the call to
Widget::move(), and we end up never calling NPP_SetWindow for plug-ins
with the "DeferFirstSetWindowCall" quirk, including the DivX plug-in.

Reviewed by Simon Fraser.

  • manual-tests/divx-plugin-fails-to-draw.html: Added.
  • plugins/PluginView.cpp:

(WebCore::PluginView::PluginView):
Initialize new member to false.

  • plugins/PluginView.h:

Added new member.

  • plugins/win/PluginViewWin.cpp:

(WebCore::PluginView::paint):
Call setNPWindowRect() before painting to ensure that NPP_SetWindow gets
called.
(WebCore::PluginView::setNPWindowRect):
Set m_haveCalledSetWindow.

Location:
trunk/WebCore
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r59903 r59904  
     12010-05-20  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        REGRESSION(r53637): DivX plug-in fails to start until window is resized
     4        https://bugs.webkit.org/show_bug.cgi?id=39457
     5        <rdar://problem/8006102>
     6
     7        Before r53637, we called Widget::move() (which caused us to call
     8        NPP_SetWindow) before painting a plug-in. r53637 removed the call to
     9        Widget::move(), and we end up never calling NPP_SetWindow for plug-ins
     10        with the "DeferFirstSetWindowCall" quirk, including the DivX plug-in.
     11
     12        Reviewed by Simon Fraser.
     13
     14        * manual-tests/divx-plugin-fails-to-draw.html: Added.
     15
     16        * plugins/PluginView.cpp:
     17        (WebCore::PluginView::PluginView):
     18        Initialize new member to false.
     19
     20        * plugins/PluginView.h:
     21        Added new member.
     22
     23        * plugins/win/PluginViewWin.cpp:
     24        (WebCore::PluginView::paint):
     25        Call setNPWindowRect() before painting to ensure that NPP_SetWindow gets
     26        called.
     27        (WebCore::PluginView::setNPWindowRect):
     28        Set m_haveCalledSetWindow.
     29
    1302010-05-20  Fumitoshi Ukai  <ukai@chromium.org>
    231
  • trunk/WebCore/plugins/PluginView.cpp

    r59826 r59904  
    851851    , m_isHalted(false)
    852852    , m_hasBeenHalted(false)
     853    , m_haveCalledSetWindow(false)
    853854{
    854855    if (!m_plugin) {
  • trunk/WebCore/plugins/PluginView.h

    r59826 r59904  
    386386        bool m_hasBeenHalted;
    387387
     388        bool m_haveCalledSetWindow;
     389
    388390        static PluginView* s_currentPluginView;
    389391    };
  • trunk/WebCore/plugins/win/PluginViewWin.cpp

    r59868 r59904  
    602602        return;
    603603
     604    // Ensure that we have called SetWindow before we try to paint.
     605    if (!m_haveCalledSetWindow)
     606        setNPWindowRect(frameRect());
     607
    604608    if (m_isWindowed) {
    605609#if !OS(WINCE)
     
    807811        setCallingPlugin(false);
    808812
     813        m_haveCalledSetWindow = true;
     814
    809815        if (!m_isWindowed)
    810816            return;
Note: See TracChangeset for help on using the changeset viewer.