Title: [99449] trunk/Source/WebKit2
Revision
99449
Author
[email protected]
Date
2011-11-07 11:20:40 -0800 (Mon, 07 Nov 2011)

Log Message

Rename NetscapePlugin::wantsWindowRelativeNPWindowCoordinates to NetscapePlugin::wantsPluginRelativeNPWindowCoordinates
https://bugs.webkit.org/show_bug.cgi?id=71708

Reviewed by Sam Weinig.

The name wantsPluginRelativeNPWindowCoordinates is more clear than wantsWindowRelativeNPWindowCoordinates. Rename the functions
everywhere and, since the meaning is now inverted, invert the checks and return values.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindow):
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (99448 => 99449)


--- trunk/Source/WebKit2/ChangeLog	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-07 19:20:40 UTC (rev 99449)
@@ -1,5 +1,28 @@
 2011-11-07  Anders Carlsson  <[email protected]>
 
+        Rename NetscapePlugin::wantsWindowRelativeNPWindowCoordinates to NetscapePlugin::wantsPluginRelativeNPWindowCoordinates
+        https://bugs.webkit.org/show_bug.cgi?id=71708
+
+        Reviewed by Sam Weinig.
+
+        The name wantsPluginRelativeNPWindowCoordinates is more clear than wantsWindowRelativeNPWindowCoordinates. Rename the functions
+        everywhere and, since the meaning is now inverted, invert the checks and return values.
+
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::callSetWindow):
+        (WebKit::NetscapePlugin::geometryDidChange):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+        * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
+        (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
+        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
+        (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
+        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
+        (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
+        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
+        (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
+
+2011-11-07  Anders Carlsson  <[email protected]>
+
         NetscapePlugin::wantsWindowRelativeNPWindowCoordinates should return false on Mac
         https://bugs.webkit.org/show_bug.cgi?id=71707
 

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2011-11-07 19:20:40 UTC (rev 99449)
@@ -483,7 +483,12 @@
 
 void NetscapePlugin::callSetWindow()
 {
-    if (wantsWindowRelativeNPWindowCoordinates()) {
+    if (wantsPluginRelativeNPWindowCoordinates()) {
+        m_npWindow.x = 0;
+        m_npWindow.y = 0;
+        m_npWindow.clipRect.top = m_clipRect.y();
+        m_npWindow.clipRect.left = m_clipRect.x();
+    } else {
         IntPoint pluginLocationInRootViewCoordinates = convertToRootView(IntPoint());
         IntPoint clipRectInRootViewCoordinates = convertToRootView(m_clipRect.location());
 
@@ -491,11 +496,6 @@
         m_npWindow.y = pluginLocationInRootViewCoordinates.y();
         m_npWindow.clipRect.top = clipRectInRootViewCoordinates.y();
         m_npWindow.clipRect.left = clipRectInRootViewCoordinates.x();
-    } else {
-        m_npWindow.x = 0;
-        m_npWindow.y = 0;
-        m_npWindow.clipRect.top = m_clipRect.y();
-        m_npWindow.clipRect.left = m_clipRect.x();
     }
 
     m_npWindow.width = m_pluginSize.width();
@@ -686,7 +686,7 @@
     bool shouldCallWindow = 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 (!wantsWindowRelativeNPWindowCoordinates() && m_pluginSize == pluginSize && m_clipRect == clipRect)
+    if (wantsPluginRelativeNPWindowCoordinates() && m_pluginSize == pluginSize && m_clipRect == clipRect)
         shouldCallWindow = false;
 
     m_pluginSize = pluginSize;

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h	2011-11-07 19:20:40 UTC (rev 99449)
@@ -164,7 +164,7 @@
     bool platformHandleKeyboardEvent(const WebKeyboardEvent&);
     void platformSetFocus(bool);
 
-    static bool wantsWindowRelativeNPWindowCoordinates();
+    static bool wantsPluginRelativeNPWindowCoordinates();
 
     // Plugin
     virtual bool initialize(const Parameters&);

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginNone.cpp (99448 => 99449)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginNone.cpp	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginNone.cpp	2011-11-07 19:20:40 UTC (rev 99449)
@@ -88,9 +88,9 @@
     return false;
 }
 
-bool NetscapePlugin::wantsWindowRelativeNPWindowCoordinates()
+bool NetscapePlugin::wantsPluginRelativeNPWindowCoordinates()
 {
-    return false;
+    return true;
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm (99448 => 99449)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm	2011-11-07 19:20:40 UTC (rev 99449)
@@ -859,9 +859,9 @@
     }
 }
 
-bool NetscapePlugin::wantsWindowRelativeNPWindowCoordinates()
+bool NetscapePlugin::wantsPluginRelativeNPWindowCoordinates()
 {
-    return false;
+    return true;
 }
 
 void NetscapePlugin::windowFocusChanged(bool hasFocus)

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp (99448 => 99449)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-11-07 19:20:40 UTC (rev 99449)
@@ -324,9 +324,9 @@
     NPP_HandleEvent(&npEvent);
 }
 
-bool NetscapePlugin::wantsWindowRelativeNPWindowCoordinates()
+bool NetscapePlugin::wantsPluginRelativeNPWindowCoordinates()
 {
-    return true;
+    return false;
 }
 
 bool NetscapePlugin::platformHandleMouseEnterEvent(const WebMouseEvent& event)

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp (99448 => 99449)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-07 19:20:34 UTC (rev 99448)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-07 19:20:40 UTC (rev 99449)
@@ -470,9 +470,9 @@
     NPP_HandleEvent(&xEvent);
 }
 
-bool NetscapePlugin::wantsWindowRelativeNPWindowCoordinates()
+bool NetscapePlugin::wantsPluginRelativeNPWindowCoordinates()
 {
-    return false;
+    return true;
 }
 
 bool NetscapePlugin::platformHandleMouseEnterEvent(const WebMouseEvent& event)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to