Title: [149055] trunk/Source/WebCore
Revision
149055
Author
[email protected]
Date
2013-04-24 12:36:17 -0700 (Wed, 24 Apr 2013)

Log Message

Remove wxWebKit #ifdefs from WebCore/plugins
https://bugs.webkit.org/show_bug.cgi?id=115080

Reviewed by Geoffrey Garen.

* plugins/PluginView.h:
(PluginView):
* plugins/mac/PluginViewMac.mm:
(WebCore::nativeWindowFor):
(WebCore::cgHandleFor):
(WebCore::topLevelOffsetFor):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::snapshot):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149054 => 149055)


--- trunk/Source/WebCore/ChangeLog	2013-04-24 19:35:31 UTC (rev 149054)
+++ trunk/Source/WebCore/ChangeLog	2013-04-24 19:36:17 UTC (rev 149055)
@@ -1,5 +1,25 @@
 2013-04-24  Benjamin Poulain  <[email protected]>
 
+        Remove wxWebKit #ifdefs from WebCore/plugins
+        https://bugs.webkit.org/show_bug.cgi?id=115080
+
+        Reviewed by Geoffrey Garen.
+
+        * plugins/PluginView.h:
+        (PluginView):
+        * plugins/mac/PluginViewMac.mm:
+        (WebCore::nativeWindowFor):
+        (WebCore::cgHandleFor):
+        (WebCore::topLevelOffsetFor):
+        (WebCore::PluginView::platformStart):
+        * plugins/win/PluginViewWin.cpp:
+        (windowHandleForPageClient):
+        (WebCore::PluginView::handleMouseEvent):
+        (WebCore::PluginView::platformStart):
+        (WebCore::PluginView::snapshot):
+
+2013-04-24  Benjamin Poulain  <[email protected]>
+
         Remove wxWebKit #ifdefs from WebCore/page
         https://bugs.webkit.org/show_bug.cgi?id=115079
 

Modified: trunk/Source/WebCore/plugins/PluginView.h (149054 => 149055)


--- trunk/Source/WebCore/plugins/PluginView.h	2013-04-24 19:35:31 UTC (rev 149054)
+++ trunk/Source/WebCore/plugins/PluginView.h	2013-04-24 19:36:17 UTC (rev 149055)
@@ -47,7 +47,7 @@
 #include "npruntime_internal.h"
 #endif
 
-#if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX))
+#if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT))
 typedef struct HWND__* HWND;
 typedef HWND PlatformPluginWidget;
 #else
@@ -389,7 +389,7 @@
         bool m_haveUpdatedPluginWidget;
 #endif
 
-#if ((PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX)) && OS(WINDOWS)) || defined(XP_MACOSX) || PLATFORM(EFL)
+#if ((PLATFORM(GTK) || PLATFORM(QT)) && OS(WINDOWS)) || defined(XP_MACOSX) || PLATFORM(EFL)
         // On Mac OSX and Qt/Windows the plugin does not have its own native widget,
         // but is using the containing window as its reference for positioning/painting.
         PlatformPluginWidget m_window;

Modified: trunk/Source/WebCore/plugins/mac/PluginViewMac.mm (149054 => 149055)


--- trunk/Source/WebCore/plugins/mac/PluginViewMac.mm	2013-04-24 19:35:31 UTC (rev 149054)
+++ trunk/Source/WebCore/plugins/mac/PluginViewMac.mm	2013-04-24 19:36:17 UTC (rev 149055)
@@ -85,11 +85,6 @@
 QT_END_NAMESPACE
 #endif
 
-#if PLATFORM(WX)
-#include <wx/defs.h>
-#include <wx/wx.h>
-#endif
-
 using std::min;
 
 using namespace WTF;
@@ -111,9 +106,6 @@
 #else
         return static_cast<WindowRef>(qt_mac_window_for(widget));
 #endif
-#elif PLATFORM(WX)
-    if (widget)
-        return (WindowRef)widget->MacGetTopLevelWindowRef();
 #endif
     return 0;
 }
@@ -124,10 +116,6 @@
     if (widget)
         return (CGContextRef)static_cast<QWidget*>(widget)->macCGHandle();
 #endif
-#if PLATFORM(WX)
-    if (widget)
-        return (CGContextRef)widget->MacGetCGContextRef();
-#endif
     return 0;
 }
 
@@ -139,12 +127,6 @@
         return static_cast<QWidget*>(widget)->mapTo(topLevel, QPoint(0, 0)) + topLevel->geometry().topLeft() - topLevel->pos();
     }
 #endif
-#if PLATFORM(WX)
-    if (widget) {
-        PlatformWidget toplevel = wxGetTopLevelParent(widget);
-        return toplevel->ScreenToClient(widget->GetScreenPosition());
-    }
-#endif
     return IntPoint();
 }
 
@@ -244,10 +226,6 @@
             setPlatformPluginWidget(widget);
     }
 #endif
-#if PLATFORM(WX)
-    if (wxWindow* widget = m_parentFrame->view()->hostWindow()->platformPageClient())
-        setPlatformPluginWidget(widget);
-#endif
 
     // Create a fake window relative to which all events will be sent when using offscreen rendering
 #ifndef NP_NO_CARBON
@@ -1018,18 +996,6 @@
     Point pos;
     GetGlobalMouse(&pos);
 
-#if PLATFORM(WX)
-    // make sure the titlebar/toolbar size is included
-    WindowRef windowRef = nativeWindowFor(platformPluginWidget());
-    ::Rect content, structure;
-
-    GetWindowBounds(windowRef, kWindowStructureRgn, &structure);
-    GetWindowBounds(windowRef, kWindowContentRgn, &content);
-
-    int top = content.top  - structure.top;
-    pos.v -= top;
-#endif
-
     return pos;
 }
 #endif

Modified: trunk/Source/WebCore/plugins/win/PluginViewWin.cpp (149054 => 149055)


--- trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2013-04-24 19:35:31 UTC (rev 149054)
+++ trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2013-04-24 19:36:17 UTC (rev 149055)
@@ -29,6 +29,7 @@
 #include "PluginView.h"
 
 #include "BitmapImage.h"
+#include "BitmapInfo.h"
 #include "BridgeJSC.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
@@ -71,10 +72,6 @@
 #include <wtf/ASCIICType.h>
 #include <wtf/text/WTFString.h>
 
-#if !PLATFORM(WX)
-#include "BitmapInfo.h"
-#endif
-
 #if OS(WINCE)
 #undef LOG_NPERROR
 #define LOG_NPERROR(x)
@@ -97,11 +94,6 @@
 #include <QWindow>
 #endif
 
-#if PLATFORM(WX)
-#include <wx/defs.h>
-#include <wx/window.h>
-#endif
-
 static inline HWND windowHandleForPageClient(PlatformPageClient client)
 {
 #if PLATFORM(GTK)
@@ -116,10 +108,6 @@
     if (QWindow* window = client->ownerWindow())
         return reinterpret_cast<HWND>(window->winId());
     return 0;
-#elif PLATFORM(WX)
-    if (!client)
-        return 0;
-    return (HWND)client->GetHandle();
 #else
     return client;
 #endif
@@ -762,7 +750,7 @@
     if (dispatchNPEvent(npEvent))
         event->setDefaultHandled();
 
-#if !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(WX) && !OS(WINCE)
+#if !PLATFORM(GTK) && !PLATFORM(QT) && !OS(WINCE)
     // Currently, Widget::setCursor is always called after this function in EventHandler.cpp
     // and since we don't want that we set ignoreNextSetCursor to true here to prevent that.
     ignoreNextSetCursor = true;
@@ -1013,7 +1001,7 @@
         HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags,
                                        0, 0, 0, 0, parentWindowHandle, 0, WebCore::instanceHandle(), 0);
 
-#if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX))
+#if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT))
         m_window = window;
 #else
         setPlatformWidget(window);
@@ -1056,7 +1044,7 @@
 
 PassRefPtr<Image> PluginView::snapshot()
 {
-#if !PLATFORM(GTK) && !PLATFORM(WX) && !OS(WINCE)
+#if !PLATFORM(GTK) && !OS(WINCE)
     OwnPtr<HDC> hdc = adoptPtr(CreateCompatibleDC(0));
 
     if (!m_isWindowed) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to