Title: [119260] trunk/Source/WebKit2
Revision
119260
Author
[email protected]
Date
2012-06-01 12:24:37 -0700 (Fri, 01 Jun 2012)

Log Message

<rdar://problem/11335622> and https://bugs.webkit.org/show_bug.cgi?id=88119
REGRESSION (r99448) Zero-sized plug-ins no longer get an NPP_SetWindow call

Reviewed by Oliver Hunt.

Add a flag to NetscapePlugin to track whether or not NPP_SetWindow has ever been called.
Check this flag in geometryDidChange to make sure every plug-in gets the call at least once.

"Everybody gets one.  Tell him, Peter."
"Apparently everybody gets one."
"Bingo."

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (119259 => 119260)


--- trunk/Source/WebKit2/ChangeLog	2012-06-01 19:00:25 UTC (rev 119259)
+++ trunk/Source/WebKit2/ChangeLog	2012-06-01 19:24:37 UTC (rev 119260)
@@ -1,3 +1,23 @@
+2012-06-01  Brady Eidson  <[email protected]>
+
+        <rdar://problem/11335622> and https://bugs.webkit.org/show_bug.cgi?id=88119
+        REGRESSION (r99448) Zero-sized plug-ins no longer get an NPP_SetWindow call
+
+        Reviewed by Oliver Hunt.
+
+        Add a flag to NetscapePlugin to track whether or not NPP_SetWindow has ever been called.
+        Check this flag in geometryDidChange to make sure every plug-in gets the call at least once.
+
+        "Everybody gets one.  Tell him, Peter."
+        "Apparently everybody gets one."
+        "Bingo."
+
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::NetscapePlugin):
+        (WebKit::NetscapePlugin::geometryDidChange):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+        (NetscapePlugin):
+
 2012-06-01  Dinu Jacob  <[email protected]>
 
         [WK2] WebLayerTreeRenderer::setContentsSize called synchronously

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (119259 => 119260)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2012-06-01 19:00:25 UTC (rev 119259)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2012-06-01 19:24:37 UTC (rev 119260)
@@ -71,6 +71,7 @@
     , m_isTransparent(false)
     , m_inNPPNew(false)
     , m_shouldUseManualLoader(false)
+    , m_hasCalledSetWindow(false)
     , m_nextTimerID(0)
 #if PLATFORM(MAC)
     , m_drawingModel(static_cast<NPDrawingModel>(-1))
@@ -692,11 +693,11 @@
         return;
     }
 
-    bool shouldCallWindow = true;
+    bool shouldCallSetWindow = true;
 
     // If the plug-in doesn't want window relative coordinates, we don't need to call setWindow unless its size or clip rect changes.
-    if (wantsPluginRelativeNPWindowCoordinates() && m_pluginSize == pluginSize && m_clipRect == clipRect)
-        shouldCallWindow = false;
+    if (m_hasCalledSetWindow && wantsPluginRelativeNPWindowCoordinates() && m_pluginSize == pluginSize && m_clipRect == clipRect)
+        shouldCallSetWindow = false;
 
     m_pluginSize = pluginSize;
     m_clipRect = clipRect;
@@ -707,10 +708,11 @@
 
     platformGeometryDidChange();
 
-    if (!shouldCallWindow)
+    if (!shouldCallSetWindow)
         return;
 
     callSetWindow();
+    m_hasCalledSetWindow = true;
 }
 
 void NetscapePlugin::visibilityDidChange()

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h (119259 => 119260)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h	2012-06-01 19:00:25 UTC (rev 119259)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h	2012-06-01 19:24:37 UTC (rev 119260)
@@ -272,6 +272,8 @@
     bool m_isTransparent;
     bool m_inNPPNew;
     bool m_shouldUseManualLoader;
+    bool m_hasCalledSetWindow;
+
     RefPtr<NetscapePluginStream> m_manualStream;
     Vector<bool, 8> m_popupEnabledStates;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to