Title: [99249] trunk/Source/WebKit2
Revision
99249
Author
[email protected]
Date
2011-11-03 17:13:39 -0700 (Thu, 03 Nov 2011)

Log Message

Use convertToRootView(IntPoint()) instead of m_frameRectInWindowCoordinates.location() where possible
https://bugs.webkit.org/show_bug.cgi?id=71520

Reviewed by Dan Bernstein.

* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
(WebKit::NetscapePlugin::platformPaint):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformHandleMouseEvent):
(WebKit::NetscapePlugin::platformHandleWheelEvent):
(WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
(WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (99248 => 99249)


--- trunk/Source/WebKit2/ChangeLog	2011-11-04 00:10:18 UTC (rev 99248)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-04 00:13:39 UTC (rev 99249)
@@ -1,5 +1,21 @@
 2011-11-03  Anders Carlsson  <[email protected]>
 
+        Use convertToRootView(IntPoint()) instead of m_frameRectInWindowCoordinates.location() where possible
+        https://bugs.webkit.org/show_bug.cgi?id=71520
+
+        Reviewed by Dan Bernstein.
+
+        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
+        (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
+        (WebKit::NetscapePlugin::platformPaint):
+        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
+        (WebKit::NetscapePlugin::platformHandleMouseEvent):
+        (WebKit::NetscapePlugin::platformHandleWheelEvent):
+        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
+        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
+
+2011-11-03  Anders Carlsson  <[email protected]>
+
         Add NetscapePlugin::convertToRootView
         https://bugs.webkit.org/show_bug.cgi?id=71519
 

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-11-04 00:10:18 UTC (rev 99248)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-11-04 00:13:39 UTC (rev 99249)
@@ -165,7 +165,7 @@
     WindowGeometry geometry;
     geometry.window = m_window;
     geometry.visible = controller()->isPluginVisible();
-    geometry.frame = m_frameRectInWindowCoordinates;
+    geometry.frame = IntRect(convertToRootView(IntPoint()), m_pluginSize);
     geometry.clipRect = m_clipRect;
 
     controller()->scheduleWindowedPluginGeometryUpdate(geometry);
@@ -191,8 +191,10 @@
 
     WINDOWPOS windowpos = { 0, 0, 0, 0, 0, 0, 0 };
 
-    windowpos.x = m_frameRectInWindowCoordinates.x();
-    windowpos.y = m_frameRectInWindowCoordinates.y();
+    IntPoint pluginLocationInRootViewCoordinates = convertToRootView(IntPoint());
+
+    windowpos.x = pluginLocationInRootViewCoordinates.x();
+    windowpos.y = pluginLocationInRootViewCoordinates.y();
     windowpos.cx = m_pluginSize.width();
     windowpos.cy = m_pluginSize.height();
 

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-04 00:10:18 UTC (rev 99248)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-04 00:13:39 UTC (rev 99249)
@@ -409,10 +409,10 @@
     switch (event.type()) {
     case WebEvent::MouseDown:
     case WebEvent::MouseUp:
-        setXButtonEventFields(xEvent, event, m_frameRectInWindowCoordinates.location());
+        setXButtonEventFields(xEvent, event, convertToRootView(IntPoint()));
         break;
     case WebEvent::MouseMove:
-        setXMotionEventFields(xEvent, event, m_frameRectInWindowCoordinates.location());
+        setXMotionEventFields(xEvent, event, convertToRootView(IntPoint()));
         break;
     case WebEvent::NoType:
     case WebEvent::Wheel:
@@ -450,7 +450,7 @@
 
     XEvent xEvent;
     initializeXEvent(xEvent);
-    setXButtonEventFieldsByWebWheelEvent(xEvent, event, m_frameRectInWindowCoordinates.location());
+    setXButtonEventFieldsByWebWheelEvent(xEvent, event, convertToRootView(IntPoint()));
 
     return !NPP_HandleEvent(&xEvent);
 }
@@ -482,7 +482,7 @@
 
     XEvent xEvent;
     initializeXEvent(xEvent);
-    setXCrossingEventFields(xEvent, event, m_frameRectInWindowCoordinates.location(), EnterNotify);
+    setXCrossingEventFields(xEvent, event, convertToRootView(IntPoint()), EnterNotify);
 
     return !NPP_HandleEvent(&xEvent);
 }
@@ -494,7 +494,7 @@
 
     XEvent xEvent;
     initializeXEvent(xEvent);
-    setXCrossingEventFields(xEvent, event, m_frameRectInWindowCoordinates.location(), LeaveNotify);
+    setXCrossingEventFields(xEvent, event, convertToRootView(IntPoint()), LeaveNotify);
 
     return !NPP_HandleEvent(&xEvent);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to