Title: [119927] trunk/Source/WebCore
Revision
119927
Author
[email protected]
Date
2012-06-10 06:44:32 -0700 (Sun, 10 Jun 2012)

Log Message

[Qt][Win] Fix building Source/WebCore/plugins/win/PluginViewWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=88308

Reviewed by Simon Hausmann.

No new tests, just a build fix.

Use ownerWindow() from page client. It has been
introduced for x11 plugins to solve exactly the
same problem.

* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (119926 => 119927)


--- trunk/Source/WebCore/ChangeLog	2012-06-10 12:49:32 UTC (rev 119926)
+++ trunk/Source/WebCore/ChangeLog	2012-06-10 13:44:32 UTC (rev 119927)
@@ -1,5 +1,21 @@
 2012-06-10  Balazs Kelemen  <[email protected]>
 
+        [Qt][Win] Fix building Source/WebCore/plugins/win/PluginViewWin.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=88308
+
+        Reviewed by Simon Hausmann.
+
+        No new tests, just a build fix.
+
+        Use ownerWindow() from page client. It has been
+        introduced for x11 plugins to solve exactly the
+        same problem.
+
+        * plugins/win/PluginViewWin.cpp:
+        (windowHandleForPageClient):
+
+2012-06-10  Balazs Kelemen  <[email protected]>
+
         [Qt][Win] Fix building ImageQt.cpp
         https://bugs.webkit.org/show_bug.cgi?id=88306
 

Modified: trunk/Source/WebCore/plugins/win/PluginViewWin.cpp (119926 => 119927)


--- trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2012-06-10 12:49:32 UTC (rev 119926)
+++ trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2012-06-10 13:44:32 UTC (rev 119927)
@@ -88,8 +88,12 @@
 
 #if PLATFORM(QT)
 #include "QWebPageClient.h"
+#if HAVE(QT5)
+#include <QWindow>
+#else
 #include <QWidget>
 #endif
+#endif
 
 #if PLATFORM(WX)
 #include <wx/defs.h>
@@ -101,8 +105,13 @@
 #if PLATFORM(QT)
     if (!client)
         return 0;
+#if HAVE(QT5)
+    if (QWindow* window = client->ownerWindow())
+        return reinterpret_cast<HWND>(window->winId());
+#else
     if (QWidget* pluginParent = qobject_cast<QWidget*>(client->pluginParent()))
         return pluginParent->winId();
+#endif
     return 0;
 #elif PLATFORM(WX)
     if (!client)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to