Changeset 56079 in webkit


Ignore:
Timestamp:
Mar 16, 2010 1:40:28 PM (14 years ago)
Author:
ap@apple.com
Message:

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=36184
YouTube video resizing doesn't work with OOP plug-ins

Test: plugins/resize-from-plugin.html

We were calling _WKPHResizePluginInstance synchronously or asynchronously, depending on
whether the size has changed. But sync and async messages are not necessarily delivered in
order - plug-in host listens only to the former while waiting for a response to a message it
sent (a call to invoke() in this case).

  • Plugins/Hosted/NetscapePluginInstanceProxy.h:
  • Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::resize):
  • Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView updateAndSetWindow]):
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r56074 r56079  
     12010-03-16  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=36184
     6        YouTube video resizing doesn't work with OOP plug-ins
     7
     8        This test is quite fragile, as it depends on when exactly WebCore decides to do layout.
     9        If WebCore logic changes, the test will just always pass without executing the code path
     10        in question.
     11
     12        * plugins/resize-from-plugin-expected.txt: Added.
     13        * plugins/resize-from-plugin.html: Added.
     14        * plugins/resources/resize-from-plugin-frame.html: Added.
     15
    1162010-03-16  Zhenyao Mo  <zmo@google.com>
    217
  • trunk/WebKit/mac/ChangeLog

    r56051 r56079  
     12010-03-16  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=36184
     6        YouTube video resizing doesn't work with OOP plug-ins
     7
     8        Test: plugins/resize-from-plugin.html
     9
     10        We were calling _WKPHResizePluginInstance synchronously or asynchronously, depending on
     11        whether the size has changed. But sync and async messages are not necessarily delivered in
     12        order - plug-in host listens only to the former while waiting for a response to a message it
     13        sent (a call to invoke() in this case).
     14
     15        * Plugins/Hosted/NetscapePluginInstanceProxy.h:
     16        * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
     17        (WebKit::NetscapePluginInstanceProxy::resize):
     18        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
     19        (-[WebHostedNetscapePluginView updateAndSetWindow]):
     20
    1212010-03-16  Yury Semikhatsky <yurys@chromium.org>
    222
  • trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h

    r55702 r56079  
    9090    void pluginHostDied();
    9191   
    92     void resize(NSRect size, NSRect clipRect, bool sync);
     92    void resize(NSRect size, NSRect clipRect);
    9393    void destroy();
    9494    void focusChanged(bool hasFocus);
  • trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm

    r55861 r56079  
    247247}
    248248
    249 void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect, bool sync)
     249void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect)
    250250{
    251251    uint32_t requestID = 0;
    252252   
    253     if (sync)
    254         requestID = nextRequestID();
     253    requestID = nextRequestID();
    255254
    256255    _WKPHResizePluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID,
     
    258257                              clipRect.origin.x, clipRect.origin.y, clipRect.size.width, clipRect.size.height);
    259258   
    260     if (sync)
    261         waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
     259    waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
    262260}
    263261
  • trunk/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm

    r55824 r56079  
    181181        visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow);
    182182
    183     BOOL sizeChanged = !NSEqualSizes(_previousSize, boundsInWindow.size);
    184183    _previousSize = boundsInWindow.size;
    185184   
    186     _proxy->resize(boundsInWindow, visibleRectInWindow, sizeChanged);
     185    _proxy->resize(boundsInWindow, visibleRectInWindow);
    187186}
    188187
Note: See TracChangeset for help on using the changeset viewer.