Changeset 68520 in webkit


Ignore:
Timestamp:
Sep 28, 2010 8:44:00 AM (14 years ago)
Author:
Adam Roben
Message:

Don't call NPP_SetWindow until the plugin's HWND has been sized/positioned

Test: platform/win/plugins/window-geometry-initialized-before-set-window.html

Reviewed by Anders Carlsson.

Fixes <http://webkit.org/b/46716> <rdar://problem/8482014> Full-page
Adobe Reader does not paint until window is resized

WebKit2:

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::geometryDidChange): Call NPP_SetWindow after
updating the platform (HWND) geometry.

WebKitTools:

Test that a plugin's HWND is sized/positioned before NPP_SetWindow is called

Reviewed by Anders Carlsson.

  • DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:

(PluginTest::NPP_SetWindow): Added. Just returns NPERR_NO_ERROR at
this level.

  • DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Declared

NPP_SetWindow.

  • DumpRenderTree/TestNetscapePlugIn/Tests/win/WindowGeometryInitializedBeforeSetWindow.cpp: Added.

(WindowGeometryInitializedBeforeSetWindow::NPP_SetWindow): Checks that
the plugin's HWND has a non-zero size and that its size/position
matches that specified in the NPWindow.

  • DumpRenderTree/TestNetscapePlugIn/main.cpp:

(NPP_SetWindow): Call through to the PluginTest.

  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:

Added WindowGeometryInitializedBeforeSetWindow.cpp, and let VS reorder
the files as it saw fit.

LayoutTests:

Test that a plugin's HWND is sized/positioned before NPP_SetWindow is called

  • platform/win/plugins/window-geometry-initialized-before-set-window-expected.txt: Added.
  • platform/win/plugins/window-geometry-initialized-before-set-window.html: Added.
Location:
trunk
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r68519 r68520  
     12010-09-28  Adam Roben  <aroben@apple.com>
     2
     3        Test that a plugin's HWND is sized/positioned before NPP_SetWindow is
     4        called
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Test for <http://webkit.org/b/46716> <rdar://problem/8482014>
     9        Full-page Adobe Reader does not paint until window is resized
     10
     11        * platform/win/plugins/window-geometry-initialized-before-set-window-expected.txt: Added.
     12        * platform/win/plugins/window-geometry-initialized-before-set-window.html: Added.
     13
    1142010-09-28  Adam Roben  <aroben@apple.com>
    215
  • trunk/WebKit2/ChangeLog

    r68518 r68520  
     12010-09-28  Adam Roben  <aroben@apple.com>
     2
     3        Don't call NPP_SetWindow until the plugin's HWND has been
     4        sized/positioned
     5
     6        Test: platform/win/plugins/window-geometry-initialized-before-set-window.html
     7
     8        Reviewed by Anders Carlsson.
     9
     10        Fixes <http://webkit.org/b/46716> <rdar://problem/8482014> Full-page
     11        Adobe Reader does not paint until window is resized
     12
     13        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
     14        (WebKit::NetscapePlugin::geometryDidChange): Call NPP_SetWindow after
     15        updating the platform (HWND) geometry.
     16
    1172010-09-28  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp

    r68299 r68520  
    398398    m_clipRect = clipRect;
    399399
     400    platformGeometryDidChange();
    400401    callSetWindow();
    401     platformGeometryDidChange();
    402402}
    403403
  • trunk/WebKitTools/ChangeLog

    r68514 r68520  
     12010-09-28  Adam Roben  <aroben@apple.com>
     2
     3        Test that a plugin's HWND is sized/positioned before NPP_SetWindow is
     4        called
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Test for <http://webkit.org/b/46716> <rdar://problem/8482014>
     9        Full-page Adobe Reader does not paint until window is resized
     10
     11        * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
     12        (PluginTest::NPP_SetWindow): Added. Just returns NPERR_NO_ERROR at
     13        this level.
     14
     15        * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Declared
     16        NPP_SetWindow.
     17
     18        * DumpRenderTree/TestNetscapePlugIn/Tests/win/WindowGeometryInitializedBeforeSetWindow.cpp: Added.
     19        (WindowGeometryInitializedBeforeSetWindow::NPP_SetWindow): Checks that
     20        the plugin's HWND has a non-zero size and that its size/position
     21        matches that specified in the NPWindow.
     22
     23        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
     24        (NPP_SetWindow): Call through to the PluginTest.
     25
     26        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
     27        Added WindowGeometryInitializedBeforeSetWindow.cpp, and let VS reorder
     28        the files as it saw fit.
     29
    1302010-09-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
    231
  • trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp

    r64444 r68520  
    6161}
    6262
     63NPError PluginTest::NPP_SetWindow(NPP, NPWindow*)
     64{
     65    return NPERR_NO_ERROR;
     66}
     67
    6368NPIdentifier PluginTest::NPN_GetStringIdentifier(const NPUTF8 *name)
    6469{
  • trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h

    r64479 r68520  
    5858    virtual NPError NPP_DestroyStream(NPStream* stream, NPReason reason);
    5959    virtual NPError NPP_GetValue(NPPVariable, void* value);
     60    virtual NPError NPP_SetWindow(NPP, NPWindow*);
    6061
    6162    // NPN functions.
  • trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp

    r66634 r68520  
    301301    }
    302302   
    303     return NPERR_NO_ERROR;
     303    return obj->pluginTest->NPP_SetWindow(instance, window);
    304304}
    305305
  • trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj

    r64479 r68520  
    368368        </References>
    369369        <Files>
     370                <Filter
     371                        Name="Tests"
     372                        >
     373                        <File
     374                                RelativePath="..\Tests\DocumentOpenInDestroyStream.cpp"
     375                                >
     376                        </File>
     377                        <File
     378                                RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp"
     379                                >
     380                        </File>
     381                        <File
     382                                RelativePath="..\Tests\NPRuntimeRemoveProperty.cpp"
     383                                >
     384                        </File>
     385                        <File
     386                                RelativePath="..\Tests\PluginScriptableNPObjectInvokeDefault.cpp"
     387                                >
     388                        </File>
     389                        <Filter
     390                                Name="win"
     391                                >
     392                                <File
     393                                        RelativePath="..\Tests\win\WindowGeometryInitializedBeforeSetWindow.cpp"
     394                                        >
     395                                </File>
     396                        </Filter>
     397                </Filter>
    370398                <File
    371399                        RelativePath="..\main.cpp"
     
    457485                        >
    458486                </File>
    459                 <Filter
    460                         Name="Tests"
    461                         >
    462                   <File
    463                   RelativePath="..\Tests\DocumentOpenInDestroyStream.cpp"
    464                 >
    465           </File>
    466           <File
    467                   RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp"
    468                 >
    469           </File>
    470                   <File
    471                   RelativePath="..\Tests\NPRuntimeRemoveProperty.cpp"
    472                 >
    473           </File>
    474                   <File
    475                   RelativePath="..\Tests\PluginScriptableNPObjectInvokeDefault.cpp"
    476                 >
    477           </File>
    478                 </Filter>
    479487        </Files>
    480488        <Globals>
Note: See TracChangeset for help on using the changeset viewer.