[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

mrowe at apple.com mrowe at apple.com
Thu Apr 8 01:03:15 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9bbc2abafd7e6ade9d0c1ae039746b2e52764414
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 13 03:33:58 2010 +0000

    <rdar://problem/7512726> Flash full-screen does not work correctly with Flash 10.1 beta
    
    Reviewed by Darin Adler.
    
    Explicitly track when the plug-in shows and hides a full-screen window to determine
    whether a plug-in is currently full-screen, rather than relying on menu bar visibility.
    This ensures that we activate the plug-in host process and client application as
    appropriate when the plug-in enters or exits full-screen.
    
    * Plugins/Hosted/NetscapePluginHostProxy.h:
    (WebKit::NetscapePluginHostProxy::isFullScreenWindowShowing):
    * Plugins/Hosted/NetscapePluginHostProxy.mm:
    (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
    (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
    (WebKit::NetscapePluginHostProxy::didEnterFullScreen):
    (WebKit::NetscapePluginHostProxy::didExitFullScreen):
    (WebKit::NetscapePluginHostProxy::setFullScreenWindowIsShowing):
    (WKPCSetMenuBarVisible):
    (WKPCSetFullScreenWindowIsShowing):
    * Plugins/Hosted/WebKitPluginClient.defs:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53178 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 00d9021..afbc7b8 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,26 @@
+2010-01-11  Mark Rowe  <mrowe at apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/7512726> Flash full-screen does not work correctly with Flash 10.1 beta
+
+        Explicitly track when the plug-in shows and hides a full-screen window to determine
+        whether a plug-in is currently full-screen, rather than relying on menu bar visibility.
+        This ensures that we activate the plug-in host process and client application as
+        appropriate when the plug-in enters or exits full-screen.
+
+        * Plugins/Hosted/NetscapePluginHostProxy.h:
+        (WebKit::NetscapePluginHostProxy::isFullScreenWindowShowing):
+        * Plugins/Hosted/NetscapePluginHostProxy.mm:
+        (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+        (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
+        (WebKit::NetscapePluginHostProxy::didEnterFullScreen):
+        (WebKit::NetscapePluginHostProxy::didExitFullScreen):
+        (WebKit::NetscapePluginHostProxy::setFullScreenWindowIsShowing):
+        (WKPCSetMenuBarVisible):
+        (WKPCSetFullScreenWindowIsShowing):
+        * Plugins/Hosted/WebKitPluginClient.defs:
+
 2010-01-11  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Kevin Decker.
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
index c3b58de..cd3729f 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
@@ -50,10 +50,13 @@ public:
     void removePluginInstance(NetscapePluginInstanceProxy*);
 
     NetscapePluginInstanceProxy* pluginInstance(uint32_t pluginID);
-    
+
     bool isMenuBarVisible() const { return m_menuBarIsVisible; }
     void setMenuBarVisible(bool);
-    
+
+    bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; }
+    void setFullScreenWindowIsShowing(bool);
+
     void setModal(bool);
 
     void applicationDidBecomeActive();
@@ -69,8 +72,11 @@ private:
 
     void beginModal();
     void endModal();
-    
-    static void deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info);
+
+    void didEnterFullScreen() const;
+    void didExitFullScreen() const;
+
+    static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info);
 
     typedef HashMap<uint32_t, RefPtr<NetscapePluginInstanceProxy> > PluginInstanceMap;
     PluginInstanceMap m_instances;
@@ -90,10 +96,11 @@ private:
     RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow;
     unsigned m_isModal;
     bool m_menuBarIsVisible;
+    bool m_fullScreenWindowIsShowing;
     const ProcessSerialNumber m_pluginHostPSN;
-    
+
     unsigned m_processingRequests;
-    
+
     bool m_shouldCacheMissingPropertiesAndMethods;
 };
     
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index c3bd6a7..0e6c9a3 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -94,6 +94,7 @@ NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_po
     , m_pluginHostPort(pluginHostPort)
     , m_isModal(false)
     , m_menuBarIsVisible(true)
+    , m_fullScreenWindowIsShowing(false)
     , m_pluginHostPSN(pluginHostPSN)
     , m_processingRequests(0)
     , m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods)
@@ -196,14 +197,42 @@ void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, v
 void NetscapePluginHostProxy::setMenuBarVisible(bool visible)
 {
     m_menuBarIsVisible = visible;
-    
+
     [NSMenu setMenuBarVisible:visible];
-    if (visible) {
-        // Make ourselves the front app
-        ProcessSerialNumber psn;
-        GetCurrentProcess(&psn);
-        SetFrontProcess(&psn);
-    }
+}
+
+void NetscapePluginHostProxy::didEnterFullScreen() const
+{
+    SetFrontProcess(&m_pluginHostPSN);
+}
+
+void NetscapePluginHostProxy::didExitFullScreen() const
+{
+    // If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode.
+
+    ProcessSerialNumber frontProcess;
+    GetFrontProcess(&frontProcess);
+    Boolean isSameProcess = 0;
+    SameProcess(&frontProcess, &m_pluginHostPSN, &isSameProcess);
+    if (!isSameProcess)
+        return;
+
+    ProcessSerialNumber currentProcess;
+    GetCurrentProcess(&currentProcess);
+    SetFrontProcess(&currentProcess);
+}
+
+void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing)
+{
+    if (m_fullScreenWindowIsShowing == isShowing)
+        return;
+
+    m_fullScreenWindowIsShowing = isShowing;
+    if (m_fullScreenWindowIsShowing)
+        didEnterFullScreen();
+    else
+        didExitFullScreen();
+
 }
 
 void NetscapePluginHostProxy::applicationDidBecomeActive()
@@ -875,7 +904,18 @@ kern_return_t WKPCSetMenuBarVisible(mach_port_t clientPort, boolean_t menuBarVis
         return KERN_FAILURE;
 
     hostProxy->setMenuBarVisible(menuBarVisible);
-    
+
+    return KERN_SUCCESS;
+}
+
+kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing)
+{
+    NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+    if (!hostProxy)
+        return KERN_FAILURE;
+
+    hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing);
+
     return KERN_SUCCESS;
 }
 
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
index e3fb3d7..0cf4005 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
@@ -233,3 +233,6 @@ simpleroutine PCBooleanAndDataReply(clientPort :mach_port_t;
 
 simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t;
                                  panelData :data_t);
+
+simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t;
+                                             isShowing :boolean_t);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list