Title: [99094] trunk/Source/WebKit2
Revision
99094
Author
[email protected]
Date
2011-11-02 14:01:18 -0700 (Wed, 02 Nov 2011)

Log Message

More window relative coordinate usage removal
https://bugs.webkit.org/show_bug.cgi?id=71393

Reviewed by Adam Roben.

* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
Just use m_clipRect instead of converting m_clipRectInWindowCoordinates to plug-in coordinates.

(WebKit::NetscapePlugin::platformPaint):
Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().

* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPaint):
Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (99093 => 99094)


--- trunk/Source/WebKit2/ChangeLog	2011-11-02 20:57:32 UTC (rev 99093)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-02 21:01:18 UTC (rev 99094)
@@ -1,5 +1,23 @@
 2011-11-02  Anders Carlsson  <[email protected]>
 
+        More window relative coordinate usage removal
+        https://bugs.webkit.org/show_bug.cgi?id=71393
+
+        Reviewed by Adam Roben.
+
+        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
+        (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
+        Just use m_clipRect instead of converting m_clipRectInWindowCoordinates to plug-in coordinates.
+
+        (WebKit::NetscapePlugin::platformPaint):
+        Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
+
+        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
+        (WebKit::NetscapePlugin::platformPaint):
+        Ditto.
+
+2011-11-02  Anders Carlsson  <[email protected]>
+
         Fix non-Mac builds and remove #if PLATFORM(MAC) around all contents scale factor functions.
 
         * PluginProcess/PluginControllerProxy.cpp:

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-11-02 20:57:32 UTC (rev 99093)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-11-02 21:01:18 UTC (rev 99094)
@@ -158,18 +158,15 @@
 
 void NetscapePlugin::scheduleWindowedGeometryUpdate()
 {
-    IntRect clipRectInPluginWindowCoordinates = m_clipRectInWindowCoordinates;
-    clipRectInPluginWindowCoordinates.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
-
     // We only update the size here and let the UI process update our position and clip rect so
     // that we can keep our position in sync when scrolling, etc. See <http://webkit.org/b/60210>.
-    ::SetWindowPos(m_window, 0, 0, 0, m_frameRectInWindowCoordinates.width(), m_frameRectInWindowCoordinates.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER);
+    ::SetWindowPos(m_window, 0, 0, 0, m_pluginSize.width(), m_pluginSize.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER);
 
     WindowGeometry geometry;
     geometry.window = m_window;
     geometry.visible = controller()->isPluginVisible();
     geometry.frame = m_frameRectInWindowCoordinates;
-    geometry.clipRect = clipRectInPluginWindowCoordinates;
+    geometry.clipRect = m_clipRect;
 
     controller()->scheduleWindowedPluginGeometryUpdate(geometry);
 }
@@ -196,8 +193,8 @@
 
     windowpos.x = m_frameRectInWindowCoordinates.x();
     windowpos.y = m_frameRectInWindowCoordinates.y();
-    windowpos.cx = m_frameRectInWindowCoordinates.width();
-    windowpos.cy = m_frameRectInWindowCoordinates.height();
+    windowpos.cx = m_pluginSize.width();
+    windowpos.cy = m_pluginSize.height();
 
     NPEvent npEvent;
     npEvent.event = WM_WINDOWPOSCHANGED;

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-02 20:57:32 UTC (rev 99093)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-02 21:01:18 UTC (rev 99094)
@@ -284,8 +284,8 @@
     RefPtr<cairo_surface_t> drawableSurface = adoptRef(cairo_xlib_surface_create(m_pluginDisplay,
                                                                                  m_drawable,
                                                                                  static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info)->visual,
-                                                                                 m_frameRectInWindowCoordinates.width(),
-                                                                                 m_frameRectInWindowCoordinates.height()));
+                                                                                 m_pluginSize.width(),
+                                                                                 m_pluginSize.height()));
     cairo_t* cr = context->platformContext()->cr();
     cairo_save(cr);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to