Title: [98898] trunk/Source/WebKit2
Revision
98898
Author
ander...@apple.com
Date
2011-10-31 16:08:28 -0700 (Mon, 31 Oct 2011)

Log Message

Fix the X11 build.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (98897 => 98898)


--- trunk/Source/WebKit2/ChangeLog	2011-10-31 23:07:12 UTC (rev 98897)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-31 23:08:28 UTC (rev 98898)
@@ -1,5 +1,17 @@
 2011-10-31  Anders Carlsson  <ander...@apple.com>
 
+        Fix the X11 build.
+
+        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
+        (WebKit::NetscapePlugin::platformGeometryDidChange):
+        (WebKit::NetscapePlugin::platformPaint):
+        (WebKit::NetscapePlugin::platformHandleMouseEvent):
+        (WebKit::NetscapePlugin::platformHandleWheelEvent):
+        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
+        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
+
+2011-10-31  Anders Carlsson  <ander...@apple.com>
+
         Factor code to resize the plug-in backing store out into a separate function
         https://bugs.webkit.org/show_bug.cgi?id=71250
 

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


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-10-31 23:07:12 UTC (rev 98897)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-10-31 23:08:28 UTC (rev 98898)
@@ -213,12 +213,12 @@
     if (m_drawable)
         XFreePixmap(display, m_drawable);
 
-    if (m_frameRect.isEmpty()) {
+    if (m_frameRectInWindowCoordinates.isEmpty()) {
         m_drawable = 0;
         return;
     }
 
-    m_drawable = XCreatePixmap(display, rootWindowID(), m_frameRect.width(), m_frameRect.height(), displayDepth());
+    m_drawable = XCreatePixmap(display, rootWindowID(), m_frameRectInWindowCoordinates.width(), m_frameRectInWindowCoordinates.height(), displayDepth());
 
     XSync(display, false); // Make sure that the server knows about the Drawable.
 }
@@ -245,7 +245,7 @@
 
 #if PLATFORM(QT)
     QPainter* painter = context->platformContext();
-    painter->translate(m_frameRect.x(), m_frameRect.y());
+    painter->translate(m_frameRectInWindowCoordinates.x(), m_frameRectInWindowCoordinates.y());
 #elif !PLATFORM(GTK)
     notImplemented();
     return;
@@ -259,8 +259,8 @@
     exposeEvent.drawable = m_drawable;
 
     IntRect exposedRect(dirtyRect);
-    exposedRect.intersect(m_frameRect);
-    exposedRect.move(-m_frameRect.x(), -m_frameRect.y());
+    exposedRect.intersect(m_frameRectInWindowCoordinates);
+    exposedRect.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
     exposeEvent.x = exposedRect.x();
     exposeEvent.y = exposedRect.y();
 
@@ -279,19 +279,19 @@
     ASSERT(qtDrawable.depth() == static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info)->depth);
     painter->drawPixmap(QPoint(exposedRect.x(), exposedRect.y()), qtDrawable, exposedRect);
 
-    painter->translate(-m_frameRect.x(), -m_frameRect.y());
+    painter->translate(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
 #elif PLATFORM(GTK)
     RefPtr<cairo_surface_t> drawableSurface = adoptRef(cairo_xlib_surface_create(m_pluginDisplay,
                                                                                  m_drawable,
                                                                                  static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info)->visual,
-                                                                                 m_frameRect.width(),
-                                                                                 m_frameRect.height()));
+                                                                                 m_frameRectInWindowCoordinates.width(),
+                                                                                 m_frameRectInWindowCoordinates.height()));
     cairo_t* cr = context->platformContext()->cr();
     cairo_save(cr);
 
-    cairo_set_source_surface(cr, drawableSurface.get(), m_frameRect.x(), m_frameRect.y());
+    cairo_set_source_surface(cr, drawableSurface.get(), m_frameRectInWindowCoordinates.x(), m_frameRectInWindowCoordinates.y());
 
-    cairo_rectangle(cr, m_frameRect.x() + exposedRect.x(), m_frameRect.y() + exposedRect.y(), exposedRect.width(), exposedRect.height());
+    cairo_rectangle(cr, m_frameRectInWindowCoordinates.x() + exposedRect.x(), m_frameRectInWindowCoordinates.y() + exposedRect.y(), exposedRect.width(), exposedRect.height());
     cairo_clip(cr);
     cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
     cairo_paint(cr);
@@ -414,10 +414,10 @@
     switch (event.type()) {
     case WebEvent::MouseDown:
     case WebEvent::MouseUp:
-        setXButtonEventFields(xEvent, event, m_frameRect.location());
+        setXButtonEventFields(xEvent, event, m_frameRectInWindowCoordinates.location());
         break;
     case WebEvent::MouseMove:
-        setXMotionEventFields(xEvent, event, m_frameRect.location());
+        setXMotionEventFields(xEvent, event, m_frameRectInWindowCoordinates.location());
         break;
     case WebEvent::NoType:
     case WebEvent::Wheel:
@@ -455,7 +455,7 @@
 
     XEvent xEvent;
     initializeXEvent(xEvent);
-    setXButtonEventFieldsByWebWheelEvent(xEvent, event, m_frameRect.location());
+    setXButtonEventFieldsByWebWheelEvent(xEvent, event, m_frameRectInWindowCoordinates.location());
 
     return !NPP_HandleEvent(&xEvent);
 }
@@ -482,7 +482,7 @@
 
     XEvent xEvent;
     initializeXEvent(xEvent);
-    setXCrossingEventFields(xEvent, event, m_frameRect.location(), EnterNotify);
+    setXCrossingEventFields(xEvent, event, m_frameRectInWindowCoordinates.location(), EnterNotify);
 
     return !NPP_HandleEvent(&xEvent);
 }
@@ -494,7 +494,7 @@
 
     XEvent xEvent;
     initializeXEvent(xEvent);
-    setXCrossingEventFields(xEvent, event, m_frameRect.location(), LeaveNotify);
+    setXCrossingEventFields(xEvent, event, m_frameRectInWindowCoordinates.location(), LeaveNotify);
 
     return !NPP_HandleEvent(&xEvent);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to