Title: [102274] branches/safari-534.53-branch/Source/WebKit2

Diff

Modified: branches/safari-534.53-branch/Source/WebKit2/ChangeLog (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/ChangeLog	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/ChangeLog	2011-12-07 22:45:15 UTC (rev 102274)
@@ -1,5 +1,40 @@
 2011-12-07  Lucas Forschler  <[email protected]>
 
+    Merge 98873
+
+    2011-10-27  Anders Carlsson  <[email protected]>
+
+            Rename a couple of NetscapePlugin and PluginProxy member variables
+            https://bugs.webkit.org/show_bug.cgi?id=71086
+
+            Reviewed by Sam Weinig.
+
+            * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+            (WebKit::NetscapePlugin::invalidate):
+            (WebKit::NetscapePlugin::callSetWindow):
+            (WebKit::NetscapePlugin::snapshot):
+            (WebKit::NetscapePlugin::deprecatedGeometryDidChange):
+            * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+            * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
+            (WebKit::NetscapePlugin::platformPaint):
+            (WebKit::NetscapePlugin::platformHandleMouseEvent):
+            (WebKit::NetscapePlugin::platformHandleWheelEvent):
+            (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
+            (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
+            * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
+            (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
+            (WebKit::NetscapePlugin::platformPaint):
+            * WebProcess/Plugins/PluginProxy.cpp:
+            (WebKit::PluginProxy::paint):
+            (WebKit::PluginProxy::geometryDidChange):
+            (WebKit::PluginProxy::deprecatedGeometryDidChange):
+            (WebKit::PluginProxy::update):
+            * WebProcess/Plugins/PluginProxy.h:
+            * WebProcess/Plugins/PluginView.cpp:
+            (WebKit::PluginView::viewGeometryDidChange):
+
+2011-12-07  Lucas Forschler  <[email protected]>
+
     Merge 98664
 
     2011-10-27  Anders Carlsson  <[email protected]>

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2011-12-07 22:45:15 UTC (rev 102274)
@@ -112,7 +112,7 @@
     IntRect rect;
     
     if (!invalidRect)
-        rect = IntRect(0, 0, m_frameRect.width(), m_frameRect.height());
+        rect = IntRect(0, 0, m_frameRectInWindowCoordinates.width(), m_frameRectInWindowCoordinates.height());
     else
         rect = IntRect(invalidRect->left, invalidRect->top,
                        invalidRect->right - invalidRect->left, invalidRect->bottom - invalidRect->top);
@@ -387,15 +387,15 @@
     m_npWindow.x = 0;
     m_npWindow.y = 0;
 #else
-    m_npWindow.x = m_frameRect.x();
-    m_npWindow.y = m_frameRect.y();
+    m_npWindow.x = m_frameRectInWindowCoordinates.x();
+    m_npWindow.y = m_frameRectInWindowCoordinates.y();
 #endif
-    m_npWindow.width = m_frameRect.width();
-    m_npWindow.height = m_frameRect.height();
-    m_npWindow.clipRect.top = m_clipRect.y();
-    m_npWindow.clipRect.left = m_clipRect.x();
-    m_npWindow.clipRect.bottom = m_clipRect.maxY();
-    m_npWindow.clipRect.right = m_clipRect.maxX();
+    m_npWindow.width = m_frameRectInWindowCoordinates.width();
+    m_npWindow.height = m_frameRectInWindowCoordinates.height();
+    m_npWindow.clipRect.top = m_clipRectInWindowCoordinates.y();
+    m_npWindow.clipRect.left = m_clipRectInWindowCoordinates.x();
+    m_npWindow.clipRect.bottom = m_clipRectInWindowCoordinates.maxY();
+    m_npWindow.clipRect.right = m_clipRectInWindowCoordinates.maxX();
 
     NPP_SetWindow(&m_npWindow);
 }
@@ -539,17 +539,17 @@
 
 PassRefPtr<ShareableBitmap> NetscapePlugin::snapshot()
 {
-    if (!supportsSnapshotting() || m_frameRect.isEmpty())
+    if (!supportsSnapshotting() || m_frameRectInWindowCoordinates.isEmpty())
         return 0;
 
     ASSERT(m_isStarted);
     
-    RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(m_frameRect.size(), ShareableBitmap::SupportsAlpha);
+    RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(m_frameRectInWindowCoordinates.size(), ShareableBitmap::SupportsAlpha);
     OwnPtr<GraphicsContext> context = bitmap->createGraphicsContext();
 
-    context->translate(-m_frameRect.x(), -m_frameRect.y());
+    context->translate(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
 
-    platformPaint(context.get(), m_frameRect, true);
+    platformPaint(context.get(), m_frameRectInWindowCoordinates, true);
     
     return bitmap.release();
 }
@@ -559,17 +559,17 @@
     return m_isTransparent;
 }
 
-void NetscapePlugin::deprecatedGeometryDidChange(const IntRect& frameRect, const IntRect& clipRect)
+void NetscapePlugin::deprecatedGeometryDidChange(const IntRect& frameRectInWindowCoordinates, const IntRect& clipRectInWindowCoordinates)
 {
     ASSERT(m_isStarted);
 
-    if (m_frameRect == frameRect && m_clipRect == clipRect) {
+    if (m_frameRectInWindowCoordinates == frameRectInWindowCoordinates && m_clipRectInWindowCoordinates == clipRectInWindowCoordinates) {
         // Nothing to do.
         return;
     }
 
-    m_frameRect = frameRect;
-    m_clipRect = clipRect;
+    m_frameRectInWindowCoordinates = frameRectInWindowCoordinates;
+    m_clipRectInWindowCoordinates = clipRectInWindowCoordinates;
 
     platformGeometryDidChange();
     callSetWindow();

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h	2011-12-07 22:45:15 UTC (rev 102274)
@@ -219,8 +219,9 @@
     NPP_t m_npp;
     NPWindow m_npWindow;
 
-    WebCore::IntRect m_frameRect;
-    WebCore::IntRect m_clipRect;
+    // FIXME: Get rid of these.
+    WebCore::IntRect m_frameRectInWindowCoordinates;
+    WebCore::IntRect m_clipRectInWindowCoordinates;
 
     CString m_userAgent;
 

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm	2011-12-07 22:45:15 UTC (rev 102274)
@@ -409,7 +409,7 @@
     CGContextRef platformContext = context->platformContext();
 
     // Translate the context so that the origin is at the top left corner of the plug-in view.
-    context->translate(m_frameRect.x(), m_frameRect.y());
+    context->translate(m_frameRectInWindowCoordinates.x(), m_frameRectInWindowCoordinates.y());
 
     switch (m_eventModel) {
         case NPEventModelCocoa: {
@@ -420,8 +420,8 @@
             NPCocoaEvent event = initializeEvent(NPCocoaEventDrawRect);
 
             event.data.draw.context = platformContext;
-            event.data.draw.x = dirtyRect.x() - m_frameRect.x();
-            event.data.draw.y = dirtyRect.y() - m_frameRect.y();
+            event.data.draw.x = dirtyRect.x() - m_frameRectInWindowCoordinates.x();
+            event.data.draw.y = dirtyRect.y() - m_frameRectInWindowCoordinates.y();
             event.data.draw.width = dirtyRect.width();
             event.data.draw.height = dirtyRect.height();
             
@@ -524,7 +524,7 @@
 {
     switch (m_eventModel) {
         case NPEventModelCocoa: {
-            NPCocoaEvent event = initializeMouseEvent(mouseEvent, m_frameRect.location());
+            NPCocoaEvent event = initializeMouseEvent(mouseEvent, m_frameRectInWindowCoordinates.location());
 
             NPCocoaEvent* previousMouseEvent = m_currentMouseEvent;
             m_currentMouseEvent = &event;
@@ -591,8 +591,8 @@
             NPCocoaEvent event = initializeEvent(NPCocoaEventScrollWheel);
             
             event.data.mouse.modifierFlags = modifierFlags(wheelEvent);
-            event.data.mouse.pluginX = wheelEvent.position().x() - m_frameRect.x();
-            event.data.mouse.pluginY = wheelEvent.position().y() - m_frameRect.y();
+            event.data.mouse.pluginX = wheelEvent.position().x() - m_frameRectInWindowCoordinates.x();
+            event.data.mouse.pluginY = wheelEvent.position().y() - m_frameRectInWindowCoordinates.y();
             event.data.mouse.buttonNumber = 0;
             event.data.mouse.clickCount = 0;
             event.data.mouse.deltaX = wheelEvent.delta().width();
@@ -620,7 +620,7 @@
         case NPEventModelCocoa: {
             NPCocoaEvent event = initializeEvent(NPCocoaEventMouseEntered);
             
-            fillInCocoaEventFromMouseEvent(event, mouseEvent, m_frameRect.location());
+            fillInCocoaEventFromMouseEvent(event, mouseEvent, m_frameRectInWindowCoordinates.location());
             return NPP_HandleEvent(&event);
         }
 
@@ -646,7 +646,7 @@
         case NPEventModelCocoa: {
             NPCocoaEvent event = initializeEvent(NPCocoaEventMouseExited);
             
-            fillInCocoaEventFromMouseEvent(event, mouseEvent, m_frameRect.location());
+            fillInCocoaEventFromMouseEvent(event, mouseEvent, m_frameRectInWindowCoordinates.location());
             return NPP_HandleEvent(&event);
         }
 

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp	2011-12-07 22:45:15 UTC (rev 102274)
@@ -158,17 +158,17 @@
 
 void NetscapePlugin::scheduleWindowedGeometryUpdate()
 {
-    IntRect clipRectInPluginWindowCoordinates = m_clipRect;
-    clipRectInPluginWindowCoordinates.move(-m_frameRect.x(), -m_frameRect.y());
+    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_frameRect.width(), m_frameRect.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER);
+    ::SetWindowPos(m_window, 0, 0, 0, m_frameRectInWindowCoordinates.width(), m_frameRectInWindowCoordinates.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER);
 
     WindowGeometry geometry;
     geometry.window = m_window;
     geometry.visible = m_pluginController->isPluginVisible();
-    geometry.frame = m_frameRect;
+    geometry.frame = m_frameRectInWindowCoordinates;
     geometry.clipRect = clipRectInPluginWindowCoordinates;
 
     m_pluginController->scheduleWindowedPluginGeometryUpdate(geometry);
@@ -194,10 +194,10 @@
 
     WINDOWPOS windowpos = { 0, 0, 0, 0, 0, 0, 0 };
 
-    windowpos.x = m_frameRect.x();
-    windowpos.y = m_frameRect.y();
-    windowpos.cx = m_frameRect.width();
-    windowpos.cy = m_frameRect.height();
+    windowpos.x = m_frameRectInWindowCoordinates.x();
+    windowpos.y = m_frameRectInWindowCoordinates.y();
+    windowpos.cx = m_frameRectInWindowCoordinates.width();
+    windowpos.cy = m_frameRectInWindowCoordinates.height();
 
     NPEvent npEvent;
     npEvent.event = WM_WINDOWPOSCHANGED;

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp	2011-12-07 22:45:15 UTC (rev 102274)
@@ -157,13 +157,13 @@
         graphicsContext->applyDeviceScaleFactor(contentsScaleFactor);
         graphicsContext->setCompositeOperation(CompositeCopy);
 
-        m_pluginBackingStore->paint(*graphicsContext, contentsScaleFactor, IntPoint(), IntRect(0, 0, m_frameRect.width(), m_frameRect.height()));
+        m_pluginBackingStore->paint(*graphicsContext, contentsScaleFactor, IntPoint(), IntRect(0, 0, m_frameRectInWindowCoordinates.width(), m_frameRectInWindowCoordinates.height()));
 
         m_pluginBackingStoreContainsValidData = true;
     }
 
     IntRect dirtyRectInPluginCoordinates = dirtyRect;
-    dirtyRectInPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y());
+    dirtyRectInPluginCoordinates.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
 
     m_backingStore->paint(*graphicsContext, contentsScaleFactor, dirtyRect.location(), dirtyRectInPluginCoordinates);
 
@@ -200,14 +200,14 @@
     float contentsScaleFactor = 0;
 #endif
 
-    if (m_frameRect.isEmpty() || !needsBackingStore()) {
+    if (m_frameRectInWindowCoordinates.isEmpty() || !needsBackingStore()) {
         ShareableBitmap::Handle pluginBackingStoreHandle;
-        m_connection->connection()->send(Messages::PluginControllerProxy::GeometryDidChange(m_frameRect, m_clipRect, contentsScaleFactor, pluginBackingStoreHandle), m_pluginInstanceID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
+        m_connection->connection()->send(Messages::PluginControllerProxy::GeometryDidChange(m_frameRectInWindowCoordinates, m_clipRectInWindowCoordinates, contentsScaleFactor, pluginBackingStoreHandle), m_pluginInstanceID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
         return;
     }
 
     bool didUpdateBackingStore = false;
-    IntSize backingStoreSize = m_frameRect.size();
+    IntSize backingStoreSize = m_frameRectInWindowCoordinates.size();
     backingStoreSize.scale(contentsScaleFactor);
 
     if (!m_backingStore) {
@@ -238,21 +238,20 @@
         m_pluginBackingStoreContainsValidData = false;
     }
 
-    m_connection->connection()->send(Messages::PluginControllerProxy::GeometryDidChange(m_frameRect, m_clipRect, contentsScaleFactor, pluginBackingStoreHandle), m_pluginInstanceID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
+    m_connection->connection()->send(Messages::PluginControllerProxy::GeometryDidChange(m_frameRectInWindowCoordinates, m_frameRectInWindowCoordinates, contentsScaleFactor, pluginBackingStoreHandle), m_pluginInstanceID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
 }
 
-void PluginProxy::deprecatedGeometryDidChange(const IntRect& frameRect, const IntRect& clipRect)
+void PluginProxy::deprecatedGeometryDidChange(const IntRect& frameRectInWindowCoordinates, const IntRect& clipRectInWindowCoordinates)
 {
-    m_frameRect = frameRect;
-    m_clipRect = clipRect;
+    m_frameRectInWindowCoordinates = frameRectInWindowCoordinates;
+    m_clipRectInWindowCoordinates = clipRectInWindowCoordinates;
 
     geometryDidChange();
 }
 
 void PluginProxy::geometryDidChange(const IntSize& pluginSize, const IntRect& clipRect, const AffineTransform& pluginToRootViewTransform)
 {
-    // FIXME: This isn't called yet.
-    ASSERT_NOT_REACHED();
+    // FIXME: Actually do something here.
 }
 
 void PluginProxy::visibilityDidChange()
@@ -548,11 +547,11 @@
     
 void PluginProxy::update(const IntRect& paintedRect)
 {
-    if (paintedRect == m_frameRect)
+    if (paintedRect == m_frameRectInWindowCoordinates)
         m_pluginBackingStoreContainsValidData = true;
 
     IntRect paintedRectPluginCoordinates = paintedRect;
-    paintedRectPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y());
+    paintedRectPluginCoordinates.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
 
     if (m_backingStore) {
 #if PLATFORM(MAC)

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginProxy.h (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginProxy.h	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginProxy.h	2011-12-07 22:45:15 UTC (rev 102274)
@@ -71,7 +71,7 @@
     virtual PlatformLayer* pluginLayer();
 #endif
     virtual bool isTransparent();
-    virtual void deprecatedGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect);
+    virtual void deprecatedGeometryDidChange(const WebCore::IntRect& frameRectInWindowCoordinates, const WebCore::IntRect& clipRectInWindowCoordinates);
     virtual void geometryDidChange(const WebCore::IntSize& pluginSize, const WebCore::IntRect& clipRect, const WebCore::AffineTransform& pluginToRootViewTransform);
     virtual void visibilityDidChange();
     virtual void frameDidFinishLoading(uint64_t requestID);
@@ -140,10 +140,10 @@
     PluginController* m_pluginController;
 
     // The plug-in rect in window coordinates.
-    WebCore::IntRect m_frameRect;
+    WebCore::IntRect m_frameRectInWindowCoordinates;
 
     // The plug-in clip rect in window coordinates.
-    WebCore::IntRect m_clipRect;
+    WebCore::IntRect m_clipRectInWindowCoordinates;
 
     // This is the backing store that we paint when we're told to paint.
     RefPtr<ShareableBitmap> m_backingStore;

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (102273 => 102274)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-12-07 22:43:50 UTC (rev 102273)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-12-07 22:45:15 UTC (rev 102274)
@@ -728,7 +728,6 @@
     // FIXME: The clip rect isn't correct.
     IntRect clipRect = boundsRect();
     m_plugin->geometryDidChange(size(), clipRect, transform);
-
 }
 
 void PluginView::viewVisibilityDidChange()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to