Changeset 83624 in webkit


Ignore:
Timestamp:
Apr 12, 2011 12:45:15 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-04-12 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Call PluginControllerProxy::platformGeometryDidChange before Plugin::geometryDidChange
https://bugs.webkit.org/show_bug.cgi?id=58361

Since Plugin::geometryDidChange ends up calling plug-in code it can resize the plug-in which causes
platformGeometryDidChange to be called with the wrong rect.

  • PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::geometryDidChange): Call platformGeometryDidChange.
  • PluginProcess/PluginControllerProxy.h:
  • PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::platformGeometryDidChange): Remove the parameters to platformGeometryDidChange and just use m_frameRect instead.
Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r83623 r83624  
     12011-04-12  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Call PluginControllerProxy::platformGeometryDidChange before Plugin::geometryDidChange
     6        https://bugs.webkit.org/show_bug.cgi?id=58361
     7
     8        Since Plugin::geometryDidChange ends up calling plug-in code it can resize the plug-in which causes
     9        platformGeometryDidChange to be called with the wrong rect.
     10
     11        * PluginProcess/PluginControllerProxy.cpp:
     12        (WebKit::PluginControllerProxy::geometryDidChange):
     13        Call platformGeometryDidChange.
     14
     15        * PluginProcess/PluginControllerProxy.h:
     16        * PluginProcess/mac/PluginControllerProxyMac.mm:
     17        (WebKit::PluginControllerProxy::platformGeometryDidChange):
     18        Remove the parameters to platformGeometryDidChange and just use m_frameRect instead.
     19
    1202011-04-12  Anders Carlsson  <andersca@apple.com>
    221
  • trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp

    r83623 r83624  
    368368    ASSERT(m_plugin);
    369369
     370    platformGeometryDidChange();
     371
    370372    if (!backingStoreHandle.isNull()) {
    371373        // Create a new backing store.
     
    374376
    375377    m_plugin->geometryDidChange(frameRect, clipRect);
    376 
    377     platformGeometryDidChange(frameRect, clipRect);
    378378}
    379379
  • trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h

    r83622 r83624  
    138138    void platformInitialize();
    139139    void platformDestroy();
    140     void platformGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect);
     140    void platformGeometryDidChange();
    141141
    142142    WebProcessConnection* m_connection;
  • trunk/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm

    r83623 r83624  
    6868}
    6969
    70 void PluginControllerProxy::platformGeometryDidChange(const IntRect& frameRect, const IntRect&)
     70void PluginControllerProxy::platformGeometryDidChange()
    7171{
    7272    CALayer * pluginLayer = m_plugin->pluginLayer();
     
    7575    [CATransaction begin];
    7676    [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
    77     [pluginLayer setFrame:CGRectMake(0, 0, frameRect.width(), frameRect.height())];
     77    [pluginLayer setFrame:CGRectMake(0, 0, m_frameRect.width(), m_frameRect.height())];
    7878    [CATransaction commit];
    7979}
Note: See TracChangeset for help on using the changeset viewer.